I hereby claim:
- I am daurnimator on github.
- I am daurnimator (https://keybase.io/daurnimator) on keybase.
- I have a public key whose fingerprint is 954A 3772 D62E F90E 4B31 FBC6 C91A 9911 192C 187A
To claim this, I am signing this object:
package = "ndp" | |
version = "scm.3ddc836b7845-0" | |
source = { | |
url = "http://code.matthewwild.co.uk/ndp/archive/3ddc836b7845.zip"; | |
dir = "ndp-3ddc836b7845"; | |
} | |
description = { | |
summary = "ndp is a 'natural date parser' library."; | |
detailed = [[ | |
ndp is a "natural date parser" library. It allows you to |
local cqueues = require "cqueues" | |
local syscall = require "syscall" | |
local aio = {} | |
local aio_mt = {__index = aio} | |
local function new_aio(n) | |
local self = setmetatable({ | |
n = n or 20; | |
id = nil; |
- name: install | Add pgdg key | |
apt_key: url=https://www.postgresql.org/media/keys/ACCC4CF8.asc id=ACCC4CF8 | |
tags: [postgres] | |
- name: install | Add pgdg apt repository | |
apt_repository: repo='deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' | |
tags: [postgres] |
from jinja2.runtime import Undefined | |
SPECIAL_DELIM = [("[{}[".format("="*n), "]{}]".format("="*n)) for n in range(10)] | |
def type_of(v, *types): | |
return any(isinstance(v, t) for t in types) | |
def get_delim(s): | |
if '"' not in s and "\n" not in s and "\\" not in s: | |
return ('"', '"') |
# Python | |
export PIP_DOWNLOAD_CACHE=$HOME/.pip_download_cache | |
source /usr/bin/virtualenvwrapper.sh | |
alias virtualenv-mk=mkvirtualenv | |
alias virtualenv-exit=deactivate | |
alias virtualenv-use=workon | |
complete -o default -o nospace -F _virtualenvs virtualenv-use | |
alias virtualenv-rm=rmvirtualenv | |
complete -o default -o nospace -F _virtualenvs virtualenv-rm | |
alias virtualenv-cp=cpvirtualenv |
// ==UserScript== | |
// @name Better dimensions for Glowing Bear | |
// @namespace http://daurnimator.com | |
// @version 0.1 | |
// @description Glowing Bear sidebar dimensions | |
// @author Daurnimator | |
// @match http://www.glowing-bear.org/ | |
// @grant GM_addStyle | |
// ==/UserScript== |
local unpack = table.unpack or unpack | |
local socket = require "cqueues.socket" | |
local dns = require "cqueues.dns" | |
function socket.tohostname(type, address) | |
local rev | |
if type == socket.AF_INET or type == "AF_INET" then | |
local o1, o2, o3, o4 = address:match("^([12]?%d%d?)%.([12]?%d%d?)%.([12]?%d%d?)%.([12]?%d%d?)$") | |
if o1 == nil then error("invalid address") end | |
rev = string.format("%s.%s.%s.%s.in-addr.arpa", o4, o3, o2, o1) | |
elseif type == socket.AF_INET6 or type == "AF_INET6" then |
I hereby claim:
To claim this, I am signing this object:
# Lua | |
export LUA_INIT='function p(o) for k,v in pairs(o) do print(k,v) end end;' | |
alias luajit='rlwrap luajit' | |
LUA_PATH="./?/init.lua;;" | |
LUA_CPATH=";;" | |
## For 5.3 | |
export LUA_PATH_5_3="$LUA_PATH;/usr/local/share/lua/5.3/?/init.lua;/usr/local/share/lua/5.3/?.lua" | |
export LUA_CPATH_5_3="$LUA_CPATH;/usr/local/lib/lua/5.3/?.so" | |
## For 5.2 | |
export LUA_PATH_5_2="$LUA_PATH;/usr/local/share/lua/5.2/?/init.lua;/usr/local/share/lua/5.2/?.lua" |
#include "lua.h" | |
#include "lauxlib.h" | |
#include "lib/fifo.h" | |
#include "cqueues.h" | |
#include <string.h> /* strerror */ | |
#include <locale.h> /* localconv */ | |
#include <ctype.h> /* isspace, isdigit, isxdigit */ | |
static int lfifo_new(lua_State *L) { | |
size_t size; |