Skip to content

Instantly share code, notes, and snippets.

View DylanFM's full-sized avatar

Dylan Fogarty-MacDonald DylanFM

View GitHub Profile
jQuery.valitito = {}
jQuery.fn.valid = ->
delete jQuery(@).data()['valid']
jQuery(@).trigger('validate')
if jQuery(@).find('input').length
for input in jQuery(jQuery(@).find('input'))
if !$(input).valid()
jQuery(@).data('valid', false)
break
@DylanFM
DylanFM / gist:1002288
Created June 1, 2011 13:28 — forked from sabman/gist:1002167
Greggpollack Last night in Berlin
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>sketch</title>
<style type="text/css" media="screen">
var GAImporter = function() {
this.busy = false;
this.poller = setInterval((function(that) {
return function() {
that.pollJob();
};
})(this), 5000);
this.pollJob = function() {
export dev='/Users/dylanfm/Development'
export devwork='/Users/dylanfm/Development/Work'
# Quick links to client projects
# Only directories
for DIR in `ls -l $devwork | awk '/^d/ { print $NF }'`
do
export $DIR=$devwork/$DIR
done
def f(ra,n)
ra.inject(0) { |r,x| r += 1 if x.include? n; r }
end
require 'stringio'
old_stdout, new_stdout = $stdout, StringIO.new
$stdout = new_stdout
puts "Hello, World!"
$stdout = old_stdout
puts new_stdout.string
#!/bin/bash
VERSION="1.1"
REEV="http://rubyforge.org/frs/download.php/48623/ruby-enterprise-1.8.6-20081215.tar.gz"
REEF="ruby-enterprise-1.8.6-20081215.tar.gz"
REEFF=${REEF%".tar.gz"}
PASSENGER="2.0.6"
echo "#####################################"
echo "Welcome, let's get this party rollin'"
echo "#####################################"