Skip to content

Instantly share code, notes, and snippets.

View rms1000watt's full-sized avatar

Ryan M Smith rms1000watt

View GitHub Profile
@rms1000watt
rms1000watt / split-postgres-logs.sh
Last active December 11, 2020 21:28
Split Postgres logs downloaded from RDS
#!/usr/bin/env bash
split -b 1000m postgresql.log.2020-12-11-03 postgresql.log.2020-12-11-03
# https://github.com/darold/pgbadger
pgbadger postgresql.log.2020-12-11-03am
@rms1000watt
rms1000watt / install-helm2-helmfile.sh
Last active December 8, 2020 22:35
Install Helm2 and Helmfile
# Cleanup
brew uninstall --force helmfile helm
# Install helmfile latest with latest helm
brew install helmfile
# Install an old version of helm2
curl https://get.helm.sh/helm-v2.14.3-darwin-amd64.tar.gz
tar -zxvf helm-v2.14.3-darwin-amd64.tar.gz
cp darwin-amd64/helm /usr/local/bin/helm2
@rms1000watt
rms1000watt / change-version-of-kubectl.sh
Created November 11, 2020 19:12
Change Version of kubectl
#!/usr/bin/env bash
brew uninstall kubernetes-cli
# check here to find the version you want:
# https://github.com/Homebrew/homebrew-core/commits/master/Formula/kubernetes-cli.rb
# kubectl 1.15.3
curl https://raw.githubusercontent.com/Homebrew/homebrew-core/7ee32113351bbd913b90f9578bcd52dfe85d675e/Formula/kubernetes-cli.rb -o kubernetes-cli.rb
brew install kubernetes-cli.rb
@rms1000watt
rms1000watt / rpi-infinite-video-loop-startup.sh
Created October 26, 2020 17:06
Raspberry Pi Infinite Video Loop on Startup
cat << EOF > /home/pi/.config/lxsession/LXDE-pi/autostart
@xset -dpms
@xset s off
/usr/bin/omxplayer --loop /home/pi/video.mp4
EOF
@rms1000watt
rms1000watt / remove-schedulingdisabled-k8s-nodes.sh
Created September 25, 2020 22:46
Remove SchedulingDisabled from k8s nodes
kubectl uncordon <node name>
@rms1000watt
rms1000watt / download-from-ipod-to-mac.sh
Last active September 14, 2020 18:34
Download all your songs from your old iPod to your Mac
#!/usr/bin/env bash
output_dir=~/Downloads/ipod
map_dir="${output_dir}/map"
mkdir -p "${map_dir}" &> /dev/null
if [[ $(uname -s) != "Darwin" ]]; then
echo "ERROR: this only works for OS X"
exit 1
@rms1000watt
rms1000watt / mbillz-live-sound-synth-recommendations.txt
Created September 8, 2020 17:39
https://github.com/mbillz Recommendations for Live Looping, Synths, Sounds, Tech, Drum machines for beginners (me)
# Courtesy of https://github.com/mbillz
Okay so here is a brain dump:
Drum machine only: Model: Samples - you can really quickly spin up some cool and complex beats on this. It's basically a dumbed down version of the Digitakt with more knobs. You could pull off some decent bass lines on it, but I think it excels at just really quickly doing drums. It's pretty cheap too which is nice.
Drum machine + sampling weird sounds: Digitakt - this has a ton more control than the Model: Samples gives you, but with that comes more complexity. The biggest benefit is that it allows you to plug something in and sample it and then modify the sound using filters and envelopes and an LFO. There is a lot more to learn here, but I personally think it's worth it. You can definitely sample a bass note and get some pretty good bass lines going, but I wouldn't say it excels at this.
Synth + bass sounds: Digitone - If you want a groovebox / portal solution that doesn't have sampling but you can do crazy synth stuff with, this thi
@rms1000watt
rms1000watt / k8s-list-apis.sh
Created August 31, 2020 22:31
K8s List APIs
➜ ~ kubectl api-resources
NAME SHORTNAMES APIGROUP NAMESPACED KIND
bindings true Binding
componentstatuses cs false ComponentStatus
configmaps cm true ConfigMap
endpoints ep true Endpoints
events ev true Event
limitranges limits true LimitRange
namespaces ns false Namespace
nodes no false Node
@rms1000watt
rms1000watt / nice-bash-headers.sh
Created August 19, 2020 18:37
Nice Bash Headers
#!/usr/bin/env bash
# Courtesy of: https://github.com/vincentcr
shopt -s inherit_errexit 2>/dev/null
set -o pipefail -o nounset -o errexit
@rms1000watt
rms1000watt / local-list-docker-containers-and-ip.sh
Created August 11, 2020 22:53
locally list docker containers and their ip addresses
#!/usr/bin/env bash
# Courtesy: https://stackoverflow.com/a/20686101
docker ps -a | grep -v CONTAINER | cut -d' ' -f1 | xargs docker inspect -f '{{.Config.Image}}{{"\t"}}{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'