Skip to content

Instantly share code, notes, and snippets.

var Tabs = new Class({
Implements: [Options, Events],
options: {
tab: '.nav',
content: '.section',
currentClass: 'current'
},
Tabs.Ajax = new Class({
Extends: Tabs, // makes this a sub class of `Tabs`
// can add some new options w/o losing the ones from Tab
options: {
loadingHTML: '<p>Loading...</p>'
},
// give it a new jQuery prototype method
$('#pane').tabs({tab: 'a', content: '.section'});
// add some events after creating an instance
$('#pane').tabs('addEvent', 'show', function(){
$(document.body).toggleClass('toggle');
});
$('#pane1').ajaxTabs({
tab: 'a',
content: '.section',
/*
---
source: http://gist.github.com/133677
provides: document.write
description: jQuery based document.write replacement
requires: jQuery
authors:
- Thomas Aylott -- SubtleGradient.com
@ryanflorence
ryanflorence / Virtual Host.tmSnippet
Created May 19, 2010 23:16
Alternate vhost textmate snippet
# domain: ${1:domain.com}
<VirtualHost *:80>
# Admin email, Server Name (domain name) and any aliases
ServerAdmin ${2:webmaster}@${1}
ServerName ${1}
ServerAlias ${3:www.${1}}
# Index file and Document Root (where the public files are located)
/**
* MooTools selector engine does not match data-* attributes.
* This will be fixed in 1.3, when the engine is swapped for Slick.
*/
Selectors.RegExps.combined = (/\.([\w-]+)|\[([\w-]+)(?:([!*^$~|]?=)(["']?)([^\4]*?)\4)?\]|:([\w-]+)(?:\(["']?(.*?)?["']?\)|$)/g);
Request.Fiddles = new Class({
Extends: Request.JSONP,
options: {
update: document.body,
limit: 5,
item: 'li',
itemHtml:
'<a href="{url}{version}" target="_blank">{title}</a> ' +
#!/usr/bin/ruby
require 'fileutils'
require 'yaml'
puts "# Global Deploy Script start"
branch = ARGV[0]
repository = ARGV[1]
puts "Branch: #{branch}"
puts "Repository: #{repository}"
on idle
tell application "Safari"
activate
set URL of front document to "http://www.engadget.com/2010/06/07/steve-jobs-live-from-wwdc-2010/?sort=newest"
end tell
return 4
#!/usr/bin/env ruby
# A few helpful tips about the Rules file:
#
# * The order of rules is important: for each item, only the first matching
# rule is applied.
#
# * Item identifiers start and end with a slash (e.g. “/about/” for the file
# “content/about.html”). To select all children, grandchildren, … of an
# item, use the pattern “/about/*/”; “/about/*” will also select the parent,