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
# vim: set ft=ruby : | |
# Load DSL and Setup Up stages | |
require 'capistrano/setup' | |
# Inculeds default deployment tasks | |
require 'capistrano/deploy' | |
# Bundler and Rails | |
require 'capistrano/bundler' |
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
set :stage, :staging | |
set :rails_env, 'staging' | |
server '127.0.0.1', port: 2222, user: 'vagrant', roles: %w{web app db}, ssh_options: { | |
keys: %w(~/.vagrant.d/insecure_private_key), | |
forward_agent: true, | |
auth_methods: %w(publickey) | |
} | |
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
# アプリケーション名 | |
set :application, 'Rails-app' | |
# レポジトリURL | |
set :repo_url, 'git@github.com:chroju/Rails-app' | |
# デプロイ先ディレクトリ | |
set :deploy_to, '/var/www/Rails-app' | |
# SCMを指定 | |
set :scm, :git | |
# logを詳細表示 |
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
# vim: set ft=ruby : | |
namespace :unicorn do | |
task :environment do | |
set :unicorn_pid, "#{shared_path}/tmp/pids/unicorn.pid" | |
set :unicorn_config, "#{current_path}/config/unicorn.rb" | |
set :rails_path, "/Rails-app" | |
end | |
def start_unicorn |
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
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; |
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
upstream unicorn-of-my-app { | |
server unix:/var/www/Rails-app/shared/tmp/sockets/unicorn.sock; | |
} | |
server { | |
listen 80; | |
server_name www.chroju.com 192.168.1.1; | |
root /var/www/home; | |
access_log /var/log/nginx/home.log; |
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
# -*- coding: utf-8 -*- | |
APP_PATH = "/var/www/Rails-app" | |
APP_SHARED_PATH = "#{APP_PATH}/shared" | |
# worker数 | |
worker_processes 2 | |
working_directory "#{APP_PATH}/current" | |
# Unix domain socket | |
listen "#{APP_SHARED_PATH}/tmp/sockets/unicorn.sock" |
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
# ESCキーの効きを改善 | |
set -s escape-time 0 | |
# マウススクロールを許可 | |
set-window-option -g mode-mouse on | |
# クリップボード設定 | |
set-option -g default-command "reattach-to-user-namespace -l bash" | |
# 文字コード設定 |
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
# Default Theme | |
if patched_font_in_use; then | |
TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="⮂" | |
TMUX_POWERLINE_SEPARATOR_LEFT_THIN="⮃" | |
TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD="⮀" | |
TMUX_POWERLINE_SEPARATOR_RIGHT_THIN="⮁" | |
else | |
TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="◀" | |
TMUX_POWERLINE_SEPARATOR_LEFT_THIN="❮" |
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
# coding: utf-8 | |
require 'rubygems' | |
require 'mechanize' | |
class SBIBank | |
attr_accessor :id, :password | |
def initialize(id, password) | |
@id = id | |
@password = password | |
end |
OlderNewer