Skip to content

Instantly share code, notes, and snippets.

View emestee's full-sized avatar

Michael Stolovitzsky emestee

View GitHub Profile
emestee /
Created August 17, 2018 13:50 — forked from magnetikonline/
Enable LDAP over SSL (LDAPS) for Microsoft Active Directory servers.

Enable LDAP over SSL (LDAPS) for Microsoft Active Directory servers

By default Microsoft active directory servers will offer LDAP connections over unencrypted connections (boo!).

The steps below will create a new self signed certificate appropriate for use with and thus enabling LDAPS for an AD server. Of course the "self-signed" portion of this guide can be swapped out with a real vendor purchased certificate if required.

Steps have been tested successfully with Windows Server 2012R2, but should work with Windows Server 2008 without modification. Will require both a system with OpenSSL (ideally Linux/OSX) and (obviously) a Windows Active Directory server.

emestee / Dockerfile
Created June 20, 2015 10:10
MySQL under docker doesn't allow connections on docker interface - solution
FROM mysql:5
COPY my.cnf /etc/mysql/conf.d/bind.conf
COPY schema.sql /root/schema.sql
VOLUME ["/var/lib/mysql"]
CMD mysqld
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php?/$1 [QSA,L]
function removeDuplicates($firstArray, $secondArray, $byTheKey)
$collect = array();
$walker = function($v, $k) use(& $collect, $byTheKey) { $collect[$v[$byTheKey]] = $v; };
array_walk(array_merge($firstArray, $secondArray), $walker);
return $collect;
define('WARRIOR_OFFSET', 16);
define('MAGE_OFFSET', 17);
define('CLASS_MASK', ( 1 << WARRIOR_OFFSET ) | ( 1 << MAGE_OFFSET ));
$bitmask = 1 << MAGE_OFFSET | 1 << WARRIOR_OFFSET;
$classMap = array(
0b00 => 'error',
class Foo
public function __construct()
print "in foo()!\n";
<route name="json" pattern="^/json" stop="false" cut="true" output_type="json"/>
<route name="csvFile" pattern="^/csvFile" stop="false" cut="true" output_type="csvFile"/>
<route name="csv" pattern="^/csv(^File)" stop="false" cut="true" output_type="csv"/>
<route name="php" pattern="^/php" stop="false" cut="true" output_type="php"/>
<route name="xls" pattern="^/xls" stop="false" cut="true" output_type="xls"/>
<route name="xml" pattern="^/xml" stop="false" cut="true" output_type="xml"/>
<route name="toolbar" pattern="^/toolbar" stop="false" cut="true" output_type="toolbarHtml"/>
<route name="json" pattern=".json$" cut="true" output_type="json" stop="false"/>
<route pattern="kittens/" name="kittens">
<route pattern="counter$" name=".counter" module="Kittens" action="Counter"/>