Skip to content

Instantly share code, notes, and snippets.

George Nava GeorgeNava

View GitHub Profile
GeorgeNava /
Created Aug 31, 2010
Basic application handler in python for App Engine
import os
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from google.appengine.ext.webapp.util import run_wsgi_app
# We extend 'webapp.RequestHandler' to reduce excess code
class request(webapp.RequestHandler):
# I hate typing, make it shorter
def write(self,text):
GeorgeNava /
Created May 8, 2010
Converts all images in a folder to base64
This program converts all images in a folder to base64
for embedding in an html page inside a <style> tag like:
The 'content' property only works in webkit browsers.
GeorgeNava / dataserver.js
Created Mar 13, 2010
Dataserver module for MySQL in V8CGI
View dataserver.js
/* dataserver.jss
sql = new SQL();
num = sql.getValue('SELECT count(1) FROM customers')
rec = sql.getRecord('SELECT * FROM customers WHERE id=123456')
recs = sql.getRecords('SELECT * FROM customers')
list = sql.getList('SELECT DISTINCT name FROM customers')
table = sql.getTable('SELECT * FROM customers')
View selectors.js
/* selectors.js
head = $('head')
mydiv = $('#mydiv')
list = $$('li')
function $(selector,element){
You can’t perform that action at this time.