Skip to content

Instantly share code, notes, and snippets.

View daurnimator's full-sized avatar

daurnimator

View GitHub Profile
from pylab import *
from numpy import *
from numpy.linalg import solve
from scipy.integrate import odeint
from scipy.stats import norm, uniform, beta
from scipy.special import jacobi
a = 0.0
@daurnimator
daurnimator / rock_to_PKGBUILD.lua
Last active October 8, 2022 15:51
Script to convert LuaRocks to Arch Linux PKGBUILDs
#!/usr/bin/env lua
local rockspec_name = assert(arg[1])
local function log(level, fmt, ...)
io.stderr:write(level .. "\t" .. string.format(fmt, ...) .. "\n")
end
local function append(tbl, ...)
for _, v in ipairs {...} do
@insin
insin / srsly.js
Last active August 29, 2015 14:01
function new_(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z) {
switch (arguments.length) {
case 0: return new this
case 1: return new this(a)
case 2: return new this(a, b)
case 3: return new this(a, b, c)
case 4: return new this(a, b, c, d)
case 5: return new this(a, b, c, d, e)
case 6: return new this(a, b, c, d, e, f)
case 7: return new this(a, b, c, d, e, f, g)
@daurnimator
daurnimator / sandbox.lua
Last active April 5, 2016 12:56
Sandbox using ljsyscall
local ffi = require "ffi"
local S = require "syscall"
local c = S.c
local t = S.types.t
local util = S.util
local nr = require "syscall.linux.nr"
local lfs = require "syscall.lfs"
-- Returns an iterator over open fds
local function open_fds(pid)
@daurnimator
daurnimator / gist:a61d223df1f83da8b72a
Created March 14, 2015 21:05
TamperMonkey script - Better dimensions for Glowing Bear
// ==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==
@daurnimator
daurnimator / afd.c
Created March 29, 2015 13:28
windows low level polling. compile with: cl /EHsc /Wall /WX main.c afd.c
#pragma warning(push, 3)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <Winternl.h>
#pragma comment(lib, "Ntdll.lib")
#pragma warning(pop)
#include "afd.h"
@jhass
jhass / .gitignore
Last active July 24, 2022 23:15
powerdns remote backend for hashbang.sh
python/
*.log
@lukego
lukego / 0readme.md
Created August 16, 2015 16:25
Performance counter access with inline assembler in Lua
@daurnimator
daurnimator / dirmngr.conf
Last active July 14, 2021 08:24
My GPG config
hkp-cacert ~/.gnupg/sks-keyservers.netCA.pem
@a-dma
a-dma / yubitouch.sh
Last active March 10, 2022 14:43
Bash script for setting or clearing touch requirements for cryptographic operations in the OpenPGP application on a YubiKey 4.
#!/bin/bash
# Bash script for setting or clearing touch requirements for
# cryptographic operations the OpenPGP application on a YubiKey 4.
#
# Author: Alessio Di Mauro <[email protected]>
GCA=$(which gpg-connect-agent)
DO=0
UIF=0