This file contains 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
<?/*shell: touch s;chmod 777 s;*/$w=array('type','text','value','name','input');function c($x,$v,$s=''){return $x->createElement($v,$s);}function a($x,$v){return $x->appendChild($v);}function s($x,$v,$s=''){return $x->setAttribute($v,$s);}$g=$_GET;$p=$_POST;if($p['l']&&$p['t']){file_put_contents('s',implode('§§',array(0,time(),strip_tags($p['l']),strip_tags($p['t'])))."\n",FILE_APPEND);}$d=new DOMDocument();$h=c($d,'head');a($h,c($d,'title','r'));$m=c($d,'html');a($m,$h);$b=c($d,'body');$f=c($d,'form');s($f,'method','post');$i=c($d,$w[4]);s($i,$w[0],$w[1]);s($i,$w[3],'t');s($i,$w[2],'title');a($f,$i);$i=c($d,$w[4]);s($i,$w[0],$w[1]);s($i,$w[3],'l');s($i,$w[2],'link');a($f,$i);$i=c($d,$w[4]);s($i,$w[0],'submit');a($f,$i);a($b,$f);$z=file_get_contents('s');if($z){$u=c($d,'ul');$z=explode("\n",$z);$z=array_reverse($z,true);foreach($z as $i => $y){if(!$y){continue;}$y=explode('§§',$y);$l=c($d,'li');$a=c($d,'a','^');s($a,'href','?u='.$i);a($l,$a);a($l,$d->createTextNode(' '.$y[0].' '));$a=c($d,'a','v');s($a,'href' |
This file contains 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 formattextimg( $text, $width = 960, $color = array( 0, 0, 0 ), $font = 2 ) { | |
$width = ( ( isset( $width ) && is_numeric( $width ) ) ? ( ( $width >= 100 ) ? (int)$width : 100 ) : 960 ); | |
$text = str_replace( array( '<b>', '</b>', '<strong>', '</strong>' ), '|', $text ); | |
$text_b = preg_split( '/\|/', $text, -1, PREG_SPLIT_OFFSET_CAPTURE ); | |
foreach($text_b as $k => $tb){if($k%2!=0){$textbold[($tb[1]-1)]=$tb[0];}} | |
$text = str_replace('|','',$text); | |
for( $i = 0; $i < strlen( $text ); $i++ ) { | |
if( $string_c >= ( $width - ( (int)(imagefontwidth( $font ) / 2 ) ) ) ) { | |
$space = strrpos( $string, ' ' ); | |
$string_sub = substr( $string, 0, $space ); |
This file contains 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(j,q,u,e,r,y,R,o,x){try{o=jQuery;if(o&&(!R||(R&&o.fn.jquery==R))){x=true}}catch(er){}if(!x||(R&&o.fn.jquery!=R)){(q=j.createElement(q)).type='text/javascript';if(r){q.async=true}q.src='//ajax.googleapis.com/ajax/libs/jquery/'+(R||1)+'/jquery.min.js';u=j.getElementsByTagName(u)[0];q.onload=q.onreadystatechange=(function(){if(!e&&(!this.readyState||this.readyState=='loaded'||this.readyState=='complete')){e=true;x=jQuery;jQuery.noConflict(true)(function(){y(x)});q.onload=q.onreadystatechange=null;u.removeChild(q)}});u.appendChild(q)}else{y(o)}})(document,'script','head',false,false,(function($){$(function(){ | |
/* code goes here */ | |
console.log($.fn.jquery); | |
})})); | |
// readable: | |
(function (j, q, u, e, r, y, R, o, x ) { | |
// IE8 undefined crash fix | |
try { |
This file contains 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
<?php | |
// extended blitz class for better block handling (load assoc arrays correctly, one level) | |
class xBlitz extends Blitz{function xblock($k,$a){foreach($a as $v){$this->block('/'.$k,$v,true);}}} | |
class BlitzView extends View { | |
private $blitzEnvironment = null; | |
public function render( $template ) { | |
$env = $this->getEnvironment( $template ); |
This file contains 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
<?php | |
Slim::hook('slim.before.dispatch', function () { | |
list( $type, $controller_name, $controller_action ) = array_merge( explode( '.', Slim::router()->current()->getName() ), array( null,null,null ) ); | |
if( $type == 'controller' ) { | |
$file = './controllers/'.$controller_name.'.controller.class.php'; | |
if( !is_readable( $file ) ) { return false; } | |
require_once( './controllers/base.controller.class.php' ); | |
require_once( $file ); | |
$class = $controller_name.'Controller'; |
This file contains 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
db.coll.group({ | |
key:{domain:true}, | |
reduce:function(obj,prev){ | |
prev.items.push(obj); | |
}, | |
initial:{items:[]} | |
}); |
This file contains 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
$list_pattern = 'SELECT | |
%5$s AS zip, | |
%6$s AS name, | |
SQRT( ( | |
( %2$d - %8$s ) * | |
( %2$d - %8$s ) | |
) + ( | |
( %1$d - %7$s ) * | |
( %1$d - %7$s ) | |
) ) AS distance |
This file contains 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 l=null; | |
(function(){function z(a,b){for(var c,d=[],f="",e=b.nodeType?[b]:b;c=j.match.c.exec(a);)f+=c[0],a=a.replace(j.match.c,"");a=j.b[a]?a+"*":a;c=0;for(var h=e.length;c<h;c++)i(a,e[c],d);return i.filter(f,d)}function n(a,b){a=Array.prototype.slice.call(a,0);if(b)return b.push.apply(b,a),b;return a}function F(a,b){return"\\"+(b-0+1)}function i(a,b,c,d){var c=c||[],f=b=b||document;if(b.nodeType!==1&&b.nodeType!==9)return[];if(!a||typeof a!=="string")return c;var e,h,g,m,t,o=!0,p=i.i(b),k=[],q=a;do if(x.exec(""), | |
e=x.exec(q))if(q=e[3],k.push(e[1]),e[2]){m=e[3];break}while(e);if(k.length>1&&G.exec(a))if(k.length===2&&j.b[k[0]])h=z(k[0]+k[1],b);else for(h=j.b[k[0]]?[b]:i(k.shift(),b);k.length;)a=k.shift(),j.b[a]&&(a+=k.shift()),h=z(a,h);else if(!d&&k.length>1&&b.nodeType===9&&!p&&j.match.a.test(k[0])&&!j.match.a.test(k[k.length-1])&&(e=i.find(k.shift(),b,p),b=e.d?i.filter(e.d,e.set)[0]:e.set[0]),b){e=d?{d:k.pop(),set:n(d)}:i.find(k.pop(),k.length===1&&(k[0]==="~"||k[0]==="+")&&b.parentNode?b.parentNode:b,p) |
This file contains 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/local/bin/node | |
var fs = require('fs'), | |
useragent = require('/www/utils/node_modules/useragent'), | |
zoneinfo = require('/www/utils/node_modules/zoneinfo'), | |
TZDate = zoneinfo.TZDate, | |
countrycodes = require('/www/utils/node_modules/zoneinfo/lib/countrycodes'); | |
mongo = require('/www/utils/node_modules/mongoq'), | |
db = mongo('mongodb:\/\/localhost/logs'), | |
access = db.collection( 'access' ); |
This file contains 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
<?php | |
header( 'Content-type: image/gif' ); | |
header( 'Expires: Wed, 11 Nov 1998 11:11:11 GMT' ); | |
header( 'Cache-Control: no-cache' ); | |
header( 'Cache-Control: must-revalidate' ); | |
if( !empty( $_GET['c'] ) ) { | |
$rgb = preg_replace( '/[^0-9a-z]/i', '', $_GET['c'] ); | |
die( sprintf( |
OlderNewer