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
RSpec::Matchers.define :be_boolean do | |
match do |actual| | |
expect(actual).to satisfy { |x| x == true || x == false } | |
end | |
end | |
it 'is boolean' do | |
expect(true).to be_boolean | |
end |
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
def ensure_em | |
unless EventMachine.reactor_running? && EventMachine.reactor_thread.alive? | |
Thread.new { EventMachine.run } | |
sleep 1 | |
end | |
end | |
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
javascript:(function(){window.prompt('選択してコピーしてください','['+document.title+']'+'('+document.URL+')');})(); |
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
git checkout --orphan <new_branch> | |
git rm -rf . | |
<create document files> | |
git add . | |
git commit |
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
[pharaohkj]$ defaults write com.apple.dock expose-animation-duration -float 0.15; killall Dock | |
[pharaohkj]$ defaults write com.apple.dock expose-animation-duration -int 0; killall Dock |
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
open `git remote -v|grep origin|grep git@github|head -n1|sed -e 's#origin.*git@\(.*\)\:\(.*\).git.*#https:\/\/\1\/\2\/#'`tree/master/$(pwd |sed -e "s|`git rev-parse --show-toplevel`/||") |
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
data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs= |
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
data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 |
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
[pharaohkj]$ brew list | |
ansible ctags gdbm libpng neon python scons | |
autoconf docker git-flow libtool nkf rabbitmq sqlite | |
bdw-gc etcd imagemagick libyaml node rbenv subversion17 | |
bison etcdctl jmeter markdown openssl readline w3m | |
boot2docker fleetctl jpeg mosquitto pkg-config redis watch | |
c-ares freetype jq mysql pstree ruby-build wget |
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
SET @i := 0; | |
UPDATE `tablename` SET `order` = (@i := @i +1); |