I hereby claim:
- I am petehalverson on github.
- I am petehalverson (https://keybase.io/petehalverson) on keybase.
- I have a public key whose fingerprint is 35FD 4579 8514 D2F5 DE4F FF11 CC14 405A 60A1 7282
To claim this, I am signing this object:
| #!/bin/bash | |
| # List host IDs for running containers | |
| for i in $(docker ps -q); do docker inspect --format '{{ .State.Pid }}' $i; done | |
| # Swap usage | |
| # awk '/VmSwap/{print $2 " " $3}' /proc/<PID>/status |
| #!/bin/sh | |
| # Shell script to update namecheap.com dynamic dns | |
| # for a domain to your external IP address | |
| HOSTNAME=yoursubdomain | |
| DOMAIN=yourdomainname.com | |
| PASSWORD=y0urp455w0rd | |
| IP=`curl -s echoip.com` |
| #!/bin/bash | |
| # Tag your October CMS plugin's repo with versions. | |
| # Run from plugin working directory | |
| if [ ! -d .git ]; then | |
| echo "Not a git repo" && exit 1; | |
| elif [ ! -f updates/version.yaml ]; then | |
| echo "Plugin version.yaml not found" && exit 1; | |
| fi |
I hereby claim:
To claim this, I am signing this object:
| git_branch() { | |
| local green=$(tput setaf 10) | |
| local yellow=$(tput setaf 11) | |
| local reset=$(tput sgr0) | |
| local branch= | |
| local gitlabel="git." | |
| local sep="| " | |
| if [ -d .git ]; then | |
| status=$(git status 2> /dev/null) |
| version: '2.1' | |
| services: | |
| php: | |
| image: php:apache | |
| ports: | |
| - 80:80 | |
| volumes: | |
| - ./.:/var/www/html |
| # add to .bashrc, .bash_profile, ~/.profile | |
| www() { | |
| cd ~/www/"$@" | |
| } | |
| _www() { | |
| local cur="${COMP_WORDS[COMP_CWORD]}" | |
| COMPREPLY=( $(compgen -W "$(ls ~/www)" -- $cur) ) | |
| } |
| # add to .bashrc, .bash_profile, ~/.profile | |
| git_docker_env() { | |
| branch= | |
| gitlabel="git." | |
| dockerlabel="docker." | |
| sep="| " | |
| if [ -d .git ]; then | |
| status=$(git status 2> /dev/null) | |
| branch="$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')" | |
| if [[ $( echo $status | grep "branch is ahead") ]]; then |
| # add to .bashrc, .bash_profile, ~/.profile | |
| dockenv() { | |
| command -v "docker-machine" >/dev/null 2>&1 && { | |
| if [ $1 = 'unset' -o $1 = '-u' ]; then | |
| eval $(docker-machine env -u) | |
| else | |
| eval $(docker-machine env "$1") | |
| if ! [ $1 = 'unset' -o $1 = '-u' ]; then | |
| docker-machine ip $1 | tr -d '\n' | pbcopy | |
| fi |
| # Sync docker clock | |
| alias dockerclock='docker run --rm --privileged alpine hwclock -s' | |
| # Kill all running containers. | |
| alias dockerkillall='docker kill $(docker ps -q)' | |
| # stop all running containers | |
| alias dockerstop='docker stop $(docker ps -a -q)' |