ripgrep file context

rip grep tip I use ripgrep all the time and often times there are little things that can really help you find what you are serarching for. This is one of them. I want to find a string in a specific filename that exists in many folders. Then I want to display those resutls with some context. rg '.wait:' -g '.gitlab-ci.yml' --context 5 The string that I am searching for is ....

2022-09-06 · 1 min · 96 words · Mike Fettis

github vscode

Github and gitlab both have online text editors. if you are in safari and you have a repo open for either of them. All you need to do is type the period key and they will pop full fledged web editors for you. with github you are actually getting vscode with gitlab you are getting their editor. this makes me miss github for my daily work environment. but i guess there is a gitlab plugin for vscode in the web....

2022-04-27 · 1 min · 104 words · Mike Fettis

adding <vs>code to path

Adding code . to your terminal in order to open vscode. I like to maintain a terminal session running with just about everything that I am working on in it. Usually I work in VIM but lately I have needed to use vscode for a number of things. I like being ale to clone or switch the repo I am working on from the terminal and then open an editor directly from there....

2022-03-14 · 1 min · 165 words · Mike Fettis

vim-jq

Format json in vim If you have jq installed then all you need to do, to pretty print json is. :%!jq '.' Bam pretty json in vim

2021-01-19 · 1 min · 27 words · Mike Fettis

keybase gpg signing

I am borrowing this from pstadler because it is really good https://github.com/pstadler/keybase-gpg-github/blob/master/README.md Set up Keybase.io, GPG & Git to sign commits on GitHub This is a step-by-step guide on how to create a GPG key on keybase.io, adding it to a local GPG setup and use it with Git and GitHub. Although this guide was written for macOS, most commands should work in other operating systems as well. There’s a video published by Timothy Miller explaining some parts of this guide....

2020-11-17 · 5 min · 966 words · Mike Fettis

bfg -delete

Help! I committed and pushed something dangerous to github This happens we are not perfect and from time to time mistakes are made. Thats ok we can fix it with bfg git add my-bad-file git commit -a -m "im dumb" git push origin master # I did not mean to do that, I did not mean to do that # Lets fix it # i am in the repo folder named my-repo rm my-bad-file git commit -a -m "go away" git push origin master cd ....

2020-11-12 · 1 min · 168 words · Mike Fettis

terraform destroy gpg pinentry

pinentry is broken on my mac?! try this first # Kill gpg-agent killall gpg-agent # Run gpg-agent in daemon mode gpg-agent --daemon Universal handoff - clipboard mac/IOS There is a feature in mac land that allows you to share clipboard between phone and computer if they are both on the same wifi along with the same apple account. This can be super useful for a variety of applications. Here's how to turn on Handoff on your devices: On your Mac: Choose Apple () menu > System Preferences, then click General....

2020-11-11 · 1 min · 203 words · Mike Fettis

dot file automation

dot file automation Sharpen and clean your tools to make them last longer. Hone your tools to make them more precise. The tools of a SRE start with the terminal. The terminal is honed sharp with dotfiles. Live your life long enough in a terminal and tweaks and customizations happen. Live longer and when those tweaks are lost from a catastrophe or when you switch machines, you will be hamstrung and saddened going back to nothing....

11 min · 2252 words · Mike Fettis