Skip to content

Instantly share code, notes, and snippets.

View mikeage's full-sized avatar

Mike Miller mikeage

View GitHub Profile
@mikeage
mikeage / mikemi.sh
Last active February 15, 2024 08:01
if [[ $0 != -* ]]
then
echo "Error: run this script with "source $0.sh" instead of running it directly"
exit 1
fi
shopt -s histappend
export PS1='[$? \[$(tput setaf 6)\]${SSH_USER:-???} \u@\h\[\e[0m\] \[\e[91m\]\w\[\e[0m\]]\$ '
export KUBECONFIG=/root/.kube/config_${SSH_USER}
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward' ; history -r
FOOOOOO_BARRRR_BAZZZZZ
FOOOOOO
@mikeage
mikeage / install_tmp_essentials.sh
Created February 18, 2021 17:35
Install TMP Essential Resources
mkdir tmp.plugin
wget -q https://download.packages.unity.com/com.unity.textmeshpro/-/com.unity.textmeshpro-2.0.1.tgz -O tmp.plugin/plugin.tgz
tar -C tmp.plugin -xzf tmp.plugin/plugin.tgz
mkdir tmp.package
tar -C tmp.package -xzf 'tmp.plugin/package/Package Resources/TMP Essential Resources.unitypackage'
for pn in tmp.package/*/pathname; do
id=${pn%/*}
id=${id#*/}
p=$(head -1 $pn)
d=${p%/*}
@mikeage
mikeage / stream_comments.py
Created February 24, 2020 07:47
Stream comments from users you follow on reddit (similar to the old 'friends' API)
import praw
import argparse
import logging
subreddit_cache = {}
def print_comment(comment):
global subreddit_cache
try:
@mikeage
mikeage / workshop
Created January 6, 2020 13:16
workshop
test
@mikeage
mikeage / Dockerfile.sg166a
Last active November 25, 2018 10:22
Scale work
# docker build -t dev-registry-us-east-1.phx.cisco.com:5000/sg/sg:20181018152140-3.80.13-166a -f Dockerfile.sg166a .
# docker push dev-registry-us-east-1.phx.cisco.com:5000/sg/sg:20181018152140-3.80.13-166a
FROM dev-registry-us-east-1.phx.cisco.com:5000/sg/sg:20181018152140-3.80.13-166
RUN sed -e 's/worker_processes.*;/worker_processes 2;/' -i /opt/cisco/session-guard/nginx/conf/nginx.conf
@mikeage
mikeage / functions.sh
Last active September 22, 2019 05:24 — forked from junegunn/functions.sh
Key bindings for git with fzf (https://junegunn.kr/2016/07/fzf-git/)
# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
fzf-down() {
fzf-tmux --height 50% "$@" --border
}