Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
textarea {
width: 500px;
height: 500px;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
(function($) {
function tokenize(line) {
line = line.split("");
i = 0;
var state = "out";
var cur_token = []
var tokens = [];
var last_chr = "";
@drewlesueur
drewlesueur / index.html
Created May 22, 2010 07:54
Readable Validator
<!doctype>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script src="jquery.readable-validator.js"></script>
<script>
$(document).ready(function(){
$('form').readable_validator({
@drewlesueur
drewlesueur / typed.jquery.js
Created May 26, 2010 02:34
Autosave jQuery plugin
// jQuery plugin to easily implement autosave
//
//
//
//
;(function($) {
$.fn.typed = function(settings) {
var config = {
'callback': function(){},
@drewlesueur
drewlesueur / index.html
Created May 29, 2010 02:36
data url in google map overlay
<html>
<head>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA-LQou8q_sKeS5aYUTmi6cBTwM0brOpm-All5BF6PoaKBxRWWERTLoTYiIZTo0Y148gT7RR7GgXyJLA"></script>
<script>
bounds = new GLatLngBounds( new GLatLng(-90, -180)
, new GLatLng(90, 180)
);
copyright = new GCopyright( 'your-copyright'
, bounds
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
//http://code.google.com/apis/maps/documentation/javascript/overlays.html#ImageMapTypes
@drewlesueur
drewlesueur / index.py
Created June 4, 2010 06:40
gae-gist demo
from google.appengine.api import urlfetch
import simplejson as json
self.response.out.write('hello world')
result = urlfetch.fetch("http://www.wikipedia.com")
if result.status_code == 200:
self.response.out.write(result.content)
@drewlesueur
drewlesueur / chrome.html
Created June 4, 2010 08:14
drag and drop files chrome
<!doctype html>
<html>
<head>
</head>
<body style="width:1000px; height: 1000px;">
<h1>Drop</h1>
<script>
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="State Example5" height="1000">
<Require feature="wave" />
</ModulePrefs>
<Content type="html">
<![CDATA[
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
function eua(str){
return str.replace(/./g,function(o){ return '%' + o.charCodeAt(0).toString(16)} )
}
euc("googlewave.com!w+sS5HWxwfH")