- shared/pids -> shared/tmp/pids
- cp shared/system/* shared/public/system/
- change pid path for /etc/init.d/unicorn
- delayed_job tasks integration.
#!/usr/bin/env ruby | |
branch = `git rev-parse --abbrev-ref HEAD`.chomp | |
if branch =~ /^feature\/(\d+)$/ | |
url = "http://www.pivotaltracker.com/story/show/#{$1}" | |
puts "Open #{url}" | |
exec "open #{url}" | |
else | |
puts "Ignore. Tracker branch should be feature/nnnnnnn." | |
end |
#!/bin/bash | |
# clear log | |
cat /dev/null > speed.log | |
for i in {0..15} | |
do | |
echo "Starting $i/15" | |
echo "speedtest server" >> speed.log | |
date >> speed.log |
require 'open-uri' | |
require 'json' | |
url = 'http://api.longurl.org/v2/services?format=json' | |
r = open(url, 'User-Agent' => 'Your-Script-Name/1.0').read | |
j = JSON.parse r | |
puts j.values.map { |v| v['domain'] } |
class Settings < Settingslogic | |
# load default app | |
cf = File.join(Rails.root, 'config', 'settings', 'application.yml') | |
source cf if File.exist? cf | |
cf = File.join(Rails.root, 'config', 'settings', "#{Rails.env}.yml") | |
instance.deep_merge! Settings.new(cf) if File.exist? cf | |
end |
sudo aptitude install git | |
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build |
require 'tempfile' | |
class StdinString < String | |
def run(*commands) | |
r = `cat #{tf.path} | #{commands.join(' ')}` | |
remove_tf | |
StdinString.new r | |
end | |
private |
#!/bin/sh | |
pfx='rel' | |
d=`date +%Y%m%d%H%M%S` | |
git flow release start $pfx-$d | |
git flow release finish -m"Release:$d" $pfx-$d |
#!/bin/sh | |
# | |
# chkconfig: 345 98 20 | |
# | |
# init.d script for single or multiple unicorn installations. Expects at least one .conf | |
# file in /etc/unicorn | |
# | |
# Modified by [email protected] http://github.com/jaygooby | |
# based on http://gist.github.com/308216 by http://github.com/mguterl | |
# |
#!/usr/bin/env ruby | |
require 'cgi' | |
gem 'gitlab' | |
gem 'todoist' | |
require 'gitlab' | |
require 'todoist' | |
class IssueCreator |