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/python | |
| #coding:utf-8 | |
| import sys | |
| import usable # <- it's my module. Please look gist:770826 | |
| import urllib | |
| from BeautifulSoup import BeautifulSoup | |
| try: | |
| url = sys.argv[1] |
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/python | |
| #coding:utf-8 | |
| import urllib | |
| import sys | |
| import json | |
| def getlink(site): | |
| url = "http://ux.nu/api/short" | |
| param = urllib.urlencode({"url":site}) |
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/python | |
| #coding:utf-8 | |
| import sys,types | |
| from StringIO import StringIO | |
| class Redirect: | |
| def __init__(self): | |
| sys.stdout = StringIO() | |
| self.stdout = sys.stdout |
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
| var html = require("html"); | |
| var base_header = new Object({ | |
| "Content-Type":"text/html;charset=utf-8" | |
| }); | |
| var server = html.createServer(); | |
| server.on("request",function(req,res){ | |
| res.writeHead(200,base_header); |
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
| $(function(){ | |
| var titleSelecter = $("#title"); | |
| var codeSelecter = $("#code"); | |
| var errorMsg = "Empty!"; | |
| $("#submit").click(function(){ | |
| if ( titleSelecter.val().length == 0 ){ |
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 | |
| #coding: utf-8 | |
| from google.appengine.ext import webapp | |
| class webHandler(webapp.RequestHandler): | |
| def write(self, var): | |
| if isinstance(var, str): | |
| self.response.out.write(var) | |
| elif isinstance(var, tuple): |
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 | |
| #coding:utf-8 | |
| import commands | |
| import sys | |
| try: | |
| file = sys.argv[1] | |
| except: | |
| print "movietomp3.py [filename]" |
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
| def hello(): | |
| print "hello world" |
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 | |
| #coding: utf-8 | |
| import urllib | |
| import cgi | |
| import os | |
| import json | |
| import re | |
| import sys |
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
| $(function(){ | |
| $("span#search_box").click( | |
| function(){ | |
| if ($("span#search").css("display") == "none"){ | |
| $("span#search").slideDown("nomal"); | |
| } | |
| else { | |
| $("span#search").slideUp("nomal"); | |
| } | |
| }); |