- Is email setup properly
- New relic setup to recieve errors, performance stats, availability check.
- Exception mailer wired up for exceptions
- Wire up a settings library ( https://github.com/viatropos/cockpit or https://github.com/wycats/moneta or a simple settings file )
- Wireup a few basic initializers containing extension methods for Strings, Time etc,. (create a gem for this?)
- Setup capistrano
- Setup foreman (with upstart export templates)
- Setup logrotate for the production.log
This file contains hidden or 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
| -export([graceful_stop/1, graceful_stop_proc/1]). | |
| graceful_stop(Timeout) -> | |
| lists:foreach(fun stop_listener/1, supervisor:which_children(cowboy_sup)), | |
| proc_lib:spawn(?MODULE, graceful_stop_proc, [Timeout]). | |
| graceful_stop_proc(Timeout) -> | |
| true = register(graceful_stop, self()), | |
| lager:critical("SHUTDOWN with timeout of ~p msec", [Timeout]), | |
| TRef = erlang:start_timer(Timeout, self(), not_so_graceful), |
This file contains hidden or 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
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
This file contains hidden or 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 ruby | |
| class Sync | |
| def initialize(gitpart) | |
| @from, @to, @ref = gitpart.split | |
| @branch = @ref.split('/').last | |
| end | |
| def exec |
This file contains hidden or 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
| // Based on http://snipt.net/boriscy/datetime-jquery-formtastic/ | |
| $.tools.dateinput.localize("ja", { | |
| months: '1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月', | |
| shortMonths: '1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月', | |
| days: '日曜日,月曜日,火曜日,水曜日,木曜日,金曜日,土曜日', | |
| shortDays: '日,月,火,水,木,金,土' | |
| }); | |
| $.tools.dateinput.conf.format = 'yyyy-mm-dd'; |
This file contains hidden or 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
| God.watch do |w| | |
| w.uid = "git" | |
| w.gid = "git" | |
| w.name = "camo" | |
| w.pid_file = "/data/camo/tmp/camo.pid" | |
| w.interval = 30.seconds | |
| w.env = { | |
| "PORT" => '8080', | |
| "CAMO_KEY" => '0x24FEEDFACEDEADBEEFCAFE' |
This file contains hidden or 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
| config.metals = ["Gridfs"] |
This file contains hidden or 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
| # Taken from passenger_memory_stats script | |
| # Returns the private dirty RSS for the given process, in KB. | |
| def determine_private_dirty_rss(pid) | |
| total = 0 | |
| File.read("/proc/#{pid}/smaps").split("\n").each do |line| | |
| line =~ /^(Private)_Dirty: +(\d+)/ | |
| if $2 | |
| total += $2.to_i | |
| end |
NewerOlder