Skip to content

Instantly share code, notes, and snippets.

View amatiasq's full-sized avatar

A. Matías Quezada amatiasq

View GitHub Profile
@amatiasq
amatiasq / mq-allow-external-clone.js
Created May 28, 2015 09:56
Directive to allow 3rd party libraries to clone angular nodes.
angular.module('my-module')
.directive('mqAllowExternalClone', function($compile) {
return {
link: link,
};
function link(scope, elem, attr) {
var element = elem[0];
var original = element.cloneNode;
element.cloneNode = patch;
@amatiasq
amatiasq / map.js
Last active August 29, 2015 14:23
(function() {
'use strict';
if (window.Map) return;
window.Map = FakeMap;
function FakeMap() {
this._keys = [];
this._values = [];
}
/* eslint no-multi-spaces:0 */
(function(root) {
var Firebase = root.Firebase;
var toArray = Function.prototype.call.bind(Array.prototype.slice);
window.FirebasePromise = FirebasePromise;
function DisconnectWrapper(disconnect) {
this._ref = disconnect;
}
Babel
Base16 color schemes
Cucumber
GitSavvy
Grunt
Gulp
Javsacript Beautify
JavascriptNext - ES6 Syntax
jsFormat
LESS
function banshee_application(checknum, pid, args) {
var app = new eyeos.application.Banshee(checknum, pid, args);
}
qx.Class.define("eyeos.application.Banshee", {
extend: eyeos.system.EyeApplication,
construct: function(checknum, pid, args) {
arguments.callee.base.call(this, 'banshee', checknum, pid);
// This file is just to keep track of not-included array methods
interface Array implements ~ISyncCollection {
// Mutates collection
pop() : Object;
shift() : Object;
push(...value : Object) : Number;
unshift(...value : Object) : Number;
splice(start : Number, deleteCount : Number, ...value : Object = null) : Array;
@amatiasq
amatiasq / method.js
Last active January 26, 2016 03:43
ESDoc plugin for assign a function as a method.
/*
* Enables @method tag in functions to document it as a method of a existing class.
* Author A. Matías Quezada <[email protected]>
* MIT License
*
* Usage:
*
* /** @method MyClass * /
* export function foo() {}
*
<!doctype html>
<html>
<head>
<title>My Angular App</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.js" data-main="index"></script>
</head>
<body>
<div ng-controller="MainController">
<my-directive></my-directive>
export default function(self) {
let last = null;
let isEmpty = true;
return self
.forEach(value => {
last = value;
isEmpty = false;
})