Revisions
-
jgrodziski revised this gist
May 28, 2023 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,10 +9,10 @@ # # # # Usage: # # daws <svc> <cmd> <opts> : aws cli in docker with <svc> <cmd> <opts> # # dc : docker compose # # dcu : docker compose up -d # # dcd : docker compose down # # dcr : docker compose run # # dex <container>: execute a bash shell inside the RUNNING <container> # # di <container> : docker inspect <container> # # dim : docker images # @@ -64,7 +64,7 @@ function drun-fn { } function dcr-fn { docker compose run $@ } function dsr-fn { @@ -86,7 +86,7 @@ function dlab { } function dc-fn { docker compose $* } function d-aws-cli-fn { @@ -99,8 +99,8 @@ function d-aws-cli-fn { alias daws=d-aws-cli-fn alias dc=dc-fn alias dcu="docker compose up -d" alias dcd="docker compose down" alias dcr=dcr-fn alias dex=dex-fn alias di=di-fn -
jgrodziski revised this gist
Mar 22, 2021 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,10 +40,11 @@ function dip-fn { for DOC in `dnames-fn` do IP=`docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}} {{end}}' "$DOC"` OUT+=$DOC'\t'$IP'\n' done echo -e $OUT | column -t unset OUT } function dex-fn { -
jgrodziski revised this gist
Jul 21, 2020 . 1 changed file with 12 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,6 +8,7 @@ # wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash # # # # Usage: # # daws <svc> <cmd> <opts> : aws cli in docker with <svc> <cmd> <opts> # # dc : docker-compose # # dcu : docker-compose up -d # # dcd : docker-compose down # @@ -23,7 +24,6 @@ # drmc : remove all exited containers # # drmid : remove all dangling images # # drun <image> : execute a bash shell in NEW container from <image> # # dsr <container>: stop then remove <container> # # # ############################################################################ @@ -46,7 +46,7 @@ function dip-fn { echo $OUT|column -t } function dex-fn { docker exec -it $1 ${2:-bash} } @@ -88,7 +88,16 @@ function dc-fn { docker-compose $* } function d-aws-cli-fn { docker run \ -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \ -e AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION \ -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \ amazon/aws-cli:latest $1 $2 $3 } alias daws=d-aws-cli-fn alias dc=dc-fn alias dcu="docker-compose up -d" alias dcd="docker-compose down" alias dcr=dcr-fn -
jgrodziski revised this gist
Jul 21, 2020 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,6 +23,7 @@ # drmc : remove all exited containers # # drmid : remove all dangling images # # drun <image> : execute a bash shell in NEW container from <image> # # dsp : docker system prune --all # # dsr <container>: stop then remove <container> # # # ############################################################################ @@ -102,4 +103,5 @@ alias dpsa="docker ps -a" alias drmc=drmc-fn alias drmid=drmid-fn alias drun=drun-fn alias dsp="docker system prune --all" alias dsr=dsr-fn -
jgrodziski revised this gist
Jul 21, 2020 . 1 changed file with 38 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,8 +8,10 @@ # wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash # # # # Usage: # # dc : docker-compose # # dcu : docker-compose up -d # # dcd : docker-compose down # # dcr : docker-compose run # # dex <container>: execute a bash shell inside the RUNNING <container> # # di <container> : docker inspect <container> # # dim : docker images # @@ -33,17 +35,18 @@ function dnames-fn { } function dip-fn { echo "IP addresses of all named running containers" for DOC in `dnames-fn` do IP=`docker inspect $DOC | grep -m3 IPAddress | cut -d '"' -f 4 | tr -d "\n"` OUT+=$DOC'\t'$IP'\n' done echo $OUT|column -t } function dex-fn { docker exec -it $1 ${2:-bash} } function di-fn { @@ -55,15 +58,39 @@ function dl-fn { } function drun-fn { docker run -it $1 $2 } function dcr-fn { docker-compose run $@ } function dsr-fn { docker stop $1;docker rm $1 } function drmc-fn { docker rm $(docker ps --all -q -f status=exited) } function drmid-fn { imgs=$(docker images -q -f dangling=true) [ ! -z "$imgs" ] && docker rmi "$imgs" || echo "no dangling images." } # in order to do things like dex $(dlab label) sh function dlab { docker ps --filter="label=$1" --format="{{.ID}}" } function dc-fn { docker-compose $* } alias dc="dc-fn" alias dcu="docker-compose up -d" alias dcd="docker-compose down" alias dcr=dcr-fn alias dex=dex-fn alias di=di-fn alias dim="docker images" @@ -72,7 +99,7 @@ alias dl=dl-fn alias dnames=dnames-fn alias dps="docker ps" alias dpsa="docker ps -a" alias drmc=drmc-fn alias drmid=drmid-fn alias drun=drun-fn alias dsr=dsr-fn -
Jérémie Grodziski revised this gist
Nov 5, 2016 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,6 +21,7 @@ # drmc : remove all exited containers # # drmid : remove all dangling images # # drun <image> : execute a bash shell in NEW container from <image> # # dsr <container>: stop then remove <container> # # # ############################################################################ @@ -57,6 +58,10 @@ function drun-fn { docker run -it $1 /bin/bash } function dsr-fn { docker stop $1;docker rm $1 } alias dcu="docker-compose up -d" alias dcd="docker-compose down" alias dex=dex-fn @@ -69,4 +74,5 @@ alias dps="docker ps" alias dpsa="docker ps -a" alias drmc="docker rm $(docker ps --all -q -f status=exited)" alias drmid="docker rmi $( docker images -q -f dangling=true)" alias drun=drun-fn alias dsr=dsr-fn -
Jérémie Grodziski revised this gist
Nov 5, 2016 . No changes.There are no files selected for viewing
-
Jérémie Grodziski revised this gist
Nov 4, 2016 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ # # Usage: # # dcu : docker-compose up -d # # dcd : docker-compose down # # dex <container>: execute a bash shell inside the RUNNING <container> # # di <container> : docker inspect <container> # # dim : docker images # # dip : IP addresses of all running containers # @@ -20,6 +20,7 @@ # dpsa : docker ps -a # # drmc : remove all exited containers # # drmid : remove all dangling images # # drun <image> : execute a bash shell in NEW container from <image> # # # ############################################################################ @@ -52,6 +53,10 @@ function dl-fn { docker logs -f $1 } function drun-fn { docker run -it $1 /bin/bash } alias dcu="docker-compose up -d" alias dcd="docker-compose down" alias dex=dex-fn @@ -63,4 +68,5 @@ alias dnames=dnames-fn alias dps="docker ps" alias dpsa="docker ps -a" alias drmc="docker rm $(docker ps --all -q -f status=exited)" alias drmid="docker rmi $( docker images -q -f dangling=true)" alias drun=drun-fn -
Jérémie Grodziski revised this gist
Nov 4, 2016 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,6 +14,7 @@ # di <container> : docker inspect <container> # # dim : docker images # # dip : IP addresses of all running containers # # dl <container> : docker logs -f <container> # # dnames : names of all running containers # # dps : docker ps # # dpsa : docker ps -a # @@ -47,13 +48,17 @@ function di-fn { docker inspect $1 } function dl-fn { docker logs -f $1 } alias dcu="docker-compose up -d" alias dcd="docker-compose down" alias dex=dex-fn alias di=di-fn alias dim="docker images" alias dip=dip-fn alias dl=dl-fn alias dnames=dnames-fn alias dps="docker ps" alias dpsa="docker ps -a" -
Jérémie Grodziski revised this gist
Nov 4, 2016 . 1 changed file with 9 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,10 +13,12 @@ # dex <container>: execute a bash shell inside the running <container> # # di <container> : docker inspect <container> # # dim : docker images # # dip : IP addresses of all running containers # # dnames : names of all running containers # # dps : docker ps # # dpsa : docker ps -a # # drmc : remove all exited containers # # drmid : remove all dangling images # # # ############################################################################ @@ -27,7 +29,7 @@ function dnames-fn { done } function dip-fn { echo "IP addresses of all named running containers" for DOC in `dnames-fn` @@ -45,12 +47,15 @@ function di-fn { docker inspect $1 } alias dcu="docker-compose up -d" alias dcd="docker-compose down" alias dex=dex-fn alias di=di-fn alias dim="docker images" alias dip=dip-fn alias dnames=dnames-fn alias dps="docker ps" alias dpsa="docker ps -a" alias drmc="docker rm $(docker ps --all -q -f status=exited)" alias drmid="docker rmi $( docker images -q -f dangling=true)" -
Jérémie Grodziski revised this gist
Nov 4, 2016 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,8 @@ # wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash # # # # Usage: # # dcu : docker-compose up -d # # dcd : docker-compose down # # dex <container>: execute a bash shell inside the running <container> # # di <container> : docker inspect <container> # # dim : docker images # @@ -22,7 +23,7 @@ function dnames-fn { for ID in `docker ps | awk '{print $1}' | grep -v 'CONTAINER'` do docker inspect $ID | grep Name | head -1 | awk '{print $2}' | sed 's/,//g' | sed 's%/%%g' | sed 's/"//g' done } @@ -44,6 +45,8 @@ function di-fn { docker inspect $1 } alias dcu="docker-compose up -d" alias dcd="docker-compose down" alias dex=dex-fn alias di=di-fn alias dim="docker images" -
Jérémie Grodziski revised this gist
Nov 4, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function dnames-fn { for ID in `docker ps | awk '{print $1}' | grep -v 'CONTAINER'` do docker inspect $ID | grep Name | head -1 | awk '{print $2}' | sed 's/,//g' | sed 's%/%%g' | sed 's/"//g' done } @@ -37,7 +37,7 @@ function dipall-fn { } function dex-fn { docker exec -it $1 /bin/bash } function di-fn { -
Jérémie Grodziski revised this gist
Nov 3, 2016 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,9 @@ # ------- Useful Docker Aliases -------- # # # # # Installation : # # copy/paste these lines into your .bashrc or .zshrc file or just # # type the following in your current shell to try it out: # # wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash # # # # Usage: # # # -
Jérémie Grodziski revised this gist
Nov 3, 2016 . 1 changed file with 0 additions and 89 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,92 +1,3 @@ ############################################################################ # # # ------- Useful Docker Aliases -------- # -
Jérémie Grodziski revised this gist
Nov 3, 2016 . 1 changed file with 102 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,92 @@ export LANG="en_US.UTF-8" # Path to your oh-my-zsh configuration. ZSH=$HOME/.oh-my-zsh # Set name of the theme to load. # Look in ~/.oh-my-zsh/themes/ # Optionally, if you set this to "random", it'll load a random theme each # time that oh-my-zsh is loaded. ZSH_THEME="jgrodziski" # Example aliases # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" # Set to this to use case-sensitive completion # CASE_SENSITIVE="true" # Uncomment this to disable bi-weekly auto-update checks # DISABLE_AUTO_UPDATE="true" # Uncomment to change how often before auto-updates occur? (in days) # export UPDATE_ZSH_DAYS=13 # Uncomment following line if you want to disable colors in ls # DISABLE_LS_COLORS="true" # Uncomment following line if you want to disable autosetting terminal title. # DISABLE_AUTO_TITLE="true" # Uncomment following line if you want to disable command autocorrection # DISABLE_CORRECTION="true" # Uncomment following line if you want red dots to be displayed while waiting for completion # COMPLETION_WAITING_DOTS="true" # Uncomment following line if you want to disable marking untracked files under # VCS as dirty. This makes repository status check for large repositories much, # much faster. # DISABLE_UNTRACKED_FILES_DIRTY="true" # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) [[ -s `brew --prefix`/etc/autojump.sh ]] && . `brew --prefix` plugins=(git docker osx sublime mvn ssh-agent lein brew dircycle history jump z autojump zsh-syntax-highlighting) source $ZSH/oh-my-zsh.sh # Customize to your needs... setopt auto_cd cdpath=(~/Dropbox/projects/deepencity/product/backend ~/Dropbox/projects ~/Dropbox/projects/deepencity ~/Dropbox/projects/zenmodeler ~/Google\ Drive/ ~/Dropbox/projects/zm-websites/ ~/Dropbox/projects/deepencity/product ~/Dropbox/projects/deolan ~/Dropbox/projects/prez) export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH export PATH=$PATH:~/Dropbox/projects/deepencity/product/backend/javaByteCodeAnalyzer export PATH=$PATH:~/Dropbox/projects/deepencity/product/core/city export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)" export MONGO_HOME=/usr/local/Cellar/mongodb/3.0.7 export NEO4J_HOME=/usr/local/cellar/neo4j/2.3.1 export RABBITMQ_HOME=/usr/local/cellar/rabbitmq/3.4.2 export M2_HOME=/usr/local/Cellar/maven/3.3.9/libexec/ export GROOVY_HOME=/usr/local/opt/groovy/libexec export DATOMIC_HOME=/Users/jeremiegrodziski/datomic-pro-0.9.5067/ export DATOMIC_CONSOLE_HOME=/Users/jeremiegrodziski/datomic-console-0.1.199/ export SONAR_RUNNER_HOME=/usr/local/Cellar/sonar-runner/2.4/libexec #export LEIN_JAVA_CMD=/usr/local/Cellar/drip/2.2.4/bin/drip export LEIN_FAST_TRAMPOLINE=y export PATH="$HOME/.node/bin:$PATH" alias vi=vim alias t=todo.sh alias sbr="mvn spring-boot:run" alias jks="jekyll serve" #envfile="$HOME/.gnupg/gpg-agent.env" #if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then # eval "$(cat "$envfile")" #else # eval "$(gpg-agent --daemon --enable-ssh-support --write-env-file "$envfile")" #fi #export GPG_AGENT_INFO # the env file does not contain the export statement #export SSH_AUTH_SOCK # enable gpg-agent for ssh archey -c export GOPATH=$HOME/go export GOROOT=/usr/local/opt/go/libexec export PATH=$PATH:$GOPATH/bin export PATH=$PATH:$GOROOT/bin ############################################################################ # # # ------- Useful Docker Aliases -------- # @@ -7,12 +96,13 @@ # # # # Usage: # # # # dex <container>: execute a bash shell inside the running <container> # # di <container> : docker inspect <container> # # dim : docker images # # dipall : IP addresses of all running containers # # dnames : names of all running containers # # dps : docker ps # # dpsa : docker ps -a # # # ############################################################################ @@ -24,7 +114,7 @@ function dnames-fn { } function dipall-fn { echo "IP addresses of all named running containers" for DOC in `dnames-fn` do @@ -37,9 +127,14 @@ function dex-fn { docker exec -it $1 /bin/bash } function di-fn { docker inspect $1 } alias dex=dex-fn alias di=di-fn alias dim="docker images" alias dipall=dipall-fn alias dnames=dnames-fn alias dps="docker ps" alias dpsa="docker ps -a" -
Jérémie Grodziski created this gist
Nov 3, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,45 @@ ############################################################################ # # # ------- Useful Docker Aliases -------- # # # # # Installation : # # copy/paste these lines into your .bashrc or .zshrc file # # # # # Usage: # # # # dnames : names of all running containers # # dipall : IP addresses of all running containers # # dex <container>: execute a bash shell inside the running <container> # # dps : docker ps # # dpsa : docker ps -a # # di : docker images # # # ############################################################################ function dnames-fn { for ID in `docker ps | awk '{print $1}' | grep -v 'CONTAINER'` do docker inspect $ID | grep Name | head -1 | awk '{print $2}' | sed 's/,//g' | sed 's%/%%g' | sed 's/"//g' done } function dipall-fn { echo "IP address of all named running containers" for DOC in `dnames-fn` do IP=`docker inspect $DOC | grep -m3 IPAddress | cut -d '"' -f 4 | tr -d "\n"` echo $DOC : $IP done } function dex-fn { docker exec -it $1 /bin/bash } alias dnames=dnames-fn alias dipall=dipall-fn alias dex=dex-fn alias di="docker images" alias dps="docker ps" alias dpsa="docker ps -a"