This guide will help you to use hoodie on windows and linux.
Before we start you'll need following dependencies installed:
- node
- npm
- git
- couchdb
# # PubSub | |
# | |
# Is a small helper to simply realize a pub/sub pattern to a coffee class. | |
# | |
# A namespaceing of the topics is also included. | |
# This means you can subscribe to `a` and also get the `a.b`. But if you subscribe to `a.b` you will not get a `a`. | |
# | |
# **required module**: `underscore` | |
# | |
class PubSub |
# Fix font rendering on Mac OS X. | |
$ defaults -currentHost write -globalDomain AppleFontSmoothing -int 0 |
This guide will help you to use hoodie on windows and linux.
Before we start you'll need following dependencies installed:
# Create a git alias that will pretty-print your git logs. Much better than | |
# firing up `gitk`. | |
# | |
# From https://coderwall.com/p/euwpig#comment_3248 | |
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative" | |
# And then, you should be able to view the logs like so: | |
git lg |
(function() { | |
'use strict'; | |
var indexOf = function(list, needle) { | |
if (list.indexOf) return list.indexOf(needle); | |
for (var i = 0, n = list.length; i < n; i++) { | |
if (list[i] === needle) return i; | |
} | |
return -1; | |
}; |
/* | |
* encoder.cpp | |
* | |
* Created on: Jul 12, 2012 | |
* Author : Abhishek Hingnikar | |
* @TODO: remove the file deps. | |
* ADD STREAM DEPS so that u can buffer output. | |
* Structure | |
* @JSAPI | |
* ffmpeg{ |
export class WeakCache<T extends object, U> { | |
private readonly cacheItems: WeakDictionary<T, U>; | |
constructor() { | |
if (typeof WeakMap !== "undefined") | |
this.cacheItems = new WeakMap<T, U>(); | |
else | |
this.cacheItems = new Es5WeakMap(); | |
} |
// memoizes ordinary functions | |
const memoized = (fn, keymaker = JSON.stringify) => { | |
const lookupTable = new Map(); | |
return function (...args) { | |
const key = keymaker.call(this, args); | |
return lookupTable[key] || (lookupTable[key] = fn.apply(this, args)); | |
} | |
}; |
#ifdef GL_ES | |
precision highp float; | |
#endif | |
uniform sampler2D from, to; | |
uniform float progress; | |
uniform vec2 resolution; | |
void main() { | |
vec2 p = gl_FragCoord.xy / resolution.xy; | |
gl_FragColor = mix(texture2D(from, p), texture2D(to, p), progress); |
var mongoose = require("mongoose") | |
, assert = require("assert") | |
, async = require("async") | |
, Person | |
async.series([ | |
function(callback){ | |
mongoose.connect("mongodb://localhost/mydb") | |
mongoose.connection.on("open", callback) | |
}, |