View example.py
import sys
import web
urls = ('/web.py', 'source')
class source:
def GET(self):
web.header('Content-Type', 'text/python')
print open(sys.argv[0]).read()
web.run(urls)
View fuf.sh
cd
mkdir -p .vim/
cd ~/.vim/
mkdir -p autoload/
mkdir -p doc/
mkdir -p plugin/
curl -OL https://bitbucket.org/ns9tks/vim-fuzzyfinder/get/4.2.2.tar.gz
tar zxvf 4.2.2.tar.gz
View gist:1990560
class TestHandler(tornado.web.RequestHandler):
def wordpress_logged_in(self):
wordpress_logged_in_cookie_key = ""
for i in self.cookies:
if i.startswith("wordpress_logged_in_"):
wordpress_logged_in_cookie_key = i
break
wordpress_logged_in_cookie_value = self.get_cookie(wordpress_logged_in_cookie_key)
wordpress_logged_in_cookie_value = urllib.unquote(wordpress_logged_in_cookie_value)
View gist:652797
package {
import Math;
import flash.display.MovieClip;
import flash.display.Stage;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.EventDispatcher;
View gist:648397
//.h file
@interface NavigationBar : UINavigationBar {
}
- (void)drawRect:(CGRect)rect;
@end
//.m file
View gist:646532
-(id) init
{
if( (self=[super init] )) {
CGSize size = [[CCDirector sharedDirector] winSize];
CCTexture2D *bg = [[CCTexture2D alloc] initWithImage:[UIImage imageNamed:@"Default.png"]];
CCSprite *staticBackground0 = [CCSprite spriteWithTexture:bg];
staticBackground0.position = ccp(-size.width/2,size.height/2);
CCSprite *staticBackground1 = [CCSprite spriteWithTexture:bg];
staticBackground1.position = ccp(size.width/2,size.height/2);