- パズドラ
- 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
# 元の動画をトリミング | |
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
module JpegMarkers | |
MARKERS = Hash[*%W( | |
SOF0 \xff\xc0 | |
SOF1 \xff\xc1 | |
SOF2 \xff\xc2 | |
SOF3 \xff\xc3 | |
DHT \xff\xc4 | |
SOF5 \xff\xc5 | |
SOF6 \xff\xc6 | |
SOF7 \xff\xc7 |
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
# 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 |
Having a buckload of code to authorize users on your application is something you may like or not.
Speaking for myself I hate it. But I still love rails_admin
, here's how you install it without devise. Thanks to phoet for providing the hints in the gist I have forked from.
do NOT add devise
gem "rails_admin", :git => "git://github.com/sferik/rails_admin.git"
$ gem install aws-sdk fake-s3
$ fakes3 -r /tmp/fakes3 -p 4567
Loading FakeS3 with /tmp/fakes3 on port 4567 with hostname s3.amazonaws.com
[2013-07-31 17:52:34] INFO WEBrick 1.3.1
[2013-07-31 17:52:34] INFO ruby 2.0.0 (2013-06-27) [x86_64-darwin12.4.0]
[2013-07-31 17:52:34] INFO WEBrick::HTTPServer#start: pid=34539 port=4567
- big.csv (1.3GB)
- Macbook Air 11-inch, Mid 2011
- CPU: 1.8 GHz Intel Core i7
- Memory: 4 GB 1333 MHz DDR3
https://github.com/mirakui/hello_world/blob/master/go/csv_counter.go
$ time ./csv_counter big.csv
lines: 3502066
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 |