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
fs = require 'fs' | |
http = require 'http' | |
https = require 'https' | |
crypto = require 'crypto' | |
mime = require 'mime' | |
xml2js = require 'xml2js' | |
delayTimeout = (ms, func) -> setTimeout func, ms | |
class @S3Put |
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
distanceOfTimeInWords = (dateDiff) -> | |
seconds = Math.abs(dateDiff) / 1000 | |
minutes = seconds / 60 | |
hours = minutes / 60 | |
days = hours / 24 | |
years = days / 365 | |
words = switch | |
when seconds < 45 then "less than a minute" | |
when seconds < 90 then "about a minute" |
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
pg = require 'pg' | |
module.exports = pooler = | |
#Get a connection from the pool | |
acquire: (callback) -> pg.connect "tcp://postgres:postgres@localhost/dummy_db", callback | |
#Decorate a function to use the de-pooled connection as a first argument | |
pooled: (fn) -> -> | |
callerCallback = arguments[arguments.length - 1] | |
callerHasCallback = typeof callerCallback == 'function' |
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
{_} = require 'underscore' | |
child_process = require 'child_process' | |
async = require 'async' | |
healthCheckInterval = 60 * 1000 | |
bounceInterval = 60 * 1000 | |
bounceWait = bounceInterval + 30 * 1000 | |
delayTimeout = (ms, func) -> setTimeout func, ms | |
class MonitoredChild |
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
http { | |
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m; | |
proxy_temp_path /var/tmp; | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
keepalive_timeout 65; | |
gzip on; | |
gzip_comp_level 6; |
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
{config, glb} = require("../lib/bootstrap")("sfs_bot") | |
fs = require 'fs' | |
http = require 'http' | |
winston = require 'winston' | |
async = require 'async' | |
utils = require '../lib/utils' | |
querystring = require 'querystring' | |
request = require('request').defaults | |
headers: |
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
// | |
// SFSViewController.m | |
// AmazingParticleSpinner | |
// | |
// Created by Thomas Dimson on 9/15/12. | |
// Copyright (c) 2012 Thomas Dimson. All rights reserved. | |
// | |
#import "SFSViewController.h" | |
#import <QuartzCore/QuartzCore.h> |
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
#import "SFSSmokeScreen.h" | |
#import <QuartzCore/QuartzCore.h> | |
@implementation SFSSmokeScreen { | |
__weak CAEmitterLayer*smokeEmitter; | |
} | |
-(id)initWithFrame:(CGRect)frame emitterFrame:(CGRect)emitterFrame{ | |
if ((self = [super initWithFrame:frame])) { | |
self.backgroundColor = [UIColor clearColor]; |
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
// | |
// Created by tdimson on 8/15/12. | |
#import <QuartzCore/QuartzCore.h> | |
#import "SFSConfettiScreen.h" | |
@implementation SFSConfettiScreen { | |
__weak CAEmitterLayer *_confettiEmitter; | |
CGFloat _decayAmount; |
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
// | |
// Created by tdimson on 9/5/12. | |
#import <QuartzCore/QuartzCore.h> | |
#import "SFSChickenScreen.h" | |
@implementation SFSChickenScreen { | |
__weak CAEmitterLayer *_chickenEmitter; | |
CGFloat _decayAmount; |
OlderNewer