Skip to content

Instantly share code, notes, and snippets.

@MartinAhrer
MartinAhrer / gist:783584af2453c990201fc58db223c09a
Created October 5, 2017 07:10
alias for dockerized asciidoctor-pdf
alias asciidoctor-pdf='docker run --rm -v ${PWD}:/documents/ --workdir=/documents asciidoctor/docker-asciidoctor asciidoctor-pdf lab-exercises.adoc'
@MartinAhrer
MartinAhrer / remote-disk-mount.sh
Created April 28, 2017 06:40
Find mount path for remote disk
mount | grep "samoa._smb._tcp.local/Disk" | awk '{print $3}'
@MartinAhrer
MartinAhrer / .zshrc
Last active January 14, 2018 17:38
docker-mac-zsh-completion
# Docker completion
fpath=( ~/.zshell/completion "${fpath[@]}" )
autoload -Uz compinit && compinit -i
@MartinAhrer
MartinAhrer / permissions.sh
Last active March 24, 2017 19:22
Fixing permissions
chmod 0600 $HOME/.config/doctl/*.yaml
chmod 0700 $HOME/.ssh
chmod 0600 $HOME/.ssh/*
chmod 0644 $HOME/.ssh/*.pub
@MartinAhrer
MartinAhrer / docker-mac-bash-completion.sh
Last active May 19, 2019 16:46
docker for mac bash support
# Install Docker for Mac first
cd /usr/local/etc/bash_completion.d
ln -s /Applications/Docker.app/Contents/Resources/etc/docker.bash-completion
ln -s /Applications/Docker.app/Contents/Resources/etc/docker-machine.bash-completion
ln -s /Applications/Docker.app/Contents/Resources/etc/docker-compose.bash-completion
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install awscli bash-completion cdrtools gettext git gnu-getopt httpie jq node openssl readline s3cmd ssh-copy-id terraform tmux wget tree xmlstarlet
@MartinAhrer
MartinAhrer / gist:9bac93c5811f9ea21ab8c70ff03bbf04
Created January 31, 2017 08:57
Mac OSX El Capitan USB Media
sudo createinstallmedia --volume "/Volumes/ElCapitan" --applicationpath "/Volumes/Disk/Temp/Software/Install OS X El Capitan.app"
@MartinAhrer
MartinAhrer / git-setup.sh
Last active January 19, 2017 09:38
git setup on new accounts
git config --global core.autocrlf input
git config --global user.email "<EMAIL-ADDRESS>"
git config --global user.name "Martin Ahrer"
git config --global push.default simple
git config --global branch.autosetuprebase always
git config --global credential.helper cache # eventually use osxkeychain
@MartinAhrer
MartinAhrer / symlinks.sh
Last active March 24, 2017 19:22
$HOME Symlinks
@MartinAhrer
MartinAhrer / gist:3a6aedd2005dc3093d4f594657d63e6f
Last active February 19, 2017 18:34
Find all build directories
find . -name "build" -type d -depth 3
find . -name "node_modules" -type d -depth 3
# -exec <COMMAND> {} \;