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 camoptions = { | |
| limit: 1, | |
| destinationType: Camera.DestinationType.FILE_URI, | |
| targetWidth: 512, | |
| targetHeight: 512, | |
| sourceType: (source == 1) ? Camera.PictureSourceType.CAMERA : Camera.PictureSourceType.PHOTOLIBRARY | |
| }; | |
| navigator.camera.getPicture(function onSuccess(file) { |
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 camOpen = function(source) { | |
| var camoptions = { | |
| limit: 1, | |
| destinationType: Camera.DestinationType.FILE_URI, | |
| targetWidth: 512, | |
| targetHeight: 512, | |
| sourceType: (source == 1) ? Camera.PictureSourceType.CAMERA : Camera.PictureSourceType.PHOTOLIBRARY | |
| }; |
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
| # Dockerfile for MetaMaps | |
| FROM ruby:2.1.5 | |
| MAINTAINER Daniel Sont "[email protected]" | |
| # nokogiri+vagrant broken dependency issues | |
| ENV NOKOGIRI_USE_SYSTEM_LIBRARIES 1 | |
| RUN apt-get install libxml2 libxml2-dev libxslt1-dev -y |
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
| psueodocode ftw | |
| layout .... | |
| todo | |
| render | |
| <div> | |
| <expects todolist /> //dependency inverted .. decoupled. todolist is an abstraction | |
| </div> |
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 path = require('path'); | |
| var nodedir = require('node-dir'); | |
| module.exports = function (root, ext, done) { | |
| var data = {}; | |
| var onFile = function(err, content, filename, next) { | |
| if (err) throw err; | |
| data[filename.replace(root, '').replace(ext, '')] = content; | |
| next(); |
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 _ = require('lodash'); | |
| function taggzies () { | |
| var strings = arguments[0]; | |
| var vals = _.slice(arguments, 1); | |
| //ES6 Generator | |
| function* val() { | |
| var len = vals.length; | |
| for (var i = 0; i < len; i++) yield vals[i]; |
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
| <style> | |
| svg { | |
| shape-rendering: geometricPrecision; | |
| z-index: -1; | |
| position: absolute; | |
| top: 0; | |
| bottom: 0; | |
| left: 0; | |
| right: 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
| #!/bin/bash | |
| curl https://install.meteor.com | /bin/sh && \ | |
| git clone https://github.com/reactioncommerce/reaction.git && \ | |
| cd reaction && git checkout master && \ | |
| meteor |
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
| module.exports.create = function* () { | |
| var res = yield users.find({ email: this.body.email, password: this.body.password }); | |
| if (res) { | |
| return res.send(401, 'That user already exists'); | |
| } | |
| yield users.insert({ email: this.body.email, password: somehashything(this.body.password) }); | |
| // etc... | |
| }; |
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
| function foo(data) { | |
| console.log(data); | |
| var join = d3.select('div.test').selectAll('span').data(data, function(d, i) { return d.v }) | |
| join.exit().remove(); | |
| join.enter().append('span').text(function(d) { return d.v } ) | |
| join.sort(); | |
| } | |
| $(function () { | |
| d3.select('body').append('div').html(layout) |
OlderNewer