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
<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
<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
///<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
// | |
// 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
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
-(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
[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
// I had to set the navigation bar to hidden, then add the top and bottom controls as a view. | |
// I don't think you can control the navigation bar directly. | |
- (void)viewDidLoad { | |
[self.navigationController setNavigationBarHidden:YES animated:NO]; | |
} | |
- (void)showControls { | |
[UIView animateWithDuration:0.2 animations:^{ | |
CGRect bottomFrame = self.bottomControlsView.frame; | |
bottomFrame.origin.y = self.view.frame.size.height - bottomFrame.size.height; |
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
// I had to set the navigation bar to hidden, then add the top and bottom controls as a view. | |
// I don't think you can control the navigation bar directly. | |
- (void)viewDidLoad { | |
[self.navigationController setNavigationBarHidden:YES animated:NO]; | |
} | |
- (void)showControls { | |
[UIView animateWithDuration:0.2 animations:^{ | |
CGRect bottomFrame = self.bottomControlsView.frame; | |
bottomFrame.origin.y = self.view.frame.size.height - bottomFrame.size.height; |