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
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
[self observeModel] | |
[self render]; | |
} | |
- (void)observeModel | |
{ | |
// KVO is used to observe model changes |
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
Backbone.easyXDMxhr = new easyXDM.Rpc({ | |
remote: 'http://foo.bar/cors/', | |
}, { | |
remote: { | |
request: {} | |
} | |
}); | |
Backbone.ajax = function() { | |
var options = arguments[0]; |
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
NSString *command = @"ok glass, take a picture"; | |
AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc] init]; | |
AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:command]; | |
[synthesizer speakUtterance:utterance]; |
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
// | |
// TBKeychainCounter.h | |
// | |
// Created by Tal Bereznitskey on 5/11/13. | |
// Copyright (c) 2013 Tal Bereznitskey. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
@interface TBKeychainCounter : NSObject |
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
// component A | |
const a = () => ( | |
<Overdrive id="bender-to-fry"> | |
<img src="bender.img"/> | |
</Overdrive> | |
); | |
// component B | |
const b = () => ( | |
<Overdrive id="bender-to-fry"> |
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
Handlebars.getTemplate = function(name) { | |
if (Handlebars.templates === undefined || Handlebars.templates[name] === undefined) { | |
$.ajax({ | |
url : 'templatesfolder/' + name + '.handlebars', | |
success : function(data) { | |
if (Handlebars.templates === undefined) { | |
Handlebars.templates = {}; | |
} | |
Handlebars.templates[name] = Handlebars.compile(data); | |
}, |
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 Example extends React.Component { | |
componentDidMount () { | |
this.fetchData(this.props) | |
} | |
componentWillReceiveProps (props) { | |
if (props.id !== this.props.id) { | |
this.fetchData(props) | |
} | |
} |
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
Backbone.Notifications = {}; | |
_.extend(Backbone.Notifications, Backbone.Events); |
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
@interface NSObject (Debounce) | |
- (void)debounce:(SEL)action delay:(NSTimeInterval)delay; | |
@end |
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
version: 2.0 | |
jobs: | |
test: | |
docker: | |
- image: circleci/node:8.10 | |
working_directory: ~/circleci-build | |
environment: | |
EXAMPLE_ENV_FOR_TESTING: "test" | |
steps: |