Skip to content

Instantly share code, notes, and snippets.

Esteban invernizzie

Block or report user

Report or block invernizzie

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
invernizzie / seamless-iframe.js
Created Nov 11, 2014
Cross-browser seamless iframe
View seamless-iframe.js
// This script uses jQuery to resize an iframe to its content's height and
// the max of viewport width or content width.
// A selector for a container in the iframe with a given with (not <body>
// nor <html>) is required.
(function($) {
function getViewportWidth() {
return $(window).width();
invernizzie / inherit.js
Last active Dec 16, 2015
Inheritance models that provides: - Use of the new operator. - Proper prototype chain and public methods attached to the prototype. - Private methods (through or Function.prototype.apply). - Class._super_ attribute to access base class' prototype (for calling super-methods easily).
View inherit.js
var inherit = function (init) {
var base, ctor;
base = this;
ctor = function () {
if (typeof init === 'function') {
init.apply(this, arguments);
invernizzie / condition.js
Created Mar 28, 2013
Using RequireJS's shim configuration to sequentially load modules that determine define's dependencies.
View condition.js
define(function () {
return Math.random() >= 0.5;
invernizzie / ArtistsController.groovy
Created Mar 2, 2012 — forked from anonymous/ArtistsController.groovy
Test "featured should return all artists' info"
View ArtistsController.groovy
package com.fdvs.bandwdth
import grails.converters.JSON
import static*
class ArtistController {
private static final String ERROR_MANDATORY_ID = 'Must receive artist id'
def facebookService
View gist:1828989
for (track in topTracks) {
if (videos.size() >= 10) break
// Hacer algo X
videos << trackVideo
View gist:1828984
def eachUntil = { collection, Closure condition, Closure closure ->
for (value in collection) {
if (condition()) break
topTracks?.eachUntil ({ video.size() >= 10 }, {trackName ->
// Hacer algo X
videos << trackVideo
You can’t perform that action at this time.