This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function GENERATE_STATE_SELECT( $ ) { | |
var STATES ={'':'',AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District of Columbia",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota", OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming"}, | |
STATE_OPTION = '<option value="-key-">-name-</option>'; | |
$( 'label' ).each( function() { | |
if ( this.innerHTML.match(/state/i) ) { | |
var stateInput = $( this ).parent().find( 'input' ), | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title> | |
Auto Suggest jQuery plugin | |
</title> | |
<meta charset='utf-8' /> | |
<meta name="description" content="SearchField example"> | |
</meta> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :rubygems | |
# We are not loading Active Record, nor Active Resources etc. | |
# We can do this in any app by simply replacing the rails gem | |
# by the parts we want to use. | |
gem "actionpack", "~> 3.2" | |
gem "railties", "~> 3.2" | |
gem "tzinfo" | |
# Let's use thin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> | |
quicktime html5 audio | |
</title> | |
<meta charset='utf-8' /> | |
<meta content='Play a quicktime file using an html5 audio element and javascript' name='description'> | |
<style> | |
.audio{ background: black; border: 4px solid black; box-shadow: 1px 2px 2px rgba(0,0,0,.2); width: 200px; height: 16px} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var delay=200, count=0, cycles=9, total=999, | |
style='background:#000;color:#0f2;font:20px monospace; margin:0'; | |
function hack(){ | |
var s = '<p style=\''+style+'\'>'; | |
for(var z=total; z-- > 0;) { | |
s += ' '+ Math.floor(z * Math.random() * cycles); | |
} | |
document.documentElement.innerHTML = s; | |
} | |
hack.loop = function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var delay=300, count=0, cycles=3; | |
function talk() { | |
console.log(true); | |
} | |
talk.loop = function() { | |
if (count < cycles) { | |
talk(); | |
setTimeout(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> | |
Do a barrel roll | |
</title> | |
<meta charset='utf-8' /> | |
<meta name='description' content='' /> | |
<meta name='viewport' content='width=device-width,initial-scale=1'> | |
<style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// layout scrollbar fix for centered pages | |
// adapted from http://www.aaubry.net/fixing-jumping-content-when-scrollbars-appear.aspx | |
// | |
// How to stop a div with id "content" from moving when scroll bar appear | |
// $('#content').layoutScrollbarFix(); | |
(function($){ | |
var defaults = {interval: 100, repeat: 9000}; | |
$.fn.layoutScrollbarFix = function(options) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell me | |
delay 1 * 60 | |
activate | |
do shell script "ruby /Applications/startup.rb" | |
tell application "DelayOpenApps" | |
quit | |
end tell | |
end tell |
NewerOlder