Skip to content

Instantly share code, notes, and snippets.

@madrobby
madrobby / LICENSE.txt
Created May 19, 2011 12:06 — forked from 140bytes/LICENSE.txt
Email validation
Copyright (c) 2011 Thomas Fuchs, http://mir.aculo.us
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@madrobby
madrobby / LICENSE.txt
Created May 19, 2011 12:44 — forked from 140bytes/LICENSE.txt
Functional array sorting
Copyright (c) 2011 Thomas Fuchs, http://mir.aculo.us
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@madrobby
madrobby / LICENSE.txt
Created May 19, 2011 14:46 — forked from 140bytes/LICENSE.txt
Mock objects
Copyright (c) 2011 Thomas Fuchs, http://mir.aculo.us/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@madrobby
madrobby / charm.js
Created June 16, 2011 16:49
Charm customization example
// to override a default
var __CHARM = {
"text":"<b>Hi {first_name}! Do you have feedback or questions?</b><br/> Let us know and we'll get right back to you by email.",
"key":"abcdefg",
"last_name":"Fuchs",
"customer_id":6,
"customer":"scriptaculous",
"email":"[email protected]",
"first_name":"Thomas"
@madrobby
madrobby / charm.css
Created June 16, 2011 16:54
Overriding Charm's CSS rules
/* Here's what we use in Freckle to change the background color of the feedback box. We also use a custom tab image */
#CHARM_TAB {
background-image: url(../images/feedback-tab.png) !important;
}
#CHARM_BOX, #CHARM_MESSAGE {
background:#ef5f92 !important;
background:-webkit-gradient(linear, left top, left bottom, from(#f8679a), to(#ef5f92)) !important;
background:-moz-linear-gradient(center bottom, #ef5f92 0%, #f8679a 100%) !important;
Sehr geehrter Herr Fuchs,
danke fuer Ihre E-Mail.
Das Internet Service Entgelte ist bei allen Marktanbietern ueblich.
@madrobby
madrobby / delayed_hover.js
Created July 5, 2011 19:45
Little Zepto "delayed hover" plugin, using this with backbone.js events
// (c) 2011 Thomas Fuchs
(function($){
$.fn.delayedHover = function(){
var timeout = null, hovering = false, element = this;
function enter(){
element.trigger('delayed_hover:enter');
timeout = null;
hovering = true;
@madrobby
madrobby / LICENSE.txt
Created August 1, 2011 21:34 — forked from 140bytes/LICENSE.txt
lettering.js
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Thomas Fuchs <http://mir.aculo.us/>
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
<a href="javascript:$('#footer,#impact_legend,#caption,.pagehead,#header').hide(),$('#main').css({background:'#fff'}),$('#impact_graph').css({overflow:'visible',border:0,margin:0,padding:0,width:'auto'}),$('.site').css({width:'auto',margin:'0'})">GH impact graph whole page</a>
@madrobby
madrobby / forceScrollbars.coffee
Created September 13, 2011 16:16
Get Safari (Lion) to hopefully always indicate & show scrollbars correctly
# CoffeeScript source
$.fn.forceScrollbars = ->
@css position: 'static'
@[0].offsetHeight if @length > 0
@css position: 'relative'