Skip to content

Instantly share code, notes, and snippets.

View wnoguchi's full-sized avatar
😀

Wataru Noguchi wnoguchi

😀
View GitHub Profile
@wnoguchi
wnoguchi / a.sh
Created January 2, 2014 09:36 — forked from yoppi/a.sh
git grep 'hogehoge' -- "*.rb"

Install Apache log4php using Composer

First, install Composer if you don't yet have it:

php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"

Create a composer.json file with the following content:

{

@wnoguchi
wnoguchi / Vagrantfile
Created November 26, 2013 12:46 — forked from leifg/Vagrantfile
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
#!/usr/bin/env ruby
# http://sssslide.com/speakerdeck.com/a_matsuda/rails3-recipe-book-gaiden#114
ARGV.each do |file|
File.open(file,'r+:UTF8-MAC') do |f|
str = f.read
f.rewind
f.truncate(0)
f.set_encoding('UTF-8')
@wnoguchi
wnoguchi / clients.md
Last active December 23, 2015 02:39 — forked from defunkt/clients.md
Gistクライアントの一覧。forkした。

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

@wnoguchi
wnoguchi / unicorn.rb
Created November 15, 2012 00:59
unicorn configuration
# coding: utf-8
# Wataru Noguchi <wnoguchi@unicast.ne.jp>
application = 'app-name'
#listen "/tmp/unicorn_#{application}.sock"
listen 4000
pid "/tmp/unicorn_#{application}.pid"
worker_processes 6