This file contains 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
# aliases to Mac Applications | |
function app_alias() { | |
apps=$(find $1/*.app -maxdepth 0) | |
apps=(${(@f)"$(echo $apps)"}) | |
for app in $apps | |
do | |
aliasname=$(echo $app | sed 's/.app//' | sed 's!^.*/!!') | |
aliasname=$(echo $aliasname | sed -e 's/ //g') | |
app=$(echo $app | sed -e 's/\ /\\ /g') |
This file contains 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
- (void)eachFile:(void (^)(YKFile *file, NSUInteger idx))pFunction; | |
- (void)sortFiles:(NSComparisonResult (^)(YKFile *file1, YKFile *file2))pFunction; | |
- (void)removeFilesFromList:(BOOL (^)(YKFile *file))pFunction; | |
- (YKFileArray *)cutFilesFromList:(BOOL (^)(YKFile *file))pFunction; |
This file contains 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
echo $PATH |
This file contains 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
WAITING_DOTS=${WAITING_DOTS:-"..."} | |
expand-or-complete-with-dots() { | |
echo -n $WAITING_DOTS | |
zle expand-or-complete | |
zle redisplay | |
} | |
zle -N expand-or-complete-with-dots | |
bindkey "^I" expand-or-complete-with-dots |
This file contains 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
# history searching with arrow keys | |
autoload -U up-line-or-beginning-search | |
autoload -U 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 # Up | |
bindkey "^[[B" down-line-or-beginning-search # Down |
This file contains 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 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 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 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 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) |
OlderNewer