Skip to content

Instantly share code, notes, and snippets.

View ginader's full-sized avatar

Dirk Ginader ginader

View GitHub Profile
@ded
ded / domready.js
Created February 24, 2011 08:46
Smallest x-browser DOM Ready, ever
function r(f){/in/(document.readyState)?setTimeout(r,9,f):f()}
@kentbrew
kentbrew / Rotating an iPhone Movie
Created February 26, 2011 20:14
How To Rotate an iPhone Movie
Here be some notes on the insane set of gymnastics I have to go through every time
I fuck up and start recording video with my iPhone held vertically.
I do this a LOT. I don't know why it happens. Often I am standing over something and
recording it, and the phone doesn't understand that I actually mean to hold it
horizontally.
META QUESTIONS:
Why isn't there a way to prevent the phone from shooting video in vertical format? Who
@darktable
darktable / app.yaml
Created March 16, 2011 19:10
GAE: App.yaml designed for serving a static site on Google App Engine (Python). Copy your static html and files into a folder called "static" next to app.yaml. Contains a bunch of mimetype declarations from html5boilerplate's .htaccess. May not be neces
application: you-app-name-here
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
handlers:
- url: /(.*\.(appcache|manifest))
mime_type: text/cache-manifest
@jakearchibald
jakearchibald / gist:909640
Created April 8, 2011 11:00
Experimenting with IE support
<!--[if IE 8]><meta http-equiv="X-UA-Compatible" content="IE=7"/><![endif]-->
<!--[if gt IE 8]><meta http-equiv="X-UA-Compatible" content="IE=edge"/><![endif]-->
I've been experimenting with this in a couple of projects.
For animations, IE8 compat mode is noticeably quicker/smoother than
IE8 strict. Since I still give 'full' support to IE7 (barring the
odd text-shadow etc which IE8 doesn't support anyway) I use the tags
above to push IE8 into compat mode for smoother animations, but allow
the much faster IE9 to try its standardsy best.
@brettstimmerman
brettstimmerman / gist:943498
Created April 27, 2011 00:38
Load a YUI Gallery module locally for testing.
/**
* Load a YUI Gallery module locally for testing.
*
* Assumes you've built your module with ant and have a local copy of the
* yui3-gallery repo.
*
* This will override Loader's Gallery configuration. Existing Gallery modules
* will load locally, and your new module should load locally as well.
*
* Props to Caridy for helping piece this together.
.whatever {
-webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.5) inset;
-moz-box-shadow: 0 2px 2px rgba(0,0,0,0.5) inset;
-o-box-shadow: 0 2px 2px rgba(0,0,0,0.5) inset;
box-shadow: 0 2px 2px rgba(0,0,0,0.5) inset;
}
@jed
jed / LICENSE.txt
Created May 9, 2011 16:17 — forked from 140bytes/LICENSE.txt
communicate with jsonp
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@jed
jed / LICENSE.txt
Created May 17, 2011 06:33 — forked from 140bytes/LICENSE.txt
publish/subscribe, or pubsub
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@lsmith
lsmith / gist:985487
Created May 22, 2011 13:57
Using YUI 3's groups config to support fetching non-YUI module js files ala requireJS pathing or explicit url
We couldn’t find that file to show.
@bradwright
bradwright / websockets-server.js
Created June 11, 2011 23:29
Pure Node.js WebSockets server
/*
* node-ws - pure Javascript WebSockets server
* Copyright Bradley Wright <[email protected]>
*/
// Use strict compilation rules - we're not animals
'use strict';
var net = require('net'),
crypto = require('crypto');