Skip to content

Instantly share code, notes, and snippets.

@yuribossa
yuribossa / zenbun.py
Created January 6, 2010 11:24
Fulltext search on Google App Engine
# -*- coding: utf8 -*-
# Fulltext search module on Google App Engine.
from google.appengine.ext import db
class Text(db.Model):
content = db.StringProperty(multiline=True)
created = db.DateTimeProperty(auto_now_add=True)
# -*- coding: utf8 -*-
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
class TestModel(db.Model):
message = db.StringProperty()
# -*- coding: utf8 -*-
# GeoHash decode and encode library
base32 = {
'0': '00000',
'1': '00001',
'2': '00010',
'3': '00011',
'4': '00100',
@yuribossa
yuribossa / fizzbuzz.py
Created February 18, 2010 12:21
FizzBuzz on Google App Engine
# -*- coding: utf8 -*-
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.api import memcache
from google.appengine.api import mail
from google.appengine.api.labs import taskqueue
from google.appengine.api import users
class FizzBuzzHandler(webapp.RequestHandler):
@yuribossa
yuribossa / tumblr_backup.py
Created February 27, 2010 11:01
Tumblr Photo backup on Google App Engine.
# -*- coding: utf8 -*-
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.api import urlfetch
from google.appengine.ext import db
from google.appengine.api import mail
from google.appengine.api.labs import taskqueue
from BeautifulSoup import BeautifulStoneSoup
import string
@yuribossa
yuribossa / gist:716577
Created November 26, 2010 11:17
Simple Popup Message based on jQuery Mobile
function jqmSimpleMessage(message) {
$("<div class='ui-loader ui-overlay-shadow ui-body-b ui-corner-all'><h1>" + message + "</h1></div>")
.css({
display: "block",
opacity: 0.96,
top: window.pageYOffset+100
})
.appendTo("body").delay(800)
.fadeOut(400, function(){
$(this).remove();
@yuribossa
yuribossa / update.js
Created November 22, 2011 14:32
update() with validation of Mongoose
/**
* update.js
* New update() with validation of Mongoose
*
* written by yuribossa
* https://twitter.com/yuribossa
*/
/**
* setNewUpdate