Skip to content

Instantly share code, notes, and snippets.

View antenando's full-sized avatar

eqfernandobueno antenando

View GitHub Profile
#!/bin/sh
':' //; exec "$(command -v nodejs || command -v node)" "$0" "$@"
console.log('Hello world!');
import Ember from 'ember';
export default Ember.Controller.extend({
init: () => console.clear()
});
// recursive
/*
function fibonacci(n) {
return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2);
}
*/
// cached
function fibonacci(n, cache) {
var piper = function(data) {
return {
data : data,
pipe : function(vai) {
data = vai(data);
console.log(data);
return this;
}
@antenando
antenando / chai-expect.md
Created July 18, 2016 05:20 — forked from patocallaghan/chai-expect.md
Chai Expect Assertion library examples. From http://chaijs.com/api/bdd/ #chai #javascript #expect

##Chai Expect

##Language Chains

  • to
  • be
  • been
  • is
  • that
  • and
  • have
@antenando
antenando / truth_table.js
Created May 13, 2016 15:30 — forked from yarwelp/truth_table.js
Truth table (JavaScript)
/* js-truth_table
*
* file: truth_table.js
*
* Copyright (c) 2011, Erik Nordstroem <[email protected]>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*