Latest snippets
2009/10/09 15:55:39
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
2009/10/02 12:37:27
# coding=utf-8
# Chinese Calendar for App Engine
# author Tim: iso1600 (at) gmail (dot) com, the Chinese calendar code searched from Internet.
from google.appengine.api import users
from google.appengine.ext import webapp
2009/09/30 12:38:07
#1202 Chrome浏览器文本框边框高亮模拟
[ language: css ]
input:focus, select:focus, textarea:focus {
outline: 2px solid #ebc476;
-moz-outline-radius: 5px; !important
}
2009/09/28 21:11:37
#!/usr/bin/env python
#coding:utf-8
import urllib2,re
import urllib,sys
2009/09/28 21:10:33
#204 Dict.cn字典查询
[ language: python ]
#!/usr/bin/env python
#coding:utf-8
import urllib2,re
class Dict:
2009/09/28 20:43:28
#203 利用Google app engine同步twitter消息到sina微博
[ language: python ]
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#to ensure the utf8 encoding environment
import sys
2009/09/28 11:40:24
#1201 Google app engine上的简单twitter发布机器人
[ language: python ]
from google.appengine.api import xmpp
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
TWITTER_USERNAME = "your twitter name"
2009/09/28 11:37:53
#202 把你的appspot转向自定义域名
[ language: python ]
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
...
def redirect_from_appspot(wsgi_app):
def redirect_if_needed(env, start_response):
2009/09/27 20:38:01
#201 几乎使用了所有HTML代码的网页
[ language: html ]
<HTML> <!--Had to cheat on tags that appear before BODY-->
<HEAD>
<TITLE>
One sentence contained within every HTML tag in alphabetical order.
</TITLE>
Code Garden