Skip to content

Instantly share code, notes, and snippets.

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQD03paKcENYBj7FJHuHHue5SC8+smHIV2Ok251xe4LYD9YItV+CJe6q3UYTvBsMofextBHyK/VU1JT5XkTWrFSKaZaMT2mLbElKrEy9uZBylQSEzm4HYrc2LFnYwDeFT6cbIvo3QxwABW2OMFn6fFopMPRvrVBlSL7RdX9rvDzIl3ylv1CB8YizDtqLFrdQzeMrSa/47ffgxmJ7YoxqACcPQ3vI3Vk8tcphEmUYXcdG8QQ4qNyKhPz7s27as1Lq2wM25rLRLyTxQ+Sh/hFRQDLTNJ2aZMuqWG3fUQA+qZp4D4gARvE5lw5c1MrMt4iPLO/gSeILbvMMlKX10Soc49rUokw0nEAGrjwyD2rmrS+fqDfSHxO4bQbw86NAAdrvbAGmJ9FRwggHQc+t8WXXlPD2b0lBQ9HwKwDVFNrljqHX2tBsp984VrqEvPPmGGNCU6d8kmVhFNmiTxSXrCUqw0IFyohoUs161qOQxoUvmy4T0hQ2mBBp45nfUNQ1sVA6CtPBQH23SHYR3CmmKEWvZevPP+E9XgNjEikeLLVT9UT/gJ9RhmVACcIG2SYYnuC6GooKFzvseF0eETDqOy8M0ChpAPytZ7XT4tfX/yM0RpAyhdozhfvbYXSOBy6GryFPU1s64aZLwvLwdGlAehDPRQohVURAllc3XgP6i/l3R5jy9w== [email protected]
@james-huang
james-huang / .bash_profile
Last active May 17, 2016 01:26
bash behaviour
PROMPT_COMMAND='DIR=`pwd|sed -e "s!$HOME!~!"`; if [ ${#DIR} -gt 30 ]; then CurDir=${DIR:0:12}...${DIR:${#DIR}-15}; else CurDir=$DIR; fi'
PS1="[\$CurDir] \$ "
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
@james-huang
james-huang / git_lg.sh
Created May 17, 2016 01:24
1 liner git log
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@james-huang
james-huang / global_entry_scrapper.py
Last active March 17, 2017 20:46
global entry appointment schedule monitior
"""
This is a script to help James find a global entry appointment before September because
the whole tsa global entry thing is fucked.
To use:
sudo pip install scrapy
scrapy runspider global_entry_scrapper.py
To set up automated email notifications:
#!/bin/bash
# First argument is the output directory. Use current directory if this is not specified.
outputdir="."
sshagentpids=$(ps aux|grep "[s]sh-agent" | awk '{print $2}')
counter=0
# Iterate through the pids for each ssh-agent process
for pid in $sshagentpids; do
stacks=$(vmmap $pid|grep Stack)