View youctrl.js
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 app = angular.module('PromisesStillAllSoWastedOnMyself', []); | |
app.controller('YouCtrl', function(TextFromBuddyService){ | |
//Some code goes here | |
var BuddyTextPromise = function () { | |
//Your buddy promised to Text you, so this service returns a promise | |
TextFromBuddyService.getUpdate() | |
//promise function method: success() or failure() | |
.success(function(update){ |
View answers.js
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 MongoClient = require('mongodb').MongoClient; | |
MongoClient.connect('mongodb://localhost:27017/weather', function(err, db) { | |
if(err) throw err; | |
db.collection('data').find().sort({"State" : 1, "Temperature" : -1}).toArray(function(err, docs) { | |
if(err) throw err; | |
var newstate = ""; | |
var query = {}; |
View gist:db9d312a85597e351f8b
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
node_modules/.bin/jake $* |
View gist:49e75e5cbbf74b171e4d
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(){ | |
'use strict'; | |
desc('Build and Test'); | |
task('default', ['start']); | |
desc('Example Task'); | |
task('start', [], function() { | |
console.log("Here's the example task!"); | |
}) |
View jakefile.js
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() { | |
"use strict"; | |
desc("Build and test"); | |
task("default", ["lint"]); | |
desc("Let's do this Lint thing"); | |
task("lint", [], function() { | |
var lint = require("./build/lint/lint.js"); | |
var files = new jake.FileList(); |
View nodelintoptions.js
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 nodeLintOptions() { | |
return { | |
bitwise:true, | |
curly:false, | |
eqeqeq:true, | |
forin:true, | |
immed:true, | |
latedef:true, | |
newcap:true, | |
noarg:true, |
View careers.js
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
window.app.factory('Parse', ['parseConstant', function(parseConstant) { | |
function getJob(){ | |
var jobsObj = Parse.Object.extend("Jobs"); | |
var query = new Parse.Query(jobsObj); | |
return query.find(); | |
} | |
return { | |
getJob: getJob |
View gist:2d81d4a3e7ccf94e9f62
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
<!doctype html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<title>Mahaska</title> | |
<meta name="description" content="Mahaska Bottling Company (MBC) is a family owned and operated business distributing Pepsi products operating under a franchise from PepsiCo, Inc."> | |
<meta name="viewport" content="width=device-width"> |
View gist:434a98d314ac175c0d2a
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
// Two Factor | |
TwoFactor = new Meteor.Collection('twoFactor'); | |
//generate login token | |
var generateLoginToken = function () { | |
var stampedToken = Accounts._generateStampedLoginToken(); | |
return [ | |
stampedToken, | |
Accounts._hashStampedToken(stampedToken) | |
]; |
View gist:d946e6a8ff962ea571db
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 sierpinski(n) | |
{ | |
return (function s(n) | |
{ | |
return !n ? ['L'] : s(--n).map(function (a) | |
{ | |
return a + new Array((1 << (n + 1)) + 1).join(' ') | |
}).concat(s(n).map(function (a) | |
{ | |
return a + ' ' + a |
OlderNewer