Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html>
<head>
<!--[if IE]><script src="excanvas.js"></script><![endif]-->
<script src="jquery.js"></script>
<script>
function draw() {
function drawTile() {
echo("""
<style>
table {
border-collapse: collapse;
border: 1px solid black;
}
td {
border: 1px solid black;
width: 60px;
height: 60px;
import math
def find_number(guess,n):
lo = 0
hi = 999999
while guess != n:
#lo, hi = (guess + 1, hi) if guess < n else (lo, guess - 1)
#this if else block replaces that one line.
if guess < n:
lo = guess + 1
hi = hi
function eua(str){
return str.replace(/./g,function(o){ return '%' + o.charCodeAt(0).toString(16)} )
}
euc("googlewave.com!w+sS5HWxwfH")
<?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>
@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>
@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)
<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.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
@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(){},