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
namespace :deploy do | |
task :start, :roles => :app, :except => { :no_release => true } do | |
run "cd #{current_path} && bundle exec unicorn -c #{current_path}/config/unicorn.rb -E production -D" | |
end | |
task :stop, :roles => :app, :except => { :no_release => true } do | |
run "kill -KILL -s QUIT `cat #{shared_path}/pids/unicorn.pid`" | |
end | |
task :restart, :roles => :app, :except => { :no_release => true } do |
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
class Fixnum | |
def fizzbuzz | |
return :fizzbuzz if self % 15 == 0 | |
return :buzz if self % 5 == 0 | |
return :fizz if self % 3 == 0 | |
self | |
end | |
end |
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
task :before_db do | |
require './db_initialize' | |
end | |
namespace :db do |ns| | |
ns.tasks.each do |db_task| | |
db_task.enhance([:before_db]) | |
end | |
end |
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
syntax on | |
set nocompatible | |
filetype off | |
"""" neobundle.vimの設定 | |
if has('vim_starting') | |
set runtimepath+=~/.vim/bundle/neobundle.vim/ | |
endif | |
call neobundle#rc(expand('~/.vim/bundle')) | |
NeoBundleFetch 'Shougo/neobundle.vim' |
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
#include<stdio.h> | |
#include<stdlib.h> | |
#define MAX_N 10000000 | |
void set_bit(char *sort_bit, int value, int bit); | |
int get_bit(char *sort_bit, int value); | |
int main(void) { | |
FILE *fp; |
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
class Hoge | |
def mmtest | |
hoge #method_missing が呼ばれる => :hoge | |
hoge = 10 #mmtestメソッド内のローカル変数が定義される | |
self.hoge=10 #method_missing が呼ばれる => :hoge= | |
end | |
def method_missing(method_name, *args) | |
p method_name |
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
<html> | |
<head> | |
<title>test</title> | |
</head> | |
<style> | |
input[type=checkbox] { | |
display: none; | |
} | |
label { | |
display: inline-block; |
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
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm |
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
pg94: | |
restart: always | |
image: postgres:9.4.9 | |
ports: | |
- "5432:5432" | |
environment: | |
- POSTGRES_USER=xxxxx | |
volumes: | |
- /Users/xxxxx/docker-dev/pg94/data:/var/lib/postgresql/data |
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
[mysqld] | |
character-set-server=utf8 |
OlderNewer