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 example from <http://railscasts.com/episodes/130-monitoring-with-god> | |
# Use static root, as we're currently not reloading God config during deployments | |
APP_ROOT = '/var/www/twatcher/current' | |
APP_ENV = 'production' | |
def generic_monitoring(w, options = {}) | |
w.start_if do |start| | |
start.condition(:process_running) do |c| | |
c.interval = 10.seconds |
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
@implementation BackgroundLayer | |
@synthesize map; // the TMXTiledMap | |
@synthesize layer; // convenience property for layer, since we need to access this a lot | |
- (void)clearMap { | |
for (int x = 0; x < 30; x++) { | |
for (int y = 0; y < 20; y++) { | |
[self.layer setTileGID:1 at:ccp(x, y)]; | |
} |
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 | |
require 'rubygems' | |
require 'daemons' | |
# This is a bit hacky, but we don't have a clean way to hook into the parsed | |
# options, as Daemons is managing these internally. | |
number = 0 | |
for i in 0..ARGV.length | |
if ARGV[i] == '--number' | |
number = ARGV[i + 1] |
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
# If we ever end up running God / Starling on other environments than production. | |
# we'll have to find a different way to set the values below. | |
STARLING_PORT = 15151 | |
STARLING_HOST = '<my ip address>' | |
RAILS_ENV = 'production' | |
# Based on example from <http://railscasts.com/episodes/130-monitoring-with-god> | |
RAILS_ROOT = '/var/www/myapp' | |