open a folder from terminal

open a finder in the terminal of a mac if you need to open a finder window you can just type open or if you want to open the finder with the folder that you are in as the path you can type open . and like that you have magically opened the folder and you are good to go.

2022-10-07 · 1 min · 60 words · Mike Fettis

muting a microwave

Microware muting Ok fine usually I will talk about tech things and IT things, but this is a quality of life thing. It turns out that you can mute your microwave. While i never thought that this would be a thing, it does make really good sense and yea, that should be a thing. 30 seconds later I googled “mute microwave” and low and behold. whirlpool microwave: keypad mute: press and hold 1 for 3 seconds hear "beep beep" end of cycle mute: pread and hold 2 for 3 seconds hear "beep beep"

2022-09-12 · 1 min · 93 words · Mike Fettis

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

replacing text across files

We built microservices to leverage scale. As a result those microservices are each in their own repos. We don’t need to get into a discussion about mono repos here, we aren’t using them. The example here is a gitlab pipeline file and we needed to add a new yaml anchor block to use later in the pipeline. We are going to look for something that we know exists, in this case: “....

2022-08-07 · 2 min · 255 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

python repl

Using repl to debug python. https://jvns.ca/blog/2021/09/16/debugging-in-a-repl-is-fun/ what’s a REPL? REPL stands for “read eval print loop”. A REPL is a program that: reads some input from you like print(f"2 + 2 = {2+2}") (read) evaluates the input (eval) print out the result (print) and then goes back to step 1 (loop) A couple years ago I used pry in ruby/chef a bunch and then I guess I forgot about it. Now this works for python too and it is WAY better than my print statement hell that I usually write....

2021-09-16 · 1 min · 151 words · Mike Fettis

git-diff

Diffing with git Diffing with git is hard so I wrote an alias in order to make my life easier. alias git-diff-master='git diff master...`git rev-parse --abbrev-ref HEAD`' Run that little alias and you are good to go when you need to check what you have changed. bye

2021-05-26 · 1 min · 47 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

aws cli input and TF state file

AWS cli v2 input prompting Today I learned that there is an argument that you can pass to the aws cli and it will prompt you for the input for the command that you are trying to run. https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-prompting.html If you are using version 2 of the aws cli then just add --cli-auto-prompt to your command and it will make magic. This is good if you don’t recall what you need to have in a command so it will just ask you along the way....

2020-10-09 · 2 min · 234 words · Mike Fettis

Clojure 2

Clojure again Welcome back to my clojure ramblings while I try to understand more. Tonight we are going to pick up where we left off, and that has to do with Vectors. NOTE: I am writing this as a way to digest and understand the book that I am working through entitled. Living Clojure Vectors Vectors can be found because they are wrapped in [] user=> [ :bucket 3 4 :cup ] [:bucket 3 4 :cup] user=> [:thing "other" :mine] [:thing "other" :mine] Vectors are similar to lists we can have a mix of types in them, and some of the same operators can be used on them....

2020-09-24 · 3 min · 634 words · Mike Fettis

uni headsetcontrol

UNI there is a handy little thing written in go that can handle unicode lookups from the terminal. I like all things terminal so here it is. https://github.com/arp242/uni go get arp242.net/uni Which will then allow you to search unicode from the terminal nice and easy uni search unicorn headset control I use an arctis 7 for my work headset, it is pretty nice but since it is USB 2.4ghz it lacks some of the features up bluetooth....

2020-09-21 · 2 min · 264 words · Mike Fettis

BBQ

just some thoughts on places to eat in the future There are tons of good places to get bbq in chicago, but here are some top winners https://chicagoculinarykitchen.com/ bbq in the burbs is chicago culinary kitchen located at 773 N. Quentin Road Palatine, IL Food truck / small shop that makes meat and then closes up shop when they run out of it.

2020-09-18 · 1 min · 63 words · Mike Fettis

Terraform external

Fun with terraform Today there was a fun problem. We needed to have terraform interrogate the current state and then make a decision based on the current state. The use case specifically was the number of service instances on an ECS cluster. If every time a deployment were to happen we would reset the desired count back to the original, then we could lose track of the current number of instances that happened as a result of scaling actions taken based on the current load....

2020-07-08 · 3 min · 488 words · Mike Fettis

Clojure 3

More Clojure Welcome back again. Last time we ended with assoc and dissoc. Tonight we will start with Sets. NOTE: I am writing this as a way to digest and understand the book that I am working through entitled. Living Clojure Sets What is a set? Sets are collections without duplicates and can be denoted with #{} Because of the nature of the set, we get a few extra methods to use on them, union difference and intersection....

2020-06-27 · 3 min · 605 words · Mike Fettis

Clipboard

Iterm Clipboard Apparently there has been an option sitting in iTerm that will allow applications in the terminal to access the system clipboard and somehow I never knew about this?!? Inside the preferences-General menu there is a setting called “Selection” and then an option “Applications in terminal may access clipboard” This is life changing and certainly makes a great many things much much easier https://stackoverflow.com/a/38849483

2020-06-24 · 1 min · 65 words · Mike Fettis

Clojure 1

Clojure I am trying to learn clojure, therefore the best way that I know how to learn something is to write about it. This allows me to digest the things that I am learning. Apparently I had forgotten about this tactic for the past couple weeks, as I was trying to just read and do problems to help learn this. Therefore lets get started. NOTE: I am writing this as a way to digest and understand the book that I am working through entitled....

2020-06-23 · 4 min · 676 words · Mike Fettis