Skip to content

Instantly share code, notes, and snippets.

View antenando's full-sized avatar

Fernando Bueno antenando

View GitHub Profile
@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 <contact@erikano.net>
*
* 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.
*
@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
var piper = function(data) {
return {
data : data,
pipe : function(vai) {
data = vai(data);
console.log(data);
return this;
}
// recursive
/*
function fibonacci(n) {
return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2);
}
*/
// cached
function fibonacci(n, cache) {
import Ember from 'ember';
export default Ember.Controller.extend({
init: () => console.clear()
});
#!/bin/sh
':' //; exec "$(command -v nodejs || command -v node)" "$0" "$@"
console.log('Hello world!');

📈📈📈📈📈📈📈📈📈📈📃💳🚬➗➕🔝🎥🔛🔛🔌🔌🔨🔨💱🔌🔨🎓💣🍢🍢🐗🚬💼🍜⛅⛅⛅⛅⛅⛅⛅⛅😰😰😰
📈📈📈📈📈📈📈📈📈📈📝🐑🎓🔌💱🔨🔌💱🎥🔝🔝🔨🔨🔌🔌🔝🎓🎓🍢🎏🌷🚬🛀🍜⛅⛅⛅⛅⛅⛅⛅😰😰😰😰
📈📈📈📈📈📈📈📈📈📈🎂🎊🎓🔨➗💱🔃🔌🔛🚏🚏🔝🔨🎓🎓🎓🚏🎓🚬🎌🌷🎏🎳🔏😰⛅⛅⛅⛅⛅⛅😰😰😰😰
📈📈📈📈📈📈📈📈📈📃🐶🍢🎓🔌➕🔌💱🔛🔛🎓🎓🎓🔝🎼💣🎓🐗💣🚬🍡🐘🛀🎳⛪💳⛅⛅⛅⛅⛅😰😰😰😰😰
📈📈📈📈📈📈📈📈📈📃⛪🎓🎣🔚🔛🎓🔝🎓🎥🔝🔝🎥🔪🔎🔪🎣🌷🍢🐗🛀💀🛀🎳💀🐶⛅⛅⛅⛅⛅⛅😰⛅😰😰
📈📈📈📈📈📈📈📈📈🎂🛀🎓🎣🔨🔝🎼🚏🎣🎓🔝🔝🔝🔗🔊🎣🎼🎏🎳🌷🎳👟🐰🐰🐰🍲⛅⛅⛅⛅⛅⛅😰😰😰😰
📈📈📈📈📈📈📈📈📃🐚🚬🎓🎣🎓🎣💣🎼🎓🎓🎣🔝🎓🎧🔊🚥🎼🔎💀💀🌷👀🐚🔘👟💴🍜⛅⛅⛅⛅⛅⛅😰😰😰
📈📈📈📈📈📈📈📈📝⛪💣💣🚏💣💣🐗🎼🎓🎓🎣🔝🔝🌷🚬💣💣🚥🎳💀🚽🎳🔘🔘💀⛪🍜😰⛅⛅⛅⛅⛅😰😰😰
📈📈📈📈📈📈📈📈📩🍱💣💣🎓🐡🌷🐗🎣🎣🎓🎣🎓🎓🌷💣🚏🚏🔻🌷🛀🐰💀👀👀💀🐰🍜😰⛅⛅⛅⛅😰😰😰😰
📈📈📈📈📈📈📈📈🐚🌷🎓🎣💣🌷🚬💣🎓🔻🐗🐗💣💣🚬💣💣🐗🔻🐗🌷🌷💀💀💀🐰🐰🍜😰⛅⛅⛅⛅😰🐹😰😰

function StairCase(n) {
var printLine = function(y, t){
var line = '';
for (var j = 0; j <= t; j++) {
if (j < y) {
line += ' ';
} else if (j > y){
line += '#';
}
const MODULE_DIR = /(.*([\/\\]node_modules|\.\.)[\/\\](@[^\/\\]+[\/\\])?[^\/\\]+)([\/\\].*)?$/g;
{
loader: 'babel-loader',
test: /\.jsx?$/,
include(filepath) {
if (filepath.split(/[/\\]/).indexOf('node_modules')===-1) return true;
let pkg, manifest = path.resolve(filepath.replace(MODULE_DIR, '$1'), 'package.json');
try { pkg = JSON.parse(fs.readFileSync(manifest)); } catch (e) {}
return !!(pkg.modules || pkg['jsnext:main']);
var StickyFooter = (function ($) {
var $body = $('html, body');
var $footer = $body.find('.main-footer');
var $CTAfooter = $body.find('.cta-footer');
function init() {
if ($footer.length && $CTAfooter.length) {
checkFooter();
triggerEventScrolling(checkFooter);