Skip to content

Instantly share code, notes, and snippets.

Kohei Hasegawa banyan

Block or report user

Report or block banyan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@banyan
banyan / Vagrantfile
Created Apr 14, 2013
Vagrantfile for vagrant-lxc
View Vagrantfile
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'
View log.md
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
View postinstall
#!/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
View gist:4761477
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAqIK7qU9ErLJHGpXFopgo4Seukmd8aFpbhIACS1GVKaeLok34mbxRnrD47QFvA2u0zLMCzvD28+HgN6p6R8CB0OZJFdOVpl0TpIl0+uyP+xqTio+56RX7X2KZ6NRmBT5YIcByyDbN1b7/Fn5bcBM7cve82bsmJAGtbAO+IXY2Ey+CtpzKEGlqvkfJ4hMuksFHEYHc4vUcYPhw5yEPON8c3Dsu3Ue44TB8yAYhh0pubFxhbylKzk+JlcRE2Oq83SaKBzX4jasr/TWqL00VPeYcdDz2NoYMxFWSSyCoS4OyB6qCjE3sx6K3DCZc/BUdEWwC+IsmfYTKu3lDJ4cD08rp8w== banyan@mac
View gist:4727554
$ tree -L 1
.
├── Gemfile
├── Gemfile.lock
├── README.rdoc
├── Rakefile
├── app
├── config
├── config.ru
├── db
View phpenv-install-system-wide.sh
# 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:
View graph.rb
require 'gruff'
concurrencies = {
0 => "1",
1 => "10",
2 => "20",
3 => "50",
4 => "100"
}
View bench.php
<?php
$i = 0;
while($i < 10000){
$i++;
}
echo "There's Hell In Hello But More In Goodbye\n";
View bench.php
$r = 10 * 1000 * 1000;
$start = microtime(true);
while($r-- > 0) {
new StdClass();
}
$finish = microtime(true);
echo "time taken: " . ($finish - $start) . "\n";
You can’t perform that action at this time.