Skip to content

Instantly share code, notes, and snippets.

View Roguelazer's full-sized avatar

James Brown Roguelazer

View GitHub Profile
#!/usr/bin/env python3
import argparse
import base64
import json
import re
import sqlite3
from github import Github
#include <unistd.h>
#include <stddef.h>
#include <stdio.h>
#include <sys/prctl.h>
#include <sys/syscall.h>
#include <linux/bpf.h>
#include <linux/seccomp.h>
#include <linux/filter.h>
#!/usr/bin/env python
import collections
import json
import sys
import csv
Key = collections.namedtuple('Key', ['path', 'default'])
Field = collections.namedtuple('Field', ['label', 'key'])
% npm search jsnice
npm WARN Building the local index for the first time, please be patient
⸨░░░░░░░░░░░░░░░░░░⸩ ⠦ : WARN Building the local index for the first time, please be patient
<--- Last few GCs --->
[86535:0x103000000] 49111 ms: Mark-sweep 1040.3 (1353.9) -> 1034.1 (1351.0) MB, 1377.5 / 0.0 ms allocation failure GC in old space requested
[86535:0x103000000] 51409 ms: Mark-sweep 1034.1 (1351.0) -> 1034.0 (1311.0) MB, 2297.5 / 0.0 ms last resort gc
[86535:0x103000000] 52973 ms: Mark-sweep 1034.0 (1311.0) -> 1033.9 (1305.0) MB, 1564.0 / 0.0 ms last resort gc
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.4 Guest Additions for Linux...........
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/bin:/sbin:/usr/sbin
+ PACKAGE=VBoxGuestAdditions
+ PACKAGE_NAME='VirtualBox Guest Additions'
+ UNINSTALL=uninstall.sh
+ ROUTINES=routines.sh
+ ARCH=x86
+ INSTALLATION_VER=5.1.4
+ INSTALLATION_REV=110228
--- wsrep_sst_xtrabackup-v2.orig 2016-07-05 14:21:57.000000000 -0700
+++ wsrep_sst_xtrabackup-v2 2016-07-05 14:13:54.000000000 -0700
@@ -225,11 +225,11 @@
tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=$tpem,key=${tkey},verify=0${sockopt}"
fi
else
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
- tcmd="socat -u TCP-LISTEN:${TSST_PORT},reuseaddr${sockopt} stdio"
+ tcmd="socat -u -6 TCP-LISTEN:${TSST_PORT},reuseaddr${sockopt} stdio"
### Keybase proof
I hereby claim:
* I am Roguelazer on github.
* I am roguelazer (https://keybase.io/roguelazer) on keybase.
* I have a public key whose fingerprint is 9C1B E267 C7A5 D559 739F 333A AEE8 F245 4A41 B87D
To claim this, I am signing this object:
@Roguelazer
Roguelazer / cgrulesengd.c.diff
Created February 23, 2016 03:41
fix syslog usage in cgrulesengd
diff --git a/src/daemon/cgrulesengd.c b/src/daemon/cgrulesengd.c
index ea51f11..0fcee1d 100644
--- a/src/daemon/cgrulesengd.c
+++ b/src/daemon/cgrulesengd.c
@@ -151,10 +151,10 @@ void flog_write(int level, const char *format, va_list ap)
if (logfacility) {
if (copy) {
- vsyslog(LOG_MAKEPRI(logfacility, level), format, cap);
+ vsyslog(level, format, cap);
@Roguelazer
Roguelazer / OUTPUT
Last active January 31, 2016 19:49
pyyaml performance
yaml.load(s, Loader)
30 iterations in 8.3s (276.0ms/iteration)
yaml.load(s, CLoader)
30 iterations in 0.77s (25.6ms/iteration)
yaml.load(s, SafeLoader)
30 iterations in 8.5s (282.6ms/iteration)
yaml.load(s, CSafeLoader)
30 iterations in 0.84s (27.9ms/iteration)
yaml.load(s)
30 iterations in 9.1s (303.1ms/iteration)
#!/usr/bin/env python
"""
Build the entire RPM dependency map. Find all packages that are NOT required by
any deppacks and print them out
"""
from __future__ import print_function
import collections