Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
require 'pit'
require 'octokit'
org_name = ARGV[0]
unless org_name
abort "Usage #{$0} org_name"
end
// ==UserScript==
// @name Qiita::Team Expand
// @namespace http://github.com/banyan
// @description Qiita::Team のトップページの content を expand する
// @include https://*.qiita.com/*
// ==/UserScript==
//http://stackoverflow.com/questions/2246901/how-can-i-use-jquery-in-greasemonkey-scripts-in-google-chrome
var load,execute,loadAndExecute;load=function(a,b,c){var d;d=document.createElement("script"),d.setAttribute("src",a),b!=null&&d.addEventListener("load",b),c!=null&&d.addEventListener("error",c),document.body.appendChild(d);return d},execute=function(a){var b,c;typeof a=="function"?b="("+a+")();":b=a,c=document.createElement("script"),c.textContent=b,document.body.appendChild(c);return c},loadAndExecute=function(a,b){return load(a,function(){return execute(b)})};
@banyan
banyan / Vagrantfile
Created April 14, 2013 16:50
Vagrantfile for vagrant-lxc
Vagrant.configure("2") do |config|
config.vm.box = 'lxc-quantal64'
config.vm.hostname = 'rails-dev-box'
# config.vm.forward_port 3000, 3000
config.vm.provision :puppet,
:manifests_path => 'puppet/manifests',
:module_path => 'puppet/modules'
ActionController::Live::ResponseTest
     PASS (0:00:05.412) test_cache_control_is_set
     PASS (0:00:05.415) test_content_length_is_removed
     PASS (0:00:05.417) test_header_merge
     PASS (0:00:05.418) test_headers_cannot_be_written_after_close
     PASS (0:00:05.418) test_headers_cannot_be_written_after_write
     PASS (0:00:05.420) test_initialize_with_default_headers
     PASS (0:00:05.423) test_parallel
 PASS (0:00:05.425) test_setting_body_populates_buffer
@banyan
banyan / gist:5027685
Created February 25, 2013 04:07
test
test
@banyan
banyan / postinstall
Last active December 13, 2015 16:58
#!/usr/bin/env ruby
require 'fileutils'
path = "#{ENV['HOME']}/current/uploads"
if File.directory?(path)
FileUtils.mv(path, "#{path}.old")
elsif File.symlink?(path)
FileUtils.rm(path)
end
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAqIK7qU9ErLJHGpXFopgo4Seukmd8aFpbhIACS1GVKaeLok34mbxRnrD47QFvA2u0zLMCzvD28+HgN6p6R8CB0OZJFdOVpl0TpIl0+uyP+xqTio+56RX7X2KZ6NRmBT5YIcByyDbN1b7/Fn5bcBM7cve82bsmJAGtbAO+IXY2Ey+CtpzKEGlqvkfJ4hMuksFHEYHc4vUcYPhw5yEPON8c3Dsu3Ue44TB8yAYhh0pubFxhbylKzk+JlcRE2Oq83SaKBzX4jasr/TWqL00VPeYcdDz2NoYMxFWSSyCoS4OyB6qCjE3sx6K3DCZc/BUdEWwC+IsmfYTKu3lDJ4cD08rp8w== banyan@mac
$ tree -L 1
.
├── Gemfile
├── Gemfile.lock
├── README.rdoc
├── Rakefile
├── app
├── config
├── config.ru
├── db
# Worked under these envelopment
#
# AMI: amzn-ami-pv-2012.09.0.x86_64-ebs (ami-4e6cd34f)
# Zone: ap-northeast-1b
# Type: m1.large
#
# CentOS phpenv (https://github.com/CHH/phpenv) system wide installation script
# Execute as root user.
# Set group to use phpenv:
@banyan
banyan / graph.rb
Last active December 11, 2015 21:48
require 'gruff'
concurrencies = {
0 => "1",
1 => "10",
2 => "20",
3 => "50",
4 => "100"
}