Skip to content

Instantly share code, notes, and snippets.

> zsh -f # start a "clean" version of zsh (without your startup files)
print $ZSH_VERSION
Tips Home
Daily ZSH Tip on Twitter *N*
ZSH TIPS on Twitter Archive
http://www.zsh.org/mla/ Searchable Mailing List Archive
http://grml.org/zsh/zsh-lovers.html
http://zsh.sourceforge.net/Doc/ Everything? *C*
Zsh-Reference-Card *C*
http://zshwiki.org/
@AndrewRussellHayes
AndrewRussellHayes / b2d_Air_Rebuild.sh
Last active August 29, 2015 14:09
boot2docker air rebuild
b2d(){
boot2docker $@;
}
b2d poweroff
b2d delete
#b2d upgrade #if update desired
b2d init --disksize=10000
b2d up
for remote in `git branch -r | grep -v master `; do git checkout --track $remote ; done
git push origin --delete <branchName>
or
git push origin :<branchName>
@AndrewRussellHayes
AndrewRussellHayes / fetch_all_git_branches.sh
Last active August 29, 2015 14:09
fetch all branches from origin and track them as remote branches eg 'origin/branchname' From http://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches
for remote in `git branch -r`; do git branch --track $remote; done
git fetch --all
git pull --all
@AndrewRussellHayes
AndrewRussellHayes / ubuntu_memleak_bugfix.sh
Created November 15, 2014 21:29
fix for ubuntu error: "no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory"
sudo apt-get remove libpam-smbpass
cat ~/.ssh/id_rsa.pub | ssh user@123.45.56.78 "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
@AndrewRussellHayes
AndrewRussellHayes / mountshare.sh
Last active August 29, 2015 14:09
mount share boot2docker virtualbox
sudo mount -t vboxsf -o dmode=0777,fmode-0777 HayesCloud /HayesCloud
@AndrewRussellHayes
AndrewRussellHayes / b2d_imac_rebuild.sh
Last active August 29, 2015 14:09
rebuild imac boot2docker
b2d(){
boot2docker $1;
}
b2d poweroff
b2d delete
#b2d init
b2d init \
--memory=5734 \
--disksize=10000
@AndrewRussellHayes
AndrewRussellHayes / new_ssh.sh
Last active August 29, 2015 14:09
SSH keygen steps
#make ssh directory
mkdir ~/.ssh
#change mode to 700
chmod 700 ~/.ssh
#Generate new Key
ssh-keygen -b 2048 -t rsa -f [keyname] -P ["password"] # "" for passwordless key.. this is unsafe
#Default Key.
ssh-keygen -b 2048 -t rsa -f id_rsa -P ["password"]