Skip to content

Instantly share code, notes, and snippets.

Andrew Hayes AndrewRussellHayes

Block or report user

Report or block AndrewRussellHayes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AndrewRussellHayes
AndrewRussellHayes / b2d_imac_rebuild.sh
Last active Aug 29, 2015
rebuild imac boot2docker
View b2d_imac_rebuild.sh
b2d(){
boot2docker $1;
}
b2d poweroff
b2d delete
#b2d init
b2d init \
--memory=5734 \
--disksize=10000
View new_ssh.sh
#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"]
@AndrewRussellHayes
AndrewRussellHayes / boot_10_10.sh
Last active Aug 29, 2015
This will create an OSX 10.10 bootable drive. NOTE: name the drive volume 'Untitled' From http://www.macworld.com/article/2367748/how-to-make-a-bootable-os-x-10-10-yosemite-install-drive.html
View boot_10_10.sh
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Yosemite.app --nointeraction
@AndrewRussellHayes
AndrewRussellHayes / fix_git_vi.sh
Created Nov 10, 2014
fixes git bug: "error: There was a problem with the editor 'vi'." probably an error with the vimrc but who cares this fixes it. this happens when vi/vim exits with a 'non 0' exit code. From http://tooky.co.uk/there-was-a-problem-with-the-editor-vi-git-on-mac-os-x/
View fix_git_vi.sh
$ git config --global core.editor /usr/bin/vim
View git_rm_confilict.sh
find . -type f -name "* conflicted copy*" -exec rm -f {} \;
@AndrewRussellHayes
AndrewRussellHayes / Docker_shortcuts.sh
Created Nov 4, 2014
list of lines in my bashrc to make docker use much more simple
View Docker_shortcuts.sh
#docker stuff.. move into own file
#Docker alias's
alias dpsa="docker ps -a"
alias dps="docker ps"
#docker envs
export DOCKER_HOST=tcp://192.168.59.103:2376
export DOCKER_CERT_PATH=/Users/andrew/.boot2docker/certs/boot2docker-vm
export DOCKER_TLS_VERIFY=1
echo ".bashrc boot2docker command results: (Should see 3 lines:)"
(boot2docker shellinit)
View boot2dockerSSH.sh
SSH into VM
$ boot2docker ssh
Boot2Docker auto logs in using the generated SSH key, but if you want to SSH into the machine manually (or you're not using a boot2docker managed VM), the credentials are:
user: docker
pass: tcuser
@AndrewRussellHayes
AndrewRussellHayes / build.sh
Last active Oct 21, 2015
building an image called andrewrussellhayes/dev with tag of 0.1
View build.sh
docker build -t andrewrussellhayes/dev:0.1 ./.
@AndrewRussellHayes
AndrewRussellHayes / start_docker_centos_detached_Bash.sh
Last active Aug 29, 2015
start a docker centos image detached with stdin and a pseudo-tty to keep it running like a vm until bash is killed
View start_docker_centos_detached_Bash.sh
docker run -t -i -d centos /bin/bash
@AndrewRussellHayes
AndrewRussellHayes / Boot2Docker_Rebuild.sh
Last active Aug 29, 2015
boot2docker vm rebuild. this gets rid of images that wont delet
View Boot2Docker_Rebuild.sh
b2d(){
boot2docker $1;
}
b2d poweroff
b2d delete
b2d init
b2d up
You can’t perform that action at this time.