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 characters
# zmv | |
autoload -Uz zmv | |
alias zmv='noglob zmv -W' |
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 characters
# Java use IPv4 for jenkins | |
alias jenkins='env _JAVA_OPTIONS="-Djava.net.preferIPv4Stack=true" jenkins' |
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 characters
constructor(private iab: InAppBrowser) {} | |
openUrl(url: string, externalBrowser: boolean = false) { | |
const target = externalBrowser ? '_system' : '_blank'; | |
this.iab.create(url, target, TopicDetailPage.options); | |
} |
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 characters
# usage sample: echo Let\'s ${RED}color${CLEAR} text! | |
CLEAR='\033[0m' | |
BLACK='\033[0;30m' | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
YELLOW='\033[0;33m' | |
BLUE='\033[0;34m' | |
MAGENTA='\033[0;35m' | |
CYAN='\033[0;36m' |
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 characters
# Mac Applications in 'Applications' directories -> runnable from the terminal | |
() { | |
local app dir | |
for dir in $@; do | |
for app in $dir/*.app(N); do; alias ${app:t:r:gs/ //}="open -a ${app:gs/ /\\ /}"; done | |
for app in $dir/*/*.app(N); do; alias ${app:t:r:gs/ //}="open -a ${app:gs/ /\\ /}"; done | |
done | |
} /Applications ~/Applications | |
# Open the directory with Finder (Open current directory without argument) |
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 characters
#!/usr/bin/env sh | |
## This script uses several commands. They can be install with... | |
## $ gem install notify-my-android | |
## $ gem install prowl | |
## $ brew install terminal-notifier | |
NMA_KEY=${NMA_KEY:-"YOUR_KEY"} | |
PROWL_KEY=${PROWL_KEY:-"YOUR_KEY"} |
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 characters
#!/usr/bin/env bash | |
# Parameters | |
NBINS=20 | |
INTERVAL=1 | |
PROCESSES=("Google Chrome") | |
# Set process | |
if [ $# -gt 0 ];then | |
PROCESSES=("$@") |
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 characters
#!/usr/bin/env zsh | |
if [[ $# -lt 2 ]]; then | |
echo "Usage: ${0##*/} [repo's url] [directory you want to clone]" | |
exit | |
fi | |
local dir=${1##*/} | |
mkdir $dir | |
local tmpdir=`pwd` |
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 characters
export ZPLUG_HOME=/usr/local/opt/zplug | |
source $ZPLUG_HOME/init.zsh |
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 characters
autoload -U up-line-or-beginning-search down-line-or-beginning-search | |
zle -N up-line-or-beginning-search | |
zle -N down-line-or-beginning-search | |
bindkey "^[[A" up-line-or-beginning-search | |
bindkey "^[[B" down-line-or-beginning-search |