Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Miller mikeage

View GitHub Profile
@mikeage
mikeage / functions.sh
Last active Sep 22, 2019 — forked from junegunn/functions.sh
Key bindings for git with fzf (https://junegunn.kr/2016/07/fzf-git/)
View functions.sh
# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
fzf-down() {
fzf-tmux --height 50% "$@" --border
}
View Dockerfile.sg166a
# 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 / stream_comments.py
Created Feb 24, 2020
Stream comments from users you follow on reddit (similar to the old 'friends' API)
View stream_comments.py
import praw
import argparse
import logging
subreddit_cache = {}
def print_comment(comment):
global subreddit_cache
try:
@mikeage
mikeage / install_tmp_essentials.sh
Created Feb 18, 2021
Install TMP Essential Resources
View install_tmp_essentials.sh
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%/*}