Skip to content

Instantly share code, notes, and snippets.

View bloodyowl's full-sized avatar
🦉

Matthias Le Brun bloodyowl

🦉
View GitHub Profile
@bloodyowl
bloodyowl / app.js
Created April 12, 2014 10:14
cornea real-world example
module.exports = require("bloody-events").create()
@bloodyowl
bloodyowl / light.md
Created April 2, 2014 19:16
lightweight specifications draft

navigation

events

click : menu item

Opens the subNav block. Should use a transition.

click : subnav close icon

@bloodyowl
bloodyowl / gist:9769514
Last active August 29, 2015 13:57
noThis
var splice = [].splice
, baseClass = {
create : function(){
return Object.create(this)
},
method : function(name, fn){
Object.defineProperty(this, name, {
writable : true,
configurable : true,
enumerable : false,
@bloodyowl
bloodyowl / gist:9763492
Created March 25, 2014 14:55
glurnt.js
var glurnt = require("gulp")
, uglify = require("gulp-uglify")
glurnt.task("k", function(){
return glurnt.src("foo/**")
.pipe(uglify())
.pipe(glurnt.dest("dist/foo"))
})
@bloodyowl
bloodyowl / gist:9683838
Created March 21, 2014 11:01
hodor spec

hodor spec

0. key concepts

  • all hodor belong the the hodor scope
  • everything is a hodor
  • hodor are first-class citizens

1. the hodor operator

@bloodyowl
bloodyowl / fibonacci.hodor
Created March 21, 2014 10:40
simple implementation of the fibonacci suite in hodor
hodor hodor (hodor{Hodor}, hodor{Hodor})
hodor({hodor}, {hodor})[hodor << hodor]
=> hodor!hodor
hodor!()
@bloodyowl
bloodyowl / gist:9520079
Created March 13, 2014 01:11
static site using jade

static site using jade

structure

  • layouts
  • pages
  • partials
  • data

layouts

var assert = require("assert")
describe("my-module", function(){
it("should work", function(done){
assert.equal("foo", "foo")
done()
})
it("should respect type", function(done){
assert.notStrictEqual("1", 1)
done()
@bloodyowl
bloodyowl / _polyfill?.js
Created February 28, 2014 16:35
polyfill.io? meh
// https://github.com/jonathantneal/polyfill/blob/master/source/Array.prototype.reduce.js
// Array.prototype.reduce
Array.prototype.reduce = function reduce(callback, initialValue) {
var array = this, previousValue = initialValue || 0;
for (var index = 0, length = array.length; index < length; ++index) {
previousValue = callback.call(window, previousValue, array[index], index, array);
}
return previousValue;
@bloodyowl
bloodyowl / gist:9163107
Created February 22, 2014 22:02
observable

set

{
  addition : {
    value : "foo", 
    key : "bar"
  }
}