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
// This is called with the results from from FB.getLoginStatus(). | |
function statusChangeCallback(response) { | |
console.log('statusChangeCallback'); | |
console.log(response); | |
// The response object is returned with a status field that lets the | |
// app know the current login status of the person. | |
// Full docs on the response object can be found in the documentation | |
// for FB.getLoginStatus(). | |
if (response.status === 'connected') { | |
// Logged into your app and Facebook. |
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
// grab our gulp packages | |
var gulp = require('gulp'), | |
gutil = require('gulp-util'), | |
exec = require('gulp-exec') | |
gulp.task('server', function (cb) { | |
exec('node app.js', function (err, stdout, stderr) { | |
console.log(stdout); | |
console.log(stderr); | |
cb(err); |
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
<!-- index.html --> | |
<html> | |
<head> | |
<!-- Do _not_ rely on this URL in production. Use only during development. --> | |
<script src="falcor.browser.js"></script> | |
<script> | |
$ref = falcor.Model.ref; | |
var json = { | |
"greeting": { | |
9001: "hello world" |
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
<!-- index.html --> | |
<html> | |
<head> | |
<!-- Do _not_ rely on this URL in production. Use only during development. --> | |
<script src="falcor.browser.js"></script> | |
<script> | |
$ref = falcor.ref; | |
var model = new falcor.Model(); | |
model.set({ | |
paths: [ |
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
'use strict'; | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var browserify = require('gulp-browserify'); | |
var reactify = require('reactify'); | |
var babelify = require('babelify'); | |
var sass = require('gulp-sass'); |
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
<h1>Hello world</h1> |
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
chaingres | |
.new(client) | |
.table("") | |
.insert({ | |
"column1": "value1", | |
"column2": "value2" | |
}).then(function(err,result) { | |
console.log(result); | |
}) | |
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
async.eachSeries(dirs, function(dir, callback) { | |
converter = new Converter({}); | |
var file = __dirname + path + "/" + dir; | |
converter.fromFile(file, function(err,csv) { | |
var table = dir.replace(".csv", "").toLowerCase(); | |
var count = 0; | |
async.mapLimit(csv, 100, function(rows, callbackMap) { | |
r.db("baseball").table(table).insert(rows).then(function() { | |
count = count + 100; | |
console.log("Migrated",count,"rows"); |
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
path = "path/to/your/image" | |
img = cv2.imread(path, cv2.IMREAD_UNCHANGED) | |
x1 = 0 | |
x2 = 0 | |
y1 = 0 | |
y2 = 0 | |
fx1 = False | |
fx2 = False |
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 listener(callback) { | |
var objects = [1, 2, 3, 4, 5]; | |
objects = objects.map(function(o, i) { | |
return o + 1; | |
}); | |
// objects = [2, 3, 4, 5, 6] | |
return callback(objects); | |
} |
OlderNewer