Skip to content

Instantly share code, notes, and snippets.

@douhashi
douhashi / reset_symlinks
Created November 23, 2015 09:52
Redmineをアップグレードしやすくするscript
@douhashi
douhashi / backup_redmine
Last active October 11, 2015 06:49
backup redmine
#!/bin/sh
### SETTINGS ################################################
DB_NAME=agileware_redmine
DB_USER=root
DB_HOST=localhost
BACKUP_ROOT=/backups
APP_NAME=agileware-redmine
@douhashi
douhashi / file_backup.sh
Last active December 17, 2015 16:09
backup scripts for rails
#! /bin/sh
### SETTINGS ################################################
APP_NAME=app_name
APP_ROOT=/var/rails/$APP_NAME/curent
BACKUP_SOURCE_DIR=uploads
BACKUP_DEST=/backups/file
PERIOD=30
#############################################################
@douhashi
douhashi / Gemfile
Created October 4, 2012 12:51
Gemfile for example 1
source 'https://rubygems.org'
gem 'rails', '3.2.8'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
@douhashi
douhashi / unicorn_rails_redmine
Created February 9, 2012 08:46
redmine service conf
#!/bin/bash
#
# unicorn_rails_redmine Startup script for unicorn.
#
# chkconfig: - 85 15
# description: redmine on unicorn start/stop script.
#
#
# set rvm environment valiables.
@douhashi
douhashi / unicorn.rb
Created February 9, 2012 08:39
redmine unicorn conf
$unicorn_user = "app"
$unicorn_group = "app"
worker_processes 2
working_directory '/var/rails/redmine'
listen "127.0.0.1:3100", :tcp_nopush => true
listen '/tmp/.unicorn_redmine.sock'
timeout 30
@douhashi
douhashi / nginx
Created February 9, 2012 08:08
nginx service conf file.
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# config: /etc/sysconfig/nginx
@douhashi
douhashi / nginx_make.sh
Created February 9, 2012 07:42
make script for nginx
#!/bin/sh
NGINX=nginx-1.1.14
cd $NGINX \
&& ./configure \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--pid-path=/var/run/nginx/nginx.pid \
--lock-path=/var/lock/nginx.lock \
@douhashi
douhashi / .zshrc
Created December 8, 2011 17:36
my .zshrc
autoload -U compinit
compinit
setopt auto_pushd
setopt auto_cd
setopt correct
setopt cdable_vars
## keybind
@douhashi
douhashi / setup.thor
Created September 2, 2011 20:12
setup tasks for application template
class Setup < Thor
include Thor::Actions
APP_ROOT = File.dirname(__FILE__) + "../../../".freeze
PLUGINS = [:rspec, :cucumber, :simple_form, :devise].freeze
SUCCESS_NOTICE = <<-SUCCESS_TEXT
Successful install [[[Name]]].
SUCCESS_TEXT