Skip to content

Instantly share code, notes, and snippets.

View vitch's full-sized avatar

Kelvin Luck vitch

View GitHub Profile
@vitch
vitch / jquery.maskedinput-1.2.2.js.diff
Created November 18, 2010 17:59
jquery.maskedinput-1.2.2.js
@@ -9,7 +9,7 @@
var pasteEventName = ($.browser.msie ? 'paste' : 'input') + ".mask";
var iPhone = (window.orientation != undefined);
- $.mask = {
+ $.maskedInput = {
//Predefined character definitions
definitions: {
'9': "[0-9]",
@@ -49,7 +49,7 @@
@vitch
vitch / gist:802153
Created January 29, 2011 20:20
jScrollPane post-commit hook...
#!/bin/sh
#
# An example hook script that is called after a successful
# commit is made.
#
# To enable this hook, rename this file to "post-commit".
java -jar yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar script/jquery.jscrollpane.js -v --line-break 4000 -o script/jquery.jscrollpane.min.js
git add script/jquery.jscrollpane.min.js
@vitch
vitch / gist:811401
Created February 4, 2011 17:19
Example of a backbone controller with methods which wait for initialisation before running
MapPageController = Backbone.Controller.extend(
{
initialized: false,
routes: {
'' : 'index',
'/trip/:id' : 'trip'
},
initialize: function()
{
var c = this;
@vitch
vitch / apply-styles.css
Created August 1, 2012 13:44
SVG background images on d3 fills
#graph svg g.us rect
{
fill: url(#tile-us) #cccccc;
}
#graph svg g.worldwide rect
{
fill: url(#tile-ww) #cccccc;
}
@vitch
vitch / text.html
Created August 17, 2012 15:21
A file that errors in ripple emulator
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
</head>
<body>
<script src="/scripts/lib/require-2.0.5.js"></script>
<script src="cordova-2.0.0.js"></script>
<script type="text/javascript">
document.addEventListener(
'deviceready',
function()
{
console.log('1');
console.log('2');
},
<script src="/scripts/lib/require-2.0.5.js"></script>
<script src="cordova-2.0.0.js"></script>
<script type="text/javascript">
document.addEventListener(
'deviceready',
function()
{
console.log('1');
console.log(require);
console.log('2');
@vitch
vitch / config.json
Created December 1, 2012 18:50
Another Inlet
{"description":"Another Inlet","endpoint":"","display":"svg","public":true,"require":[],"tab":"edit","display_percent":0.7,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01}
input, label {
display: block
}
Verifying that +vitch is my openname (Bitcoin username). https://onename.com/vitch