Skip to content

Instantly share code, notes, and snippets.

line = do
option <- many $ noneOf "=\n"
char '='
values <- (many $ noneOf ",\n") `sepBy` (char ',')
return (option, values)
This file has been truncated, but you can view the full file.
22108 execve("/usr/bin/ghc", ["ghc", "test.hs"], [/* 50 vars */]) = 0
22108 brk(0) = 0x14d9000
22108 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
22108 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
22108 fstat(3, {st_mode=S_IFREG|0644, st_size=151472, ...}) = 0
22108 mmap(NULL, 151472, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f90eeb21000
22108 close(3) = 0
22108 open("/usr/lib/libreadline.so.6", O_RDONLY|O_CLOEXEC) = 3
22108 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260e\1\0\0\0\0\0"..., 832) = 832
22108 fstat(3, {st_mode=S_IFREG|0555, st_size=350087, ...}) = 0
@srhb
srhb / libstorage-client.log.sh
Created March 7, 2017 08:24
rexray volume ls output
INFO[0000] updated log level logLevel=debug
DEBU[0000] os.args time=1488874921137 val=[rexray volume ls -l debug]
DEBU[0000] activating libStorage cmd=ls time=1488874921137
DEBU[0000] read spec file host=unix:///var/run/libstorage/656583153.sock path=/var/run/rexray/rexray.spec time=1488874921143
DEBU[0000] is local unix server active sock=/var/run/libstorage/656583153.sock time=1488874921143
INFO[0000] removed invalid sock file sockFile=/var/run/libstorage/656583153.sock time=1488874921143
INFO[0000] removed invalid spec file specFile=/var/run/rexray/rexray.spec time=1488874921143
DEBU[0000] host is empty; initiliazing default services time=1488874921143
INFO[0000] libStorage auto service mode enabled driver=rbd time=1488874921147
DEBU[0000] starting embedded libStorage server time=1488874921147
packageOverrides = super: {
xorg = super.xorg // rec {
xkeyboard_config_dvp = super.pkgs.lib.overrideDerivation super.xorg.xkeyboardconfig (old: {
patches = [
(builtins.toFile "ru-dvp.patch" ''
--- xkeyboard-config-2.16-orig/symbols/ru 2014-12-11 01:56:38.000000000 +0300
+++ xkeyboard-config-2.16/symbols/ru 2016-04-15 14:27:25.075214654 +0300
@@ -719,3 +719,24 @@
key <TLDE> { [ bracketright, bracketleft ] };
key <BKSL> { [ Cyrillic_io, Cyrillic_IO ] };
@srhb
srhb / php-httpd-pcre-jit-test.nix
Last active November 10, 2017 10:27
Tests whether mod_php handles groups in pcre regexes
let testString = "can-use-subgroups"; in
import <nixpkgs/nixos/tests/make-test.nix> {
name = "php-httpd-pcre-jit-test";
machine = { config, lib, pkgs, ... }: {
time.timeZone = "Europe/Copenhagen";
services.httpd = {
enable = true;
adminAddr = "please@dont.contact";
extraSubservices = lib.singleton {
function = f: {
--- php-7.1.11/main/php_compat.h 2017-10-25 09:04:42.000000000 +0200
+++ php-7.1.11/main/php_compat2.h 2017-11-11 16:38:08.373273355 +0100
@@ -28,6 +28,30 @@
#endif
#if defined(HAVE_BUNDLED_PCRE) || !defined(PHP_VERSION)
+#define pcre_jit_stack_free php_pcre_jit_stack_free
+#define pcre_get_compiled_regex_c php_pcre_get_compiled_regex_c
+#define pcre_jit_free_unused_memo php_pcre_jit_free_unused_memo
+#define pcre_get_compiled_regex php_pcre_get_compiled_regex
@srhb
srhb / keybase.md
Created March 14, 2018 12:02
keybase.md

Keybase proof

I hereby claim:

  • I am srhb on github.
  • I am srhb (https://keybase.io/srhb) on keybase.
  • I have a public key whose fingerprint is 6762 6141 31DB 6446 61BE F253 777F 4360 CCD2 B484

To claim this, I am signing this object:

# Run me with nix-shell tensorflow-proto-shell.nix
{ bootstrap ? import <nixpkgs> {} }:
let
overlays = [
(self: super: {
haskellPackages = super.haskellPackages.extend (selfHS: superHS: {
proto-lens = self.haskell.lib.doJailbreak superHS.proto-lens;
tensorflow-proto = self.haskell.lib.addBuildTool superHS.tensorflow-proto self.protobuf3_4;
let
rev = "195620b77085a4e746db33894526116f9062086b";
in
import (builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz") {
overlays = [
(self: super: {
libaom = self.callPackage ./libaom.nix{ };
dtrx = self.callPackage ./dtrx.nix { };
})
];
2018/01/01 * (1) Invoice
revenue:client USD -1000
assets:accounts receivable:client USD 1000
2018/01/02 * (1) Payment
accounts:checking USD 1000
assets:accounts receivable:client USD -1000