Skip to content

Instantly share code, notes, and snippets.

View GeneralD's full-sized avatar
💭
Alcohol makes better code 🥃

YUMENOSUKE GeneralD

💭
Alcohol makes better code 🥃
View GitHub Profile
@GeneralD
GeneralD / expand-or-complete-with-dots.zsh
Last active November 28, 2017 05:21
Zsh shows waiting dots when completing
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
@GeneralD
GeneralD / file0.txt
Created July 20, 2017 06:41
zshのパス設定の順序の問題 ref: http://qiita.com/GeneralD/items/a87d5d145149a9d214c6
echo $PATH
@GeneralD
GeneralD / NSMutableArray+YKFileArray.h
Created July 12, 2014 09:23
Objective-C唯一のiOSファイルパスライブラリ、YKFileの説明書 ref: http://qiita.com/GeneralD/items/b8bd37b1f698ee98fe58
- (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;
@GeneralD
GeneralD / .zprofile
Created October 29, 2013 09:26
Macアプリケーションをプロンプトから全てアプリ名だけで起動出来るzsh設定 ref: http://qiita.com/GeneralD@github/items/58588e22fe7bb3e10205
# 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')