Skip to content

Instantly share code, notes, and snippets.

View aboutlo's full-sized avatar

Lorenzo Sicilia aboutlo

View GitHub Profile
@aboutlo
aboutlo / MainView.js
Created March 8, 2015 23:20
Simple Test with Backbone using VirtualDom, Underscore Template and ConvertHTML
'use strict';
var $ = require('jquery');
var _ = require('underscore');
var Backbone = require('backbone');
Backbone.$ = $;
var h = require('virtual-dom/h');
var diff = require('virtual-dom/diff');
var patch = require('virtual-dom/patch');
@aboutlo
aboutlo / Foo.js
Last active August 29, 2015 14:17
es6 example
'use strict';
import _ from 'underscore'; // _ is white
import { EventEmitter } from 'events'; // EventeEmitter is white
import logger from 'loglevel'; // logger is white
let emitter = new EventEmitter();
var Foo = function () {
@aboutlo
aboutlo / example.js
Created August 28, 2015 10:39
es6-promise not resolved when I mix my promises with fetch promises
function fetchSomething(){
console.log('fetchSomething')
return fetch('https://www.google.com', {
method: 'GET'
})
}
function doSomething(value){
console.log('doSomething');
//return true;
Verifying that +aboutlo is my blockchain ID. https://onename.com/aboutlo
root@dokku:~# dokku tags:deploy node-example latest
+ case "$(lsb_release -si)" in
++ lsb_release -si
+ export DOKKU_DISTRO=ubuntu
+ DOKKU_DISTRO=ubuntu
+ export DOKKU_IMAGE=gliderlabs/herokuish
+ DOKKU_IMAGE=gliderlabs/herokuish
+ export DOKKU_LIB_ROOT=/var/lib/dokku
+ DOKKU_LIB_ROOT=/var/lib/dokku
+ export PLUGIN_PATH=/var/lib/dokku/plugins
@aboutlo
aboutlo / trace
Created May 6, 2016 13:37
simple-example dokku deploy
root@dokku:~# dokku tags:deploy simple-example
+ case "$(lsb_release -si)" in
++ lsb_release -si
+ export DOKKU_DISTRO=ubuntu
+ DOKKU_DISTRO=ubuntu
+ export DOKKU_IMAGE=gliderlabs/herokuish
+ DOKKU_IMAGE=gliderlabs/herokuish
+ export DOKKU_LIB_ROOT=/var/lib/dokku
+ DOKKU_LIB_ROOT=/var/lib/dokku
+ export PLUGIN_PATH=/var/lib/dokku/plugins
@aboutlo
aboutlo / asyncPipe.js
Last active January 24, 2018 22:18
A simple asyncPipe utility without any dependency to handle functions or promises
// Quick asyncPipe utility without any dependency
const asyncPipe = (f1, ...fns) => {
const toPromise = (fn, ...args) =>
new Promise((resolve, reject) => {
try {
return resolve(fn(...args));
} catch (e) {
return reject(e);
}