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
[self.playersNode observeEventType:FEventTypeChildAdded withBlock:^(FDataSnapshot *snapshot) { | |
Player * player = [Player new]; | |
[player setValuesForKeysWithDictionary:snapshot.value]; | |
[self.players addObject:player]; | |
if ([player.name isEqualToString:self.currentPlayer.name]) { | |
self.currentPlayer = player; | |
} else { | |
self.opponentNode = [self.playersNode childByAppendingPath:player.name]; | |
self.opponentPlayer = player; |
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
-(id)init { | |
if (self == [super init]) { | |
// ... other init stuff | |
// self.player doesn't even have to be set to set up the binding! | |
[[RACAble(self.player.health) distinctUntilChanged] subscribeNext:^(id value) { | |
[self renderHealth]; | |
}]; | |
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
declare module "rethinkdb" { | |
export function connect(host:IHost, cb:OnConnect); | |
export function dbCreate(name:string):AdminOperation; | |
export function dbDrop(name:string):AdminOperation; | |
export function dbList():NamesOperation; | |
export function db(name:string):Db; | |
export function table(name:string):Table; |
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
// | |
// TestViewController.m | |
// iOSDemo | |
// | |
// Created by Sean Hess on 6/4/13. | |
// Copyright (c) 2013 GitHub, Inc. All rights reserved. | |
// | |
#import "TestViewController.h" | |
#import "User.h" |
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
///<reference path="../def/angular.d.ts"/> | |
///<reference path="../def/underscore.d.ts"/> | |
///<reference path="../types.ts"/> | |
///<reference path="../services/Books"/> | |
///<reference path="../services/Files.ts"/> | |
interface BookParams extends ng.IRouteParamsService { | |
bookId: string; |
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
<html> | |
<head> | |
</head> | |
<body> | |
<h3>Hello Jason</h3> | |
<script type='text/javascript'> | |
console.log("Hello Jason") |
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
<html> | |
<head> | |
</head> | |
<body> | |
<h3>Risk Calculator</h3> | |
<script type='text/javascript'> | |
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
var app = angular.module('app', []); | |
app.controller('ConsumingCtrl', function($scope) { | |
// I want to have the ability for specialIframe to publish an API I can consume, for example a "reload". | |
// I am aware of events on scope but that is not what I am looking for. | |
// I could pass in a reference for a specialIframe to bind to on my scope... | |
// The question is, if specialIframe can publish an API... E.G. "reload" what is the best way to do that. | |
// $scope.something = "hello" | |
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
console.log("HI") | |
// while pressed, | |
var KEY_UP = 38 | |
var KEY_DOWN = 40 | |
var KEY_RIGHT = 39 | |
var KEY_LEFT = 37 | |
var STOP = 0; |
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
// var http = require('http'); | |
// http.createServer(function(req, res) { | |
// // console.log("REQUEST", req) | |
// var body = "" | |
// req.on('data', function(data) { | |
// body = body + data.toString() | |
// }) | |
// req.on('end', function() { | |
// console.log("COMPLETE", JSON.parse(body)) |