Skip to content

Instantly share code, notes, and snippets.

View pbouzakis's full-sized avatar

Paul Bouzakis pbouzakis

View GitHub Profile
include /mixins
section.reader(data-bind="event: { mousemove: revealNavigationButtons }")
// ko if: itemSrc
iframe#nere-frame(data-bind="attr: { src: itemSrc }", width="100%", height="100%", frameborder="0")
// /ko
+components("flag", "pages", "$data")
div(data-winning-region="navButtons")
function itemMapper(parentCourse) {
return function (item) {
return new itemViewModel(item, parentCourse);
};
}
// later
var firstCourse = terms[0].courses[0];
// inside your object literal
var random = Math.floor(Math.random() * 100001);
var sha256 = crypto.createHmac("sha256", random + "TROGDOR_THE_BURNINATOR");
var timestamp = new Date().toJSON();
return sha256.update(customerId + deviceToken).digest("hex");
"use strict";
var Q = require("q");
var restify = require("restify");
module.exports = function (bnCloud) {
return function (serverRequest, serverResponse, next) {
var authHeaders = serverRequest.authorization;
var log = (serverRequest.log && serverRequest.log.trace.bind(serverRequest.log)) || console.log.bind(console);
@pbouzakis
pbouzakis / gist:2352989
Created April 10, 2012 17:20
Documents
// super simple
// all you need is the relation key, since the rest of the hypermedia control info is instead the individual items self relation
{
"http://rel.nkstdy.co/document": [
{
"ean":"032cfa77face18c7ce5cdac190d34b202f4a0574eb6437427ab018b59495445c",
"title":"JS2",
"dateAdded":"2012-04-03T19:32:07.583Z",
"dateModified":"2012-04-05T17:22:10.796Z",