Skip to content

Instantly share code, notes, and snippets.

View kaosf's full-sized avatar
🏠
Working from home

ka kaosf

🏠
Working from home
View GitHub Profile

Clojars へデプロイする方法

gpg --gen-key

usernamekaosfと入力した(5文字以上必要だった)

emailka.kaosf-=at=-gmail.comと入力した(-=at=-@)

Earthquake.init do
command %r|^:bri?no|, :as => :brno do |m|
browse 'https://twitter.com/i/notifications'
end
end
@kaosf
kaosf / README.md
Created January 22, 2016 10:33
るりま(Ruby リファレンスマニュアル)を最新に更新するvimperator用コマンド

https://gist.github.com/long-long-float/c542e5232dfd297ab724 のforkみたいなものです.FirefoxのVimperatorのための設定です.

  1. vimperatorrcをあなたの~/.vimperatorrcにコピペして下さい
  2. るりまのページに行きます
  3. うわっ,古いって思ったら :rurimaupdate すると最新の(ではなくJavaScriptコード内のVERSION)るりまになります

rurima じゃなくて rurema に変えたりとかは各自お好みでお願いします.

while :; do
adb shell \
'while :; do
input swipe 200 900 200 100
sleep 0.2
done'
echo Stopped at: `date`
sleep 1
done
mysqldump -u root -p -x --all-databases > backup.sql
mysql -u root -p < backup.sql
# ref. http://phpspot.net/php/pgmysqldump%E3%81%A7%E3%83%90%E3%83%83%E3%82%AF%E3%82%A2%E3%83%83%E3%83%97%EF%BC%86%E5%BE%A9%E5%85%83.html
#!/usr/bin/perl
use 5.008;
use warnings FATAL => 'all';
use strict;
use Encode qw(decode_utf8 encode_utf8);
# Highlight by reversing foreground and background. You could do
# other things like bold or underline if you prefer.
#!/bin/bash
RESULT=`free | head -2 | tail -1`
TOTAL=`echo $RESULT | awk '{print \$2}'`
USED=`echo $RESULT | awk '{print \$3}'`
PERCENTAGE=$(($USED * 100 / $TOTAL))
printf "%2d%%\n" $PERCENTAGE
@kaosf
kaosf / twilog.rb
Last active August 30, 2015 10:51
Earthquake.init do
command :twilog do |m|
browse "http://twilog.org./#{m[1]}"
end
end
diff --git contrib/diff-highlight/diff-highlight contrib/diff-highlight/diff-highlight
index ffefc31..c2547cf 100755
--- contrib/diff-highlight/diff-highlight
+++ contrib/diff-highlight/diff-highlight
@@ -4,6 +4,8 @@ use 5.008;
use warnings FATAL => 'all';
use strict;
+use Encode qw(decode_utf8 encode_utf8);
+
# ref. http://maoe.hatenadiary.jp/entry/2014/12/25/064900
cabal get pandoc
cd pandoc-1.15.0.6
cabal sandbox init
cabal install --bindir ~/.cabal/bin --datadir ~/.cabal/share