Skip to content

Instantly share code, notes, and snippets.

View javimosch's full-sized avatar
🏠
Working from home

Javier Leandro Arancibia javimosch

🏠
Working from home
View GitHub Profile
function sequence(list, results, resolve, reject) {
if (!results) {
return new Promise((resolve, reject) => sequence(list, [], resolve, reject));//first time
} else {
if (!results){
results = [];//one time
}
if (list.length == 0) {
return resolve(results);//last time
} else {
@javimosch
javimosch / evt.js
Created June 10, 2017 10:57
Tiny Event system that just works
/*
var detach = $evt.on('foo',console.log) //Register as normal
$evt.emit('foo',1,2,3) //Emit using N arguments
$evt.off('foo') //Detach using name (every listener is detached)
detach(); //Detach using funcion
*/
(function() {
var arr = [];
var self = window.$evt = {
emit: function() {
@javimosch
javimosch / install_ionic_compiler.sh
Created September 13, 2016 23:24
Cloud9 Free VM (2048mb Storage) + Android Cordova Ionic Compiler
#vm machine needs nodejs
#download sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
rm android-sdk_r24.2-linux.tgz
mv android-sdk-linux/ android
#install essential sdk components
~/workspace/android/tools/android update sdk -u --all --filter 2,4,168
#install enviroment dependencies
sudo apt-get install lib32stdc++6
@developit
developit / Rollup Automatic External Dependencies.md
Last active June 29, 2021 15:33
Rollup Automatic External Dependencies

Hi!

This is an example of how to use [Rollup] with external dependencies, without hard-coding them.

It reads your installed NPM dependencies and treats them as external to Rollup. They still get bundled, but not as ES2015.

Make sure you have a .babelrc or a "babel":{} section in your package.json.