This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HomeHandler(BaseRequestHandler): | |
def get(self): | |
nodes = memcache.get('nodes') | |
if nodes is None: | |
nodes = Node.all() | |
nodes.fetch(100) | |
nodes = self.snippet('nodes.html',{'nodes':nodes}) | |
memcache.set('nodes', nodes, 1800) | |
topics = memcache.get('topics') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>upload5</title> | |
<script src="jquery-1.4.3.js"></script> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>auto center</title> | |
<style> | |
.box{ | |
width: 500px; | |
border: 2px solid #777; | |
padding: 5px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Script for getting Google Page Rank of page | |
# Google Toolbar 3.0.x/4.0.x Pagerank Checksum Algorithm | |
# | |
# original from http://pagerank.gamesaga.net/ | |
# this version was adapted from http://www.djangosnippets.org/snippets/221/ | |
# by Corey Goldberg - 2010 | |
# | |
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html><!-- simplified doctype works for all previous versions of HTML as well --> | |
<!-- Paul Irish's technique for targeting IE, modified to only target IE6, applied to the html element instead of body --> | |
<!--[if lt IE 7 ]><html lang="en" class="no-js ie6"><![endif]--> | |
<!--[if (gt IE 6)|!(IE)]><!--><html lang="en" class="no-js"><!--<![endif]--> | |
<head> | |
<!-- simplified character encoding --> | |
<meta charset="utf-8"> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSString+Split.h | |
// Categories | |
// | |
// Created by Darcy Liu on 6/17/12. | |
// Copyright (c) 2012 Close To U. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*@fileOverview gravator proxy | |
* reuqire node.js v0.6.7 | |
*/ | |
if(process.argv.length>1&&process.argv[2]=='-d'){ | |
var HOST = '127.0.0.1'; | |
var PORT = 1337; | |
} | |
var HOST = HOST||'0.0.0.0'; | |
var PORT = PORT||80; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Check UTF-8 BOM | |
// go run cbom.go -path=hello.txt | |
package main | |
import( | |
"flag" | |
"os" | |
"log" | |
"fmt" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface Singleton : NSObject | |
+(Singleton*)sharedSingleton; | |
-(void)sayHello; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Show Unversioned Files | |
svn status --no-ignore | grep '^\?' | sed 's/^\? //' | |
#Delete Unversioned Files | |
svn status --no-ignore | grep '^\?' | sed 's/^\? //' | xargs -Ixx rm -rf xx | |
#via http://www.guyrutenberg.com/2008/01/18/delee-unversioned-files-under-svn/ |
OlderNewer