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
#!/usr/bin/env node | |
// this file lives at hooks/after_prepare/010_resource_files.js | |
// It copies my icon and splash screens to the correct location | |
// so that they will be loaded by Cordova 3.5 | |
// | |
// This hook copies various resource files | |
// from our version control system directories | |
// into the appropriate platform specific location |
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"definitions": { | |
"shift": { | |
"$ref": "members-rest-api/schema/#/definitions/shift" | |
}, | |
"blah": { | |
"test": "boolean" | |
} | |
} |
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
# DESCRIPTION | |
# Performs the commands needed to download and set up a new angular2 project using typescript and jspm | |
# | |
# Assumes you have these: | |
# - git | |
# - node / io.js | |
# - npm | |
# - npm install -g jspm@beta **NOTE**: you must have the beta release of jspm installed | |
# | |
# USAGE |
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
/** | |
* I am new to falcor and it is under development | |
* but I find that I keep needing to flatten | |
* integer keyed objects into arrays so that I can | |
* use them with Angular 2's NgFor directive. | |
* | |
* Perhaps I just need to write an angular pipe | |
* but I'm curious if there's a way to have falcor | |
* output arrays instead of keyed objects. | |
* |
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
// ... | |
// ... SNIP: You should include and wire up express as needed before this | |
// ... | |
// Falcor deps | |
var falcor = require('falcor'); | |
var falcorExpress = require('falcor-express'); | |
var bodyParser = require('body-parser'); | |
// ROUTES |
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
/** | |
* Have your component extend this class temporarily when you | |
* need lifecycle callback tracking / debugging. See second | |
* file for how to use this class in your component. | |
*/ | |
class LifecycleCallbackTracker { | |
staticCallCounts: Object = {}; | |
textColor: string; | |
constructor(textColor?: string) { |
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
{ | |
"New NG2 Component (Item)": { | |
"prefix": "ng2c", | |
"body": [ | |
"import {Component, View, CORE_DIRECTIVES, FORM_DIRECTIVES} from 'angular2/angular2';", | |
"// import {ExampleListComponent} from '../example/example-list.component';", | |
"", | |
"@Component({", | |
" selector: '${1:dashed-name}',", | |
" properties: ['id']", |
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
javascript:void((function(){var loc = location.href; var base = loc.split('?')[0]; loc.indexOf("?") == -1 || loc.indexOf("?ionicplatform=ios") > -1 ? (location.href = base+"?ionicplatform=android") : (location.href = base+"?ionicplatform=ios");})()); |
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
function _reduceOrientation(lastOrientation, orientation) { | |
if(orientation==='UNKNOWN' && lastOrientation==='UNKNOWN') { | |
return 'UNKNOWN'; | |
} | |
switch(orientation) { | |
case 'LANDSCAPE': | |
case 'PORTRAIT': | |
return orientation; |
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
var mobx = require('mobx'); | |
var _ = require('lodash'); | |
/* | |
MOBX in VANILLA ES5 | |
Notes are based on Matt Ruby's Open Source North Talk: | |
Practical React with MobX | |
https://www.youtube.com/watch?v=XGwuM_u7UeQ |