Skip to content

Instantly share code, notes, and snippets.

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

Wil van der Tuin wilvandertuin

🏠
Working from home
View GitHub Profile
@wilvandertuin
wilvandertuin / watchify.js
Last active August 29, 2015 14:23
Browserify/Watchify Gulp task with Underscorify and error logging with Gulp Util
var gulp = require('gulp');
var browserify = require('browserify');
var watchify = require('watchify');
var underscorify = require('node-underscorify');
var source = require('vinyl-source-stream');
var gutil = require('gulp-util');
/**
* Writes a Browserify or Watchify bundle to file.
*/
@wilvandertuin
wilvandertuin / index.html
Created April 5, 2014 03:45
A Pen by Jeroen van der Tuin.
<script src="https://www.youtube.com/iframe_api"></script>
<div class="revealElement" title="Klik hier">
extra inhoud
</div>
... zorgt voor ...
<a href="#">Klik hier</a>
<div class="revealElement" title="Klik hier">
extra inhoud
</div>
@wilvandertuin
wilvandertuin / gist:5629162
Last active December 17, 2015 15:08
Closures in JS
<!doctype html>
<script>
var EenClosure = (function() {
// Private
var foo = 'bar';
var otherThing = function() {
// This contains the window object because it is the owner of this function.
console.dir(this);
$ alias ant-watch='cd build && when-changed/when-changed.py ../applications/*.js ../applications/**/*.js ../applications/**/**/*.js ../applications/**/**/**/*.js ../applications/**/**/**/**/*.js -c ant dev'
$ ant-watch
@wilvandertuin
wilvandertuin / pasz.js
Created January 10, 2012 19:34
Bare jQuery plugin using revealing module pattern
/**
* Minimum set up for a revealing module pattern jQuery plugin
*
* This is a bare plugin that uses the revealing module pattern to attach
* public and private vars and methods to a jQuery selector.
*
* Example:
*
* $('#menu').collapsible().init();
* $('#menu').collapsible().open();
@wilvandertuin
wilvandertuin / tumblr.js
Created July 21, 2011 05:37
Funnel example with Tumblr feed
// Get Tumblr feed
$('#blog').funnel({
"services": [{
"name": "tumblr",
"user": "jeromche",
"tmpl": {
"regular": "#tmpl_tumblr_regular",
"photo": "#tmpl_tumblr_photo",
"video": "#tmpl_tumblr_video",
"quote": "#tmpl_tumblr_quote"