2018_08_02_mac_key_repeat_python_ping

setting up mac keyboards key repeat with a new laptop means that you need to make all the changes to all the things. One of the annoyances that I had was the key repeat. Yes you can change this in the gui but why would I want to do it there when I can do it in the terminal instead… # read what everything is set at $ defaults read -g InitialKeyRepeat $ defaults read -g KeyRepeat # write some new values to the things....

1 min · 188 words · Mike Fettis

bagel sandwich the easy way

I love bagel and egg sandwiches and they are super easy to make with almost no cleanup. Bagel and egg sandwich the easy way(almost NO cleanup): as learned from watching a local bagel shop do it for a couple years. heat pan i think its a 12 or 16", melt butter/oil to coat even nonstick pan while pan is heating take bowl, crack two eggs and whip them together - add whatever spices you want, I usually add nothing once pan is sizzling (if you toss a drop of water in it it sizzles) pour in bowl of eggs toast bagel let cook until it is just about no longer runny, take a decently big spatula fold egg in half, and then fold into quarter, press down, cook one side until it is done enough for you then flip....

2 min · 224 words · Mike Fettis

certs

self signed certs Genning certs is always a pita, luckily I found a quick and easy way from the folks over at spiderlabs, to do it.. gen-self-signed-cert.sh #!/bin/bash openssl genrsa -out my.key 2048 openssl req -new -x509 -days 3650 -key my.key -out my.crt -subj "/"

1 min · 45 words · Mike Fettis

curl redirects

curl redirects Sometimes you want to be able to follow a redirect chain to see what is going on.you can do that pretty easily with curl. Toss in your url and hit enter then follow the breadcrumbs. curl -v -L http://google.com 2>&1 | egrep "^> (Host:|GET)" $ curl -v -L http://google.com 2>&1 | egrep "^> (Host:|GET)" > GET http://google.com/ HTTP/1.1 > Host: google.com > GET http://www.google.com/ HTTP/1.1 > Host: www.google.com

1 min · 70 words · Mike Fettis

github one liner and powershell curl

Github releases There is a nice way to get the latest release from a github repo. as long as it gets tagged as release. I like to be able to pull down the latest version of a release for specific code in automated builds. This helps that. Use curl to get the JSON response for the latest release Use grep to find the line containing file URL Use cut and tr to extract the URL Use wget to download it...

1 min · 127 words · Mike Fettis

keeping secrets out of git

git-secrets I came across this handy piece of software today, called git-secrets. It is made by awslabs and it acts as a git-hook that will stop you form doing stupid things. https://github.com/awslabs/git-secrets

1 min · 32 words · Mike Fettis

qmk-animations

#QMK animation Having a keyboard with an oled screen means that you can add things to it. This cute little bongo cat animations or other things. This lets you create all sorts of animations https://githubmemory.com/repo/AskMeAboutBirds/qmk-oled-animation-compressor

1 min · 35 words · Mike Fettis

sql server terminal

sql server I needed to connect to a sql db this morning and I didn’t have a client. Docker to the rescue! docker run -it mysql /bin/bash mysql -u <myuser> -p -h <myhost> <mydatabase> and done. when using the -p flag it will prompt you for the password instead of having it in the terminal. Simple easy and connected.

1 min · 59 words · Mike Fettis

sudo make me a sandwich

sudo make me a sandwich, then I’ll pwn your fridge Sudo is a program for Unix-like computer operating systems that allows users to run programs with the security privileges of another user. wikipedia-sudo Let’s say that we have a folder named /luggage/. The luggage is carrying some incredibly valuable things. Rincewind and twoflower are two users who have been traveling with this luggage for sometime. Because, rincewind doesn’t want twoflower to read the octavo, but is fine if he looks at the camera, both which are located in the in the luggage....

4 min · 824 words · Mike Fettis

using netcat as a portscanner

netcat netcat can work like a portscanner. If it is the only tool that you have you make do. this is going to scan localhost across all of the ports nc -zv 127.0.0.1 1-65535

1 min · 34 words · Mike Fettis