Skip to content

Instantly share code, notes, and snippets.

View SquidDev's full-sized avatar
🦑
Under the sea

Jonathan Coates SquidDev

🦑
Under the sea
View GitHub Profile
@Yevano
Yevano / blods.lua
Created May 13, 2014 20:48
BLODS - Binary Lua Object (De)Serialization
--[[
BLODS - Binary Lua Object (De)Serialization
]]
--[[
Save on table access.
]]
local pairs = pairs
local type = type
local loadstring = loadstring
@elliottwilliams
elliottwilliams / configuring-openldap.md
Last active August 29, 2015 13:57
Configuring OpenLDAP for OpenMRS ID

Configuring OpenLDAP for OpenMRS ID

Purpose of this document: To document how to configure [OpenLDAP][4] for a development environment of [OpenMRS ID][5]. OpenMRS ID requires other components (a mysql database, nodejs environment, a postfix server to connect to), but OpenLDAP is easily the most complicated to configure.

Installing

Install OpenLDAP. On Ubuntu, this is two packages:

@pocesar
pocesar / get domain without subdomain.php
Created April 11, 2013 20:27
PHP code to get the domain name without subdomains (includes the tld, and the special types from IANA). Don't have support for unicode domain names.
<?php
/**
* @param string $domain Pass $_SERVER['SERVER_NAME'] here
* @param bool $debug
*
* @debug bool $debug
* @return string
*/
function get_domain($domain, $debug = false)
{
@beniwohli
beniwohli / unicode_to_latex.py
Created January 27, 2011 14:08
Map to convert unicode characters to their respective LaTeX representation
# original XML at http://www.w3.org/Math/characters/unicode.xml
# XSL for conversion: https://gist.github.com/798546
unicode_to_latex = {
u"\u0020": "\\space ",
u"\u0023": "\\#",
u"\u0024": "\\textdollar ",
u"\u0025": "\\%",
u"\u0026": "\\&amp;",