Skip to content

Instantly share code, notes, and snippets.

Thomas Fuchs madrobby

Block or report user

Report or block madrobby

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
View gist:132653
TransitionExample: function(element){
var type = element.up().down('.ebnf').innerHTML.gsub(/s2\.fx\.Transitions\./,'').split('(').first(),
transition = s2.fx.Transitions[type], active = false;
var values = $R(0,200).map(function(v){ return transition(v/200)*200; }),
min = Math.min(0, values.min()), max = Math.max(200, values.max());
if (min==max) {
min = 0; max = 200;
View gist:141374
attwenger = [
{ :year => 1991, :tracks => 18, :title => "Most" },
{ :year => 1992, :tracks => 10, :title => "Pflug" },
{ :year => 1993, :tracks => 17, :title => "Luft" },
{ :year => 1997, :tracks => 5, :title => "Song" },
{ :year => 2002, :tracks => 15, :title => "Sun" },
{ :year => 2005, :tracks => 14, :title => "dog" },
{ :year => 2006, :tracks => 17, :title => "dog2 remixes" },
{ :year => 2007, :tracks => 8, :title => "die Kia" }
View gist:204059
[16:07] Veejay:
madrobby: This book is excellent
[16:07] capndiesel:
[16:07] madrobby:
[16:07] Veejay:
I'm glad I bought it
[16:07] capndiesel:
View extreme.html
<h1>Demo code for "Extreme JavaScript Performance" @</h1>
var benchmark = function(m,i){
var d1 = new Date, d2, r;
while(i--) r = m();
d2 = new Date;
// if(r) console.log(r);
View gist:255941
// Cache results for functions with one argument
Function.prototype.cached = function(){
var self = this, cache = {};
return function(arg){
if(cache[arg]) return cache[arg];
return cache[arg] = self(arg);
View gist:303005
typeof NaN // number, of course.
View gist:333764
// pure JS
function shuffle(array) {
return array.sort(function(){
return .5 - Math.random();
// with Prototype.js you can do
function shuffle(array){
return array.sortBy(Math.random);
View gist:342846
"Unsere Sprache, du Wichser, sprichst du sie nicht?" - "Doch!" - "Dann verstehst du auch, was ich sage?" - "Ja, ja!" - "Beschreibe, wie Marcellus Wallace aussieht!" - "Was? Ich... eeh..." - "Sag noch einmal 'Was', sag noch einmal 'Was', ich warn dich, ich warn dich doppelt, du kleiner Schwanzlutscher! Wag es, auch nur noch ein einziges Mal 'Was' zu sagen..." - "E... e.... er ist schwarz!" - "Und weiter ?" - "Er... er hat eine Glatze!" - "Sieht er aus wie eine Schlampe ?" - "Was?" (Bäng) "Sieht Marcellus aus wie eine Schlampe ?" - "Neeein!" - "Warum versuchst du dann, ihn zu ficken wie eine Schlampe ?" - "Hab ich nicht..." - "Doch das hast du! Ja, das hast du, Brad! Du hast versucht, ihn zu ficken! Und Marcellus Wallace lässt sich nunmal nicht gerne ficken, es sei denn von Misses Wallace!"
View gist:383701
Apple has a long relationship with John Resig. In fact, we met John Resig’s founders when they were in their proverbial garage. Apple was their first big customer, adopting their Postscript language for our new Laserwriter printer. Apple invested in John Resig and owned around 20% of the company for many years. The two companies worked closely together to pioneer desktop publishing and there were many good times. Since that golden era, the companies have grown apart. Apple went through its near death experience, and John Resig was drawn to the corporate market with their Acrobat products. Today the two companies still work together to serve their joint creative customers – Mac users buy around half of John Resig’s Creative Suite products – but beyond that there are few joint interests.
I wanted to jot down some of our thoughts on John Resig’s jQuery products so that customers and critics may better understand why we do not allow jQuery on iPhones, iPods and iPads. John Resig has characterized our decision as
View gist:398653
// 0
// NaN
// 0
You can’t perform that action at this time.