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/bin/env php | |
<?php | |
/* PHP Slowloris | |
* Adapted from the script found here: http://seclists.org/fulldisclosure/2009/Jun/207 | |
* Contains get based attack (slow headers) and post based attack (long content length) | |
* | |
* Author: Seppe vanden Broucke | |
*/ | |
function usage($argv){ |
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 | |
class ReconnectingPDO | |
{ | |
protected $dsn, $username, $password, $pdo, $driver_options; | |
public function __construct($dsn, $username = "", $password = "", $driver_options = array()) | |
{ | |
$this->dsn = $dsn; | |
$this->username = $username; | |
$this->password = $password; |
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 mongoObjectId = function () { | |
var timestamp = (new Date().getTime() / 1000 | 0).toString(16); | |
return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function() { | |
return (Math.random() * 16 | 0).toString(16); | |
}).toLowerCase(); | |
}; |
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
import java.lang.Thread | |
import scala.collection.mutable.Queue | |
import akka.actor.Uuid | |
import akka.actor.scala2ActorRef | |
import akka.actor.Actor | |
import akka.event.EventHandler | |
/* | |
* Sleeping Barber Code Club Problem | |
* See (http://en.wikipedia.org/wiki/Sleeping_barber_problem) |
NewerOlder