2017-03-02 docker, bash, coffee

docker reboot Every once and a while for prem docker installation a reboot is needed. There are some tools out there that can most likely do this, but today a quick and dirty bash script solved the problem. Step one dump all the running container IDS, today there were about 23 containers running. docker ps -q >>ids Next reboot sudo reboot Finally the bash script to quickly spin them all back up....

2017-03-02 · 1 min · 154 words · Mike Fettis

2017-03-03 ssh, bash

bash ssh keys Good to remember if you have ssh keys setup the .ssh folder is 700 and the authorized_keys file is 644 SSH keys are a public and private key that you store on a host that you are going to ssh in to. This key allwos fo r aecure login without having to relay a password through the terminal. It is a more secure form of authentication that the basic username and password....

2017-03-02 · 1 min · 107 words · Mike Fettis

2017-02-28 ELK? aws and openvpn

ELK There is this thing called elk, and I have no idea how to use it. I don’t even know where to being with ELK. I have been using splunk for years, I know how ot do all of this in splunk. But because the data I need is in elk and i cannot easily get it in to splunk I will have to at least start with elk and then go from there....

2017-02-28 · 1 min · 207 words · Mike Fettis

2017-03-01 js, karma, protractor, npm, bash, akamai

javascript and node No more just adding things to the package.json HA! To add an entry to your package.json's dependencies: npm install <package_name> --save To add an entry to your package.json's devDependencies: npm install <package_name> --save-dev version numbers and what they actually mean https://docs.npmjs.com/getting-started/semantic-versioning Patch releases: 1.0 or 1.0.x or ~1.0.4 Minor releases: 1 or 1.x or ^1.0.4 Major releases: * or x testing How fast can I fill in all the holes for TDD… not fast enough apparently ;)...

2017-02-28 · 2 min · 330 words · Mike Fettis

2017-02-27 nginx, splunk, docker, git

Splunk and nginx Doing some splunkjs work from a docker container, and hosting it out of nginx, which means I needed to configure a proxy pass using some load balancing in order to access the splunk cluster, this was a little tricky because of session persistence and https. nginx load balancing Luckily there are some good pslunk blogs out there that help out configuring-nginx-with-splunk-rest-api-sdk-compatibility and some good reading about splunkjs read them both using-the-splunkjs-stack-part-1...

2017-02-27 · 1 min · 180 words · Mike Fettis

2017-02-26 google, analytics, fitbit, dod, open source

February in Chicago can be less than sunny, although the sun came out today google analytics seems pretty easy Log in to the google page and create a site google page. Then add the tracking code to the jekyll theme and bam site tracking. fitbit There has been research done around the accuracy of optical heart rate monitors. I knew they were not accurate up past 150 bpm. This is because the blood is flowing too fast for the sensor to keep up with....

2017-02-26 · 2 min · 384 words · Mike Fettis

2017-02-25 ithub, git, jekyll, ruby, mac, docker, raspberrypi

Productive Saturday rant Been cranking away at my laptop from 630-830 this morning, and realizing that my ancient mac book air battery which was already replace once, is just a poor shadow of what it should be. I’m only going to get about 3 hours out of this battery before it dies. Which is sad because i really wanted to get a new laptop this year but mac did not really give us any options....

2017-02-25 · 3 min · 501 words · Mike Fettis

2017-03-14 macOS, docker, ctop

I missed a few day because I was on vacation. I tihnk I want to try and add more context and text around these entires but today was choas and one fire from the next, therefore I didn’t have a chance to really dig in to learning. Sadly fire fighting is turning into too much of my everday, this needs to get chagned so that I can spend more time building tools and learning about things....

1 min · 116 words · Mike Fettis

2018-02-27 shasum_markdown

shasum Getting a shasum on something… useful so lets do it with this shasum -a 256 <filename> mastering markdown n Now if only i could keep all of this in my head mastering-markdown

1 min · 33 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

pythonic list find

finding an item in a list python can do a lot of smart things, lets use the python way of finding items in a list. #python 3 tags=[ { "Key": "CreationDate", "Value": "201904011158" }, { "Key": "Name", "Value": "mymagicserver" }, { "Key": "aws:autoscaling:groupName", "Value": "my-rad-asg" }, { "Key": "Environment", "Value": "cloudy" }, { "Key": "name", "Value": "john" }, { "Key": "Department", "Value": "sporting goods" }, { "Key": "Auto-Off", "Value": "no" } ] data = list(filter(lambda x: x["Key"] == "aws:autoscaling:groupName" , tags)) print(data[0]["Value"]) ##brute force way: def bruteforce(mylist) for item in mylist: if item["Key"] == "aws:autoscaling:groupName": return item["Value"] print(bruteforce(tags))

1 min · 98 words · Mike Fettis

roasting log

Roasting log |-+-+-| 3/16 inside costa rican sonora temp:68 start weight: 4.0 oz end weight: 3.45 oz watt/time temp - time preheat: 275 325 - 7:15 650 4min 200 - 0:30 350 - 8:50 800 4min 225 - 1:15 375 - 9:50 250 - 1:45 400 - 11:10 drop 11:10 275 - 3:30 300 - 5:00 |-+-+-|...

2 min · 334 words · Mike Fettis