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 format_number(n,prec,dec,sep) { | |
// Original by Luke Smith (http://lucassmith.name) | |
n = !isFinite(+n) ? 0 : +n; | |
prec = !isFinite(+prec) ? 2 : Math.abs(prec); | |
sep = sep == undefined ? ',' : sep; | |
var s = n.toFixed(prec), | |
abs = Math.abs(n).toFixed(prec), | |
_, i; |
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
http://search.twitter.com/search.json?q=%40human_bot | |
{ | |
"results": [{ | |
"text": "@human_bot Are you feeling okay? Sounds like you've been smoking some crack with the way you've been talking lately.", | |
"to_user_id": 5740619, | |
"to_user": "human_bot", | |
"from_user": "taboularasa", | |
"id": 1306533155, |
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 formatNumber(n) { | |
if (!isFinite(n)) { | |
return n; | |
} | |
var s = ""+n, abs = Math.abs(n), _, i; | |
if (abs >= 1000) { | |
_ = (""+abs).split(/\./); | |
i = _[0].length % 3 || 3; |
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
// Converts the content inside <script src="script2style.js">YOUR CSS</script> | |
// into a style block that will only be applied if js is turned on | |
(function () { | |
var d = document, | |
scripts = d.getElementsByTagName('script'), | |
me = scripts[scripts.length - 1], | |
head = d.getElementsByTagName('head')[0], | |
content = me.innerHTML.replace(/@import\((.*?)\);?/m,function (m,href) { |
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 | |
import httplib | |
import httplibfrom operator import itemgetter | |
import re | |
def get_webpage(site,page): | |
conn = httplib.HTTPConnection(site) | |
conn.request("GET", page) | |
rd = conn.getresponse() | |
print rd.status, rd.reason |
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 | |
import re | |
import urllib2 | |
class get_ip: | |
def __init__(self): | |
pass | |
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 | |
import urllib | |
def show_ip(): | |
print urllib.urlopen("http://tuip.info/ip").read() | |
if __name__ == "__main__": | |
show_ip() |
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 | |
# | |
# quick and dirty script to mauropm <3 | |
# with love | |
# maop... xD | |
# | |
# Todo, parse types (mp3, youtube, etc..) and add code or perhaps | |
# feed youtube-dl with sources from here and later mencoder powa! | |
# |
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 -*- | |
"""[application description here]""" | |
__appname__ = "[application name here]" | |
__author__ = "Stephan Sokolow (deitarion/SSokolow)" | |
__version__ = "0.0pre0" | |
__license__ = "GNU GPL 3.0 or later" | |
import logging |
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
/* | |
* a smart poller for jquery. | |
* (by github) | |
* | |
* simple example: | |
* | |
* $.smartPoller(function(retry) { | |
* $.getJSON(url, function(data) { | |
* if (data) { | |
* doSomething(data) |
OlderNewer