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){ |
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 = {}; |
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 $* |
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!"); | |
}) |
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(); |
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, |
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 |
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"> |
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) | |
]; |
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