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:
{
| git grep 'hogehoge' -- "*.rb" |
| 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') |
| 更新: | 2013-07-30 |
|---|---|
| バージョン: | 0.1.1 |
| 作者: | @voluntas |
| URL: | http://voluntas.github.io/ |
概要
| # coding: utf-8 | |
| # Wataru Noguchi <[email protected]> | |
| application = 'app-name' | |
| #listen "/tmp/unicorn_#{application}.sock" | |
| listen 4000 | |
| pid "/tmp/unicorn_#{application}.pid" | |
| worker_processes 6 |