Skip to content

Instantly share code, notes, and snippets.

Avatar

Laurent Villeneuve mazesoul

  • Montréal, Qc, Canada
View GitHub Profile
@mazesoul
mazesoul / debounced-promise.js
Last active March 24, 2017 18:08
Debounced promise with multiple context
View debounced-promise.js
/**
* Laurent Villleneuve 2017-03-24
* https://github.com/mazesoul
*
* Uses Q.js but should be transposable.
*
* Debounces the execution of a function, not by time but by its returning promise
*
* 1. On first call, invoke the <debounced> function, store and return its promise.
* 2. Subsequent calls return the first call's promise
@mazesoul
mazesoul / hack.sh
Created October 23, 2012 15:26 — forked from erikh/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@mazesoul
mazesoul / Klass.js
Created May 5, 2011 19:26
Super.js : micro JS Class
View Klass.js
/*!
* Copyright (c) 2011 Laurent Villeneuve mazesoul at gmail dot com
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions: