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 fixEvent(event) | |
| { | |
| if (!event) var event = window.event; | |
| // Fix target property, if necessary (IE 6/7/8 & Safari2) | |
| if ( ! event.target) | |
| { | |
| event.target = originalEvent.srcElement || document; | |
| } |
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
| <?php | |
| class Bijective | |
| { | |
| public $dictionary = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; | |
| public function __construct() | |
| { | |
| $this->dictionary = str_split($this->dictionary); | |
| } |
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
| <?php | |
| function Email($name, $from, $to, $subject, $message, $bcc = null, $attachments = null) | |
| { | |
| ini_set('SMTP', 'localhost'); | |
| ini_set('sendmail_from', $from); | |
| $name = filter_var($name, FILTER_SANITIZE_STRING); | |
| $from = filter_var($from, FILTER_SANITIZE_EMAIL); | |
| $subject = filter_var($subject, FILTER_SANITIZE_STRING); |
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
| <?php | |
| define('SYSTEM_START_TIME', microtime(TRUE)); | |
| define('SYSTEM_START_MEMORY', memory_get_usage()); | |
| register_shutdown_function('_usage'); | |
| function _usage() | |
| { | |
| if(PHP_SAPI !== 'cli') |
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
| # Install the postgres packages | |
| yum install postgresql postgresql-server | |
| # Configure postgresql to start automatically on boot | |
| chkconfig postgresql on | |
| # Stat posgresql | |
| service postgresql start | |
| # Switch to postgres user (required to make initial connection to postgresql with default configuration) | |
| su - postgres | |
| # Make initial connection to the database to test connectivity | |
| psql -d template1 -U postgres |
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
| <?php | |
| /** | |
| * Here is a non-magic-method version for those that need better auto-complete and faster access times. | |
| * It also filters the input to be valid UTF-8 just when needed thanks to phunction. | |
| */ | |
| class input | |
| { | |
| public static $encoding = 'UTF-8'; | |
| public static function server($key, $default = NULL, $control = true) |
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
| /* IE 6/7/8 (1024px+) */ | |
| .superflous { display: block; } | |
| .container { margin: 0 auto; width: 960px; } | |
| .third, .twothirds, .forth, .half, .threeforths, .full { display: inline; float: left; margin: 0 0 0 24px; } | |
| .first, .full { margin: 0;} | |
| .forth { width: 222px; } | |
| .third { width: 304px; } | |
| .half { width: 468px; } |
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
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
| <?php | |
| // @see http://stackoverflow.com/questions/8419038/what-is-the-correct-way-to-detect-whether-string-inputs-contain-html-or-not | |
| // Lets disable HTML/XML for our safety | |
| //header('Content-Type: text/plain'); | |
| $text_mode = false; | |
| # Get the hackers Cheat Sheet | |
| # $ wget http://ha.ckers.org/xssAttacks.xml |
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
| <?checkdnsrr(join('.',array_reverse(explode('.',$p=getenv('REMOTE_ADDR')))).".opm.tornevall.org","A")&&die('Bad Bot');mysql_connect(0,'root','');mysql_select_db('d');extract($_REQUEST);$v=(int)@$v;$i=0;$q='mysql_query';$f='mysql_fetch_row';$n='mysql_num_rows';$x='<input type="';$s="SELECT*FROM";$t='CREATE TABLE IF NOT EXISTS t(i INT AUTO_INCREMENT,a INT,b TEXT,KEY(i))';$h='htmlspecialchars';$q($t);$q(strtr($t,'t','p'));$l=' ORDER BY';$o='';$u='INSERT INTO';$c="b)VALUES(";if(@$b){if(!$v)$q("$u t(a,$c INET_ATON('$p'),'$e')");$v=max($v,mysql_insert_id());$q("$u p(a,$c'$v','$b')");}if($v){$t=$q("$s p WHERE a=$v$l i");echo'<a href="f.php">Back</a>';for(;$i<$n($t);++$i){$r=$f($t);echo'<hr/>'.nl2br($h($r[2]));}}else{$t=$q("$s t$l-i");for(;$i<$n($t);++$i){$r=$f($t);echo'<a href="f.php?v='.$r[0].'">'.$h($r[2]).'</a><br/>';}$o='Title:'.$x.'text"name="e"/><br/>';}echo'<hr/>Post:<form method="post">'.$x.'hidden"name="v"value="'."$v\"/>$o<textarea name=\"b\"></textarea>$x";?>submit"name="w"value="Post"/></form> |