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
@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": "\\&",
@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)
{
@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:

@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
local Args = {...} --Read Args
local Files = { } --All Files to include
local OutHandle = nil --File Handle to write to
local getDir = fs.getDir or function(str)
return str:match("(.*/)")
end
@chrisdone
chrisdone / typing.md
Last active March 22, 2024 23:24
Typing Haskell in Haskell

Typing Haskell in Haskell

MARK P. JONES

Pacific Software Research Center

Department of Computer Science and Engineering

Oregon Graduate Institute of Science and Technology

<blockstate> == {
"forge_marker": 1,
"defaults": <variant>, // optional, added to all variants
"variants": {
"<property>": {
"<value>": <variant> // variant definition for the specified value of this property; variants for multiple values can be specified.
},
"<variant name>": <variant>, // variant definition for the full variant string
"<variant name>": [<variant1>, ...], // array of definitions for the full variant - result will be the random variant
}
@williewillus
williewillus / primer.md
Last active December 20, 2020 08:13
1.8.9 to 1.9 quick primer
@CoderPuppy
CoderPuppy / amulet-type-ast.idr
Last active September 23, 2016 21:59
Amulet Type AST "Analysis"
data Type = TName TypeName -- Foo
| TVar TypeVar -- a
| TLambda TypeVar Type -- \(a : Type) => b -- not strictly necessary
| TForAll TypeVar Type -- \{a : Type) => b
| TExists TypeVar Type -- (a : Type ** b)
| TFunc Type Type -- a -> b
| TArrow Constraint Type -- a => b
| TInst Type Type -- a b
type Nat f g = forall a. f a -> g a
@exerro
exerro / style.css
Created November 6, 2016 16:51
Howl.ci style
p {
color: rgba(0, 0, 0, 0.8);
font-weight: 400;
}
a {
font-weight: 400 !important;
}