Skip to content

Instantly share code, notes, and snippets.

View stefanoortisi's full-sized avatar

Stefano Ortisi stefanoortisi

View GitHub Profile
@ghalusa
ghalusa / youtube_id_regex.php
Created June 20, 2015 23:14
Extract the YouTube Video ID from a URL in PHP
<?php
// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored)
// http://youtu.be/dQw4w9WgXcQ
// http://www.youtube.com/embed/dQw4w9WgXcQ
// http://www.youtube.com/watch?v=dQw4w9WgXcQ
// http://www.youtube.com/?v=dQw4w9WgXcQ
// http://www.youtube.com/v/dQw4w9WgXcQ
// http://www.youtube.com/e/dQw4w9WgXcQ
// http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ
@hems
hems / remixing_a_website_using_node_js
Created June 12, 2014 01:43
remixing a website using node.js
#
# - save this file as server.coffee
# - create a remix.js file with the js you want to remix
# - do your magic
#
express = require 'express'
app = express()
request = require 'request'
hyperstream = require('hyperstream')
@inear
inear / trollshow-config.js
Last active December 29, 2015 06:09
A config file for the location layer of http://middle-earth.thehobbit.com/trollshaw
'use strict';
var LocationBase = require('../location-base'),
Buckets = require('./../buckets/index.js'),
detector = require('../../utils/detector'),
CanvasSequence = require('../../utils/canvas-sequence'),
BucketComponents = require('./../buckets/components/index.js');
var useSmallImage = detector.isMobile&&!detector.isTablet;
@jonathantneal
jonathantneal / Demo
Created April 18, 2012 17:13
addEventListener for IE8
http://jsfiddle.net/GuQaV/show/
@desandro
desandro / jquery.imagesloaded.js
Created January 26, 2011 18:01 — forked from paulirish/README.md
$.fn.imagesLoaded jQuery plugin
// $('img.photo',this).imagesLoaded(myFunction)
// execute a callback when all images have loaded.
// needed because .load() doesn't work on cached images
// Modified with a two-pass approach to changing image
// src. First, the proxy imagedata is set, which leads
// to the first callback being triggered, which resets
// imagedata to the original src, which fires the final,
// user defined callback.