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
# originally copied from https://help.github.com/articles/ignoring-files | |
# i manually keep this in sync with https://gist.github.com/benjiwheeler/d100b0c4ed7fbce3dfce | |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o |
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
general: | |
build_dir: . | |
machine: | |
environment: | |
RAILS_ENV: "test" | |
RACK_ENV: "test" | |
# note: DON'T need to have heroku: section anywhere because we use --app heroku commands. |
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
class Quality < ActiveRecord::Base | |
belongs_to :measureable, :polymorphic => true, :inverse_of => :qualities | |
# translates a raw value to a log scale, using expected mean and halflife. | |
# eg, suppose we're scoring the relative reliability of something based on its age. | |
# if 10 days is halflife, and expected mean is 2 days, the raw values and log values will be: | |
# raw value | log value | |
# -------------------------- | |
# 0 days | -.17 | |
# 1 day | -.09 |
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 'test_helper' | |
class GroupsControllerTest < ActionController::TestCase | |
test "ok to create duplicate group through api" do | |
user = create(:user) | |
@request.env["HTTP_AUTHORIZATION"] = user.basic_auth_header("abc1234") | |
post :apicreate, format: :json, nickname: "hannabarbera" | |
assert_response :created | |
assert_not_nil assigns(:group) |
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
drizzle_parse_cloud / cloud / main.js | |
// ************************* libraries *********************************** | |
var _ = require('underscore'); | |
var moment = require('moment'); | |
//var moment = require('moment-timezone'); | |
var MAX_ALERT_LENGTH = 110; | |
var TARGET_TIME_OF_DAY_SEC = 7 * 3600; // 7 am | |
var TIME_OF_DAY_ABS_DIFF_LIMIT = 40 * 60; // within 40 mins |
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
{ | |
"005": {"std_tz": "EST", "std_utc_diff": -5, "dst_tz": "EDT", "dst_utc_diff": -4, "state": "NY", "eg_city": "Holtsville"} | |
,"010": {"std_tz": "EST", "std_utc_diff": -5, "dst_tz": "EDT", "dst_utc_diff": -4, "state": "MA", "eg_city": "Agawam"} | |
,"011": {"std_tz": "EST", "std_utc_diff": -5, "dst_tz": "EDT", "dst_utc_diff": -4, "state": "MA", "eg_city": "Indian_Orchard"} | |
,"012": {"std_tz": "EST", "std_utc_diff": -5, "dst_tz": "EDT", "dst_utc_diff": -4, "state": "MA", "eg_city": "Adams"} | |
,"013": {"std_tz": "EST", "std_utc_diff": -5, "dst_tz": "EDT", "dst_utc_diff": -4, "state": "MA", "eg_city": "Ashfield"} | |
,"014": {"std_tz": "EST", "std_utc_diff": -5, "dst_tz": "EDT", "dst_utc_diff": -4, "state": "MA", "eg_city": "Ashburnham"} | |
,"015": {"std_tz": "EST", "std_utc_diff": -5, "dst_tz": "EDT", "dst_utc_diff": -4, "state": "MA", "eg_city": "Auburn"} | |
,"016": {"std_tz": "EST", "std_utc_diff": -5, "dst_tz": "EDT", "dst_utc_diff": -4, "state": "MA", "eg_city": "Cherry_Valley"} | |
,"017": {"std_tz": "EST", "std_utc_diff": -5, " |
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
005 | EST | -5 | EDT | -4 | NY | Holtsville | |
---|---|---|---|---|---|---|---|
010 | EST | -5 | EDT | -4 | MA | Agawam | |
011 | EST | -5 | EDT | -4 | MA | Indian_Orchard | |
012 | EST | -5 | EDT | -4 | MA | Adams | |
013 | EST | -5 | EDT | -4 | MA | Ashfield | |
014 | EST | -5 | EDT | -4 | MA | Ashburnham | |
015 | EST | -5 | EDT | -4 | MA | Auburn | |
016 | EST | -5 | EDT | -4 | MA | Cherry_Valley | |
017 | EST | -5 | EDT | -4 | MA | Acton | |
018 | EST | -5 | EDT | -4 | MA | Andover |
We can't make this file beautiful and searchable because it's too large.
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
'00501','Holtsville','NY','America/New_York' | |
'00544','Holtsville','NY','America/New_York' | |
'01001','Agawam','MA','America/New_York' | |
'01002','Amherst','MA','America/New_York' | |
'01003','Amherst','MA','America/New_York' | |
'01004','Amherst','MA','America/New_York' | |
'01005','Barre','MA','America/New_York' | |
'01007','Belchertown','MA','America/New_York' | |
'01008','Blandford','MA','America/New_York' | |
'01009','Bondsville','MA','America/New_York' |
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 <UIKit/UIKit.h> | |
typedef NS_ENUM(NSInteger, ViewControllerEnum) { | |
ViewControllerEnumUnknown = 0 | |
, ViewControllerEnumCongratulationsViewController = 1 // for example | |
}; | |
@interface AppDelegate : UIResponder <UIApplicationDelegate> | |
@property (strong, nonatomic) UIWindow *window; |
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 "AppDelegate.h" | |
#import <Parse/Parse.h> | |
#import <FacebookSDK/FacebookSDK.h> | |
#import "MyParseUser.h" | |
@implementation AppDelegate | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
[[UINavigationBar appearance] setBarStyle:UIBarStyleBlackTranslucent]; |