This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BASEDIR=$(dirname $0); if [ $(expr match "$BASEDIR" ^\/) -eq 0 ]; then BASEDIR=$(pwd)/$BASEDIR; fi | |
TMPDIR=$BASEDIR | |
BKNAME=$(date +%Y%m%d-%H%M) | |
BKDIR=/var/backups/erogeeks.com/$(date +%Y%m) | |
TMPFILE=$BKNAME.tar.bz2 | |
# 必要なディレクトリを作成 | |
mkdir $TMPDIR/$BKNAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use utf8; | |
package MyApp::Model::Example; | |
use Mojo::Base 'MyApp::Model'; | |
sub say { | |
"Hello World from MyApp::Model::Example"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PATH=/home/git/.rbenv/bin:/home/git/.rbenv/shims:/var/www/gitorious/script:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http { | |
upstream web_backend { | |
server web01:80; | |
server web02:80; | |
} | |
proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=cache-space:100m max_size=1024m inactive=1h; | |
proxy_temp_path /var/cache/nginx/tmp; | |
server { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[program:shimapan_web] | |
command=bash -lc 'cd /var/app/shimapan_web/current && bundle exec unicorn_rails -c /var/app/shimapan_web/current/config/unicorn.rb -E production' | |
environment=PATH=/home/deploy/.rbenv/shims:/home/deploy/.rbenv/bin:/home/deploy/.rbenv/shims:/home/deploy/.rbenv/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/deploy/bin | |
user=deploy | |
numprocs=1 | |
autostart=true | |
autorestar=true | |
logfile_maxbytes=1MB | |
logfile_backups=10 | |
redirect_stderr=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
package Base; | |
sub new { | |
my ($class) = @_; | |
bless {}, $class; | |
} | |
sub pkg { | |
my ($self) = @_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source { | |
type "forward" | |
port 24224 | |
} | |
match('test.**') { | |
type "forward" | |
num = ::Kernel.open("|hostname"){|o| o.read.chop}.gsub('hoge','').to_i / 20 + 1 # host01 => 1 | |
(num..num+1).each do |n| | |
server { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see http://d.hatena.ne.jp/holidays-l/20110823/p1 | |
define MAKETEST | |
for pkg in $$(for f in $$(find ./adstir -name *_test.go); do echo $${f%/*}; done |sort -u) | |
do | |
gom test $$pkg | |
done | |
endef | |
export MAKETEST | |
test: | |
@echo "$${MAKETEST}" > /tmp/$$$$ ; $(SHELL) /tmp/$$$$ ; rm -f /tmp/$$$$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guard 'shell' do | |
watch(/.+\.go$/) do |m| | |
`gom test .` | |
end | |
watch(/(.+)\/.+\.go$/) do |m| | |
`gom test ./#{m[1]}` | |
end | |
# 現在編集中のファイルのみをテストしたい場合 |