Last active
March 8, 2022 20:48
-
-
Save antonkomarev/bd0b980473929f26bb66e8295a60739f to your computer and use it in GitHub Desktop.
Revisions
-
antonkomarev revised this gist
Mar 8, 2022 . 1 changed file with 14 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 @@ -30,3 +30,17 @@ d () { return 1 fi } # Git g () { if [ -f $1 ] ; then echo "Available commands:" echo " \e[32mg push-all\e[0m - Push all files" return 0 fi if [ $1 = "push-all" ]; then git add . && git commit -m "WIP" && git push fi } -
antonkomarev revised this gist
Mar 6, 2022 . 1 changed file with 9 additions and 5 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 @@ -3,23 +3,27 @@ # Docker d () { if [ -f $1 ] ; then echo "Available commands:" echo " \e[32md restart\e[0m - Restart docker service" echo " \e[32md stop\e[0m - Stop all docker containers" return 0 fi if [ $1 = "restart" ]; then echo "Killing docker processes" test -z "$(killall docker 2>/dev/null)" echo "Quitting Docker app" osascript -e 'quit app "Docker"' echo "Launching Docker app" open --background -a Docker return 0 elif [ $1 = "stop" ]; then echo "Stopping all docker containers" docker ps -q | xargs -L1 docker stop else echo "Unknown argument: $1" -
antonkomarev revised this gist
Mar 6, 2022 . 1 changed file with 10 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 @@ -5,16 +5,24 @@ d () { if [ -f $1 ] ; then echo 'Commands available:' echo '\e[32m d restart \e[0m' return 0 fi if [ $1 = "restart" ]; then echo 'Killing docker processes' test -z "$(killall docker 2>/dev/null)" echo 'Quitting Docker app' osascript -e 'quit app "Docker"' echo 'Launching Docker app' open --background -a Docker return 0 else echo "Unknown argument: $1" return 1 fi } -
antonkomarev revised this gist
Mar 6, 2022 . 1 changed file with 7 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 @@ -2,6 +2,12 @@ # Docker d () { if [ -f $1 ] ; then echo 'Commands available:' echo '\e[32m d restart \e[0m' return 0 fi if [ $1 = "restart" ]; then test -z "$(killall docker 2>/dev/null)" && osascript -e 'quit app "Docker"' open --background -a Docker @@ -11,3 +17,4 @@ d () { return 1 fi } -
antonkomarev created this gist
Mar 6, 2022 .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,13 @@ # vi ~/.bash_profile # Docker d () { if [ $1 = "restart" ]; then test -z "$(killall docker 2>/dev/null)" && osascript -e 'quit app "Docker"' open --background -a Docker return 0 else echo "Unknown argument: $1" return 1 fi } 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,5 @@ # vi ~/.zshrc if [ -f ~/.bash_profile ]; then . ~/.bash_profile fi