Skip to content

Instantly share code, notes, and snippets.

jQuery(document).ready( function() {
// this will run after page load
DUDE.rollover.init();
});
// creates DUDE hash/object
DUDE = {};
// Setup DUDE.rollover child object expando
// DUDE.rollover becomes the main object context
DUDE = {
rollover : function(){
init: function(){},
preload: function(){},
newimage: function(){},
oldimage: function(){}
}
};
<!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">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>feature me</title>
<link rel="stylesheet" href="http://static.jquery.com/files/rocker/css/reset.css" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<!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">
<!-- used as an aid to quickly test proof of concept html in real time -->
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Live HTML</title>
<!--link rel="stylesheet" href="http://static.jquery.com/files/rocker/css/reset.css" type="text/css" / -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<link rel="shortcut icon" href="http://www.13elieve.com/favicon.ico" type="image/x-icon"/>
@gsharp
gsharp / js recurse an object
Created December 2, 2009 10:58
objectrecurse.js
var p = function(msg) {
console.log(msg); // because I frequently mis-spell consele.lgo (no it doesn't work in ie..silly)
};
doIt = function(aObj) {
for (k in aObj) {
var v = aObj[k]; // assign value to v
typeof v != 'string' ? p(k + ": ") || doIt(v) : p(k + ": " + v); // if not string recurse else output k,v
}
/* Extract Pages to Folder */
// regular expression acquire the base name of file
var re = /.*\/|\.pdf$/ig;
// filename is the base name of the file Acrobat is working on
var filename = this.path.replace(re,"");
try {
for ( var i = 0; i < 1; i++) {
gem install --no-rdoc --no-ri -v=2.7 mysql -- --with-mysql-dir=/opt/lampp
#!/usr/local/bin/ruby
# web.rb
# to be run with apache, as long as apache is setup to parse .rb and can execute the file
puts "Content-Type: text/html" # has to happen before output to browser
puts
begin # wrap page in exception to avoid 500 errors
param = ARGV[0]
if ARGV[0]
puts <<-end
@gsharp
gsharp / foo.html
Created January 10, 2011 19:28
test
<html>
RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ http://google.com/file.php?project=$1&category=$2&task=$3 [L]
RewriteRule ^([^/]+)/([^/]+)$ http://google.com/file.php?project=$1&category=$2 [L]
RewriteRule ^([^/]+)$ http://google.com/file.php?project=$1 [L]