View triangle.php
<? | |
set_time_limit(120); | |
error_reporting(E_ALL ^ E_NOTICE); | |
$in = $_GET["in"]; | |
//$op = $_GET["op"] == 1 ? 1 : 0; | |
$in = $_GET["mode"] == "rnd()" ? rand(1, str_repeat("9", rand(2,9))) : $in; | |
$num = explode(" ", $in); |
View _new.php
<?php | |
error_reporting(E_ALL); | |
function _new ($class_name, $constructor_parameters) { | |
$parameters = array(); | |
$values = array_values($constructor_parameters); |
View results.txt
### 4.4.9 to 5.2.17 ### | |
X-Powered-By: PHP/4.4.9 | |
Content-type: text/html | |
string(44) "compare_php_version() = From 4.4.9 to 5.2.17" | |
string(66) "Backend->backend_md5(The World) = cb4adbc5d0fca498acaa58729f40fff9" | |
string(76) "Backend2->backend_sha1(The World) = e0a97fc105f02a28430eb29fda4b37ade9bd43f4" | |
string(47) "Backend3::backend_version() = Backend is 5.2.17" | |
string(52) "Backend2(reused)->backend_raw(The World) = The World" | |
################################################################# |
View gist:1337691
A Closure object doesn't have a way to return its code as a string (i.e., like JavaScript has), so, it won't work. | |
@ front end (PHP >= 5.3): | |
$calls = new ClosureCall( | |
function ($a, $b) { return $a + $b; }, | |
array(1, 2), | |
"var_dump" | |
); |
View gist:1338366
hosts { | |
megaupload\.com | |
rapidshare\.com | |
filesonic\.com | |
4shared\.com | |
} | |
source www.bunalti.com/?feed=rss2 { | |
meta { |
View gist:1566246
javascript:document.body.innerHTML = '<table width="100%" height="100%" border=0 cellspacing=0 cellpadding=0 VALIGN=Middle ALIGN=CENTER><tr><td><center><br/><br/><br/><br/><br/><br/><br/><img src="http://www.pudim.com.br/SiteBuilder/UploadUsers/pudim.com.br/pudim.jpg"><br><font size="5">www.pudim.com.br</font><br><font size="3"><a href="mailto:pudim@pudim.com.br">pudim@pudim.com.br</a></font></center></td></tr></table>';document.head.innerHTML=document.head.innerHTML.replace(/<link.*>/, "");void(0); |
View gist:1975692
require "nokogiri" | |
require "open-uri" | |
require "fileutils" | |
list = File.open("bmbslsk.txt").read.split("\n").sort | |
#list = [list.first] | |
list.each do |url| | |
output_file = "D:/Devs/bmbslsk/" + url[/\d+/] |
View gist:2356310
# based on http://uberblo.gs/2011/06/high-performance-url-shortening-with-redis-backed-nginx | |
# using code from http://stackoverflow.com/questions/3554315/lua-base-converter | |
# "database scheme" | |
# database 0: id ~> url | |
# database 1: id ~> hits | |
# database 2: id ~> [{referer|user_agent}] | |
# database 3: id ~> hits (when id is not found) | |
# database 4: id ~> [{referer|user_agent}] (when id is not found) | |
# database 5: key "count" storing the number of shortened urls; the id is generated by (this number + 1) converted to base 62 |
View gist:2931935
function AJAXFluentInterface(uri) { | |
this.uri = uri || ""; | |
this.retrieve = function(data, type) { | |
return $.ajax({ | |
type: type || "GET", | |
url: this.uri, | |
dataType: "json", | |
data: data |
View redis_sessions.py
import redis | |
from zope.interface import Interface, implements | |
try: #pragma NO COVERAGE | |
import simplejson as json | |
except ImportError: #pragma NO COVERAGE | |
import json | |
class RedisSession(dict): | |
""" Provides a lazy interface for presenting data stored in a redis DB as a |
OlderNewer