Skip to content

Instantly share code, notes, and snippets.

View tobynet's full-sized avatar

tobynet tobynet

  • Toyama, Japan
View GitHub Profile
@rhysd
rhysd / hogepoyo
Created November 18, 2012 14:28
vim-vspec で使ってる便利なコマンド.runnner を vimproc にするとすごく遅いのでデフォルトにしてる.
" vim-vspec 用コマンド {{{
command! -nargs=0 Vspec
\ execute 'QuickRun' 'sh' '-src'
\ '''$HOME/.vim/bundle/vim-vspec/bin/vspec $HOME/.vim/bundle/vim-vspec '.expand('%:p').''''
" }}}
@rummelonp
rummelonp / sakura.md
Created November 17, 2012 06:15
諸事情で自宅鯖ちゃんが死んだのでノリでさくら VPS 借りた

諸事情で自宅鯖ちゃんが死んだのでノリでさくら VPS 借りた

諸事情で自宅鯖ちゃんが死んだのでノリでさくら VPS 借りた

2G石狩リージョン契約

2G石狩リージョン契約

Ubuntu 入れる

@tily
tily / patty.rb
Created November 9, 2012 11:26
patty.rb、最小限 Chef 実行
require 'tmpdir'
require 'rubygems'
require 'chef/shef/ext'
require 'chef/providers'
require 'chef/resources'
require 'sinatra/base'
class Patty < Shef::StandAloneSession
def reset!
loading do
#!/var/lib/jenkins/.rvm/bin/rvm-shell ruby-1.9.3-p194@sqale
export RAILS_ENV=test
bundle install --without production
git checkout -b feature/bundle-update-`date +%Y%m%d`
bundle update
git add Gemfile Gemfile.lock
git commit -m 'bundle update'
git push origin feature/bundle-update-`date +%Y%m%d`
@youpy
youpy / netprint.rb
Last active October 12, 2015 06:27
cli to upload file to netprint (http://www.printing.ne.jp/)
# this is integrated in netprint gem.
# https://github.com/youpy/netprint/commit/d4d43ad9cf7448d6ba047296efb18e89d1435905
%w(tmpdir netprint prawn).each {|g| require g }
Earthquake.init do
command :netprint do |m|
Dir.mktmpdir do |dir|
filename = dir + "/tweet.pdf"
Prawn::Document.generate(filename) do
font "/Users/youpy/Library/Fonts/M+2P+IPAG.ttf"
text m[1]
end
@masui
masui / df.rb
Created October 10, 2012 13:19
dfをツイート
#!/usr/bin/env ruby
require 'rubygems'
require 'tw'
require 'json'
data = {}
data['type'] = 'df'
data['time'] = Time.now
percent = 0
require 'open-uri'
require 'cgi'
def show_image_on_iterm(url)
filename = '/tmp/image_on_iterm'
system('curl %s > %s 2>/dev/null' % [url, filename])
command =<<CMD % filename
osascript -e "
tell application \\"iTerm\\"
tell the first terminal
@abeluck
abeluck / concat-mp4-annexb.md
Created September 20, 2012 17:50
Concat MP4 files using AnnexB bitstream format

Concat MP4 files without transcoding to mpeg

  1. Use the h264_mp4toannexb bitstream filter to convert the mp4s (video steam only) into the AnnexB bitstream format

    ffmpeg -i input1.mp4 -vcodec copy -vbsf h264_mp4toannexb -acodec copy part1.ts
    # repeat for up to inputN
    
  2. Concat the files using cat

@marocchino
marocchino / rt.md
Created September 17, 2012 17:48
rubykaigi2012 timetable