Skip to content

Instantly share code, notes, and snippets.


Jerry Jacobs xor-gate

View GitHub Profile
xor-gate / MailinatorAliases
Created Mar 13, 2020 — forked from nocturnalgeek/MailinatorAliases
A list of alternate domains that point to
View MailinatorAliases
View FreeBSD Jails with VLAN

This is an outdated draft that was used to review the content with FreeBSD contributors. For the latest revision, vist

FreeBSD Jails with VLAN HOWTO

This article discusses how to set up jails on a FreeBSD 11-CURRENT system utilizing VIMAGE (aka VNET) to provide a virtualized independent network stack for each jail with support for VLAN tagging.


xor-gate / Jenkinsfile
Created Oct 2, 2019 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
View Jenkinsfile
Some Jenkinsfile examples
View Jenkinsfile
def getProjectName() {
return 'JenkinsPipeline'
def getJDKVersion() {
return 'jdk1.8.0_101'
def getMavenConfig() {
return 'maven-config'
View armv6-alpine-linux-musleabihf-llvm.cmake
# CMake Toolchain file for cross compilation to Alpine 3.7 running on a Raspberry Pi via LLVM.
# Dec. 2017, Oliver Kuckertz <>
# License: MIT
# Where did you create the Alpine sysroot? Oliver has his cross-toolchains in ~/Toolchains.
SET(CMAKE_SYSROOT "$ENV{HOME}/Toolchains/sysroots/alpine-armhf")
# Where is LLVM/clang installed on your host? These are defaults for common platforms:
xor-gate / popen3_2007.c
Created May 29, 2019 — forked from mike-bourgeous/popen3_2007.c
Two implementations of a popen3() function in POSIX/C providing stdin, stdout, and stderr (
View popen3_2007.c
* This implementation of popen3() was created in 2007 for an experimental
* mpg123 frontend and is based on a popen2() snippet found online. This
* implementation may behave in unexpected ways if stdin/stdout/stderr have
* been closed or modified. No warranty of its correctness, security, or
* usability is given. My modifications are released into the public domain,
* but if used in an open source application, attribution would be appreciated.
* Mike Bourgeous

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](

xor-gate / Jenkinsfile.groovy
Created May 8, 2019 — forked from Faheetah/Jenkinsfile.groovy
Jenkinsfile idiosynchrasies with escaping and quotes
View Jenkinsfile.groovy
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
xor-gate /
Created May 2, 2019 — forked from Evildethow/
Jenkins: Create SSH node, using bash and curl
#!/usr/bin/env bash
set -o nounset -o errexit -o pipefail
usage() {
cat <<EOM
$(basename $0) [OPTIONS]
$(basename $0) [ -j | --jenkins-url | -n | --node-name | -s | -d | --desc | --slave-home | -e | --executors | -sh | --ssh-host | -sp | --ssh-port
| -c | --cred-id | -l | --labels | -u | --user-id | -p | --password | -h | --help ]
xor-gate / DumpHex.c
Created Apr 10, 2019 — forked from ccbrown/DumpHex.c
Compact C Hex Dump Function w/ASCII
View DumpHex.c
#include <stdio.h>
void DumpHex(const void* data, size_t size) {
char ascii[17];
size_t i, j;
ascii[16] = '\0';
for (i = 0; i < size; ++i) {
printf("%02X ", ((unsigned char*)data)[i]);
if (((unsigned char*)data)[i] >= ' ' && ((unsigned char*)data)[i] <= '~') {
ascii[i % 16] = ((unsigned char*)data)[i];