This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FOOOOOO_BARRRR_BAZZZZZ | |
FOOOOOO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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%/*} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import praw | |
import argparse | |
import logging | |
subreddit_cache = {} | |
def print_comment(comment): | |
global subreddit_cache | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GIT heart FZF | |
# ------------- | |
is_in_git_repo() { | |
git rev-parse HEAD > /dev/null 2>&1 | |
} | |
fzf-down() { | |
fzf-tmux --height 50% "$@" --border | |
} |