bash-ctrl+r

Bash ctrl+r Bash has a special “recall” mode you can use to search for commands you’ve previously run: Ctrl+R: Recall the last command matching the characters you provide. Press this shortcut and start typing to search your bash history for a command. Ctrl+O: Run a command you found with Ctrl+R. Ctrl+G: Leave history searching mode without running a command. keyboard-shortcuts-for-bash-command-shell

2018-11-02 · 1 min · 60 words · Mike Fettis

systemd-restarts-friday-links

Systemd restart policy sometimes services die. sometimes there is not a better option because of the situatuion that you are in, and you just need to wait it out and then restart the service… I know it isn’t ideal and that there should be better ways around having to do this but hey ¯_(ツ)_/¯ [Service] Type=simple Restart=always RestartSec=3 ExecStart=/path/to/script In my case I needed to wait it out and restart the service 2 hours after it died....

2018-11-02 · 2 min · 221 words · Mike Fettis

splunk-hec-python

Splunk HTTP collector python script Hey the http collector is awesome so let use it in python to send things to stuff… This is going to just take a dictionary as event data and then pass that to the http collector using only the request library . You will need to have a collector enabled for splunk and a token generated. #!/usr/bin/env python import time import requests import urllib3 ##turns off the warning that is generated below because using self signed ssl cert urllib3....

2018-10-25 · 2 min · 255 words · Mike Fettis

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-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