Skip to content

Instantly share code, notes, and snippets.

View sankitch's full-sized avatar
🏠

Kiyoshi Sakata sankitch

🏠
  • Tokyo, Japan
  • 00:05 (UTC +09:00)
  • X @sankitch
View GitHub Profile
@sankitch
sankitch / canything-install-on-cygwin.diff
Created October 30, 2012 14:22
cygwinにcanythingインストールしようとしたらエラー
diff --git a/Makefile b/Makefile
index 11529b8..3a29118 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
canything: canything.c
- @gcc -Wall -O3 -o $@ $< -lncursesw && echo make canything
+ @gcc -Wall -O3 -o $@ $< -lncursesw -L/usr/include/ncursesw -I/usr/include/ncursesw && echo make canything
clean:
@rm -f canything && echo clean canything
#!/bin/sh
perl -nle'm|^<li><a href="([^"]+)">(.+)</a>| and print $2, ": ", $1' < ~/.w3m/bookmark.html |\
canything |\
perl -nle 'm|https?://.+|g and print $&' |\
xargs w3m
@sankitch
sankitch / select-w3m-bookmarks-percol
Created October 30, 2012 18:10
percolでw3mのbookmarkの絞り込み
#!/bin/sh
perl -nle'm|^<li><a href="([^"]+)">(.+)</a>| and print $2, ": ", $1' < ~/.w3m/bookmark.html |\
percol --match-method migemo |\
perl -nle 'm|https?://.+|g and print $&' |\
xargs w3m
@sankitch
sankitch / search-document-by-percol.zsh
Created October 30, 2012 18:12
ドキュメントを絞り込んで開く
function search-document-by-percol() {
DOCUMENT_DIR="$HOME/Dropbox/Documents/ $HOME/Desktop/ $HOME/Google\ ドライブ"
SELECTED_FILE=$(echo $DOCUMENT_DIR | xargs find | \
grep -E "\.(xlsx|xls|pptx|ppt|docx|doc|pdf|txt|odp|odt|ods|xmind|mm|glink|gsheet)$" | percol --match-method migemo)
if [ $? -eq 0 ]; then
cygstart $SELECTED_FILE
fi
}
alias sd='search-document-by-percol'
@sankitch
sankitch / change-directory-gisty-by-percol.zsh
Created October 30, 2012 18:45
percolでGISTY_DIRの絞り込み&cd
function change-directory-gisty-by-percol() {
SELECTED_GIST=$(gisty list | awk /:/ | percol --match-method migemo | awk -F ':' '{ print $1 }')
cd $GISTY_DIR/$SELECTED_GIST
}
alias g='change-directory-gisty-by-percol'
#!/bin/sh
git submodule foreach 'git pull origin master'
git submodule update
@sankitch
sankitch / configure.log
Created October 31, 2012 16:16
libffi install log on cygwin
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... i686-pc-cygwin
continue configure in default builddir "./i686-pc-cygwin"
....exec /bin/sh .././configure "--srcdir=.." "--enable-builddir=i686-pc-cygwin" "cygwin"
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... i686-pc-cygwin
checking for gsed... sed
checking for a BSD-compatible install... /bin/install -c
#!/bin/sh
function find-and-cd-by-percol() {
SELECT_DIR=$(find $1 -type d | percol --match-method migemo)
cd $SELECT_DIR
}
#!/bin/sh
function find-and-open-by-percol() {
SELECT_DIR=$(find $1 -type f | percol --match-method migemo)
if [ $? -eq 0 ]
then
cygstart $SELECT_DIR
fi
}
#!/bin/sh
cd /path/to/dir
git clone git://github.com/redmine/redmine.git
cd redmine
git checkout -b production
vim .gitignore # *1
vim Gemfile # *2
vim config/application.rb # *3
vim config/environment.rb # *4
bundle install --path=.bundle --without production:mysql:postgresql