- パズドラ
- 127,841,241
- ぷよクエ
- 59595321
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
Homebrew build logs for node on OS X 10.10.5 | |
Build date: 2015-12-15 10:15:41 |
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
# Requirements: | |
# https://github.com/vigetlabs/capistrano_rsync_with_remote_cache | |
# https://github.com/ndbroadbent/turbo-sprockets-rails3 | |
require 'capistrano/recipes/deploy/strategy/rsync_with_remote_cache' | |
Capistrano::Deploy::Strategy::RsyncWithRemoteCache.class_eval do | |
def deploy! | |
update_local_cache | |
prepare_assets | |
update_remote_cache | |
finalize_assets |
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 capture(options={}) | |
out = options[:out] | |
err = options[:err] || :out | |
stdout_old = $stdout.dup | |
stderr_old = $stderr.dup | |
$stdout.reopen out | |
err = $stdout if err == :out |
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
# 元の動画をトリミング | |
ffmpeg -i DSC_3872.avi -vcodec copy -acodec copy -ss '00:00:04.33' -t '00:00:05.48' trim01.avi | |
# 横幅500px(tumblrの上限)にリサイズしつつ animated gif に変換 | |
convert -resize 500 trim01.avi trim01.gif | |
# 明るさ・コントラストをいじりつつ63色に減色(クロップ処理後に1MBに収まるように色数調整) | |
convert -brightness-contrast 40x40 -colors 63 trim01.gif trim01-v3.gif | |
# 横3x縦2にクロップする(画像同士の間隔は10px) | |
convert -crop 160x135+0+0 +repage trim01-v3.gif trim01-v3-1.gif | |
convert -crop 160x135+170+0 +repage trim01-v3.gif trim01-v3-2.gif | |
convert -crop 160x135+340+0 +repage trim01-v3.gif trim01-v3-3.gif |
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 ruby | |
require "optparse" | |
def usage | |
STDERR.puts "usage: #{$0} /path/to/unicorn.pid [-t timeout_sec]" | |
end | |
timeout = 60 | |
pidfile = ARGV.shift |
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
class FooController < ApplicationController | |
caches_action :index | |
def index | |
render :text => Time.now | |
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
# coding: utf-8 | |
class Hoge | |
attr_accessor :hoge? | |
end | |
hoge = Hoge.new | |
hoge.hoge? = true | |
p hoge.hoge? # => true |
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
% rails -v | |
Rails 3.2.5 | |
% rails benchmarker -h | |
Usage: rails benchmarker 'Ruby.code' 'Ruby.more_code' ... [OPTS] | |
-r, --runs N Number of runs. | |
Default: 4 | |
-o, --output PATH Directory to use when writing the results. | |
Default: tmp/performance | |
-m, --metrics a,b,c Metrics to use. | |
Default: wall_time,memory,objects,gc_runs,gc_time |
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
$ cat script.txt | |
grep hoge /var/log/nginx/access.log | |
$ rop.rb -H 'app-0{01..05}' -f script.txt | |
/tmp/rop/0522-2306-11/app-001 | |
/tmp/rop/0522-2306-11/app-002 | |
/tmp/rop/0522-2306-11/app-003 | |
/tmp/rop/0522-2306-11/app-004 | |
/tmp/rop/0522-2306-11/app-005 |