Skip to content

Instantly share code, notes, and snippets.

Jōshin Steven Dee mrdomino

Block or report user

Report or block mrdomino

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View exec-self.c
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
static const char slash[] = "/";
int main(__attribute__((unused)) int argc, char* argv[]) {
char *self;
mrdomino /
Last active Mar 25, 2017
Passphrase generator
#!/usr/bin/env python3
Generates random memorable passphrases.
This script builds a set of unique suitable words from a dictionary file, then
produces one or more passphrases chosen at random form that set. It also
optionally prints estimates of the entropy (i.e. difficulty to guess) of the
produced passphrases based on the number of items in the set and the number of
words per phrase.
mrdomino / chrome
Created Dec 31, 2016
OpenBSD script to run chrome as a separate user in a Xephyr window
View chrome
set -eux
if [ $# -ge 1 ]
case $1 in
mrdomino /
Created Dec 5, 2016
run firefox as a separate user in openbsd
set -eu
xauth -q -f $tmpfile generate $DISPLAY . untrusted
xauth_data=$(xauth -f $tmpfile nlist $DISPLAY)
rm -f $tmpfile
DOAS_XAUTH="xauth -q remove $DISPLAY ; echo $xauth_data | xauth nmerge - ;"
View a.c
#include <stdio.h>
int main() {
while (1) puts("whee");
mrdomino / stkintro.c
Last active Jun 21, 2016
compile with -lsigsegv
View stkintro.c
#include <inttypes.h>
#include <setjmp.h>
#include <signal.h>
#include <sigsegv.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
struct bond {
uintptr_t dof;

Keybase proof

I hereby claim:

  • I am mrdomino on github.
  • I am mrdomino ( on keybase.
  • I have a public key whose fingerprint is F308 6F15 F5F7 2D0B 4826 DF2E F229 5805 E4BE 28B6

To claim this, I am signing this object:

# usage: flag <flag> [args...]
# e.g.: flag --foo= x y z
# --foo=x --foo=y --foo=z
trap "awk '/^# /' $(which $0) | cut -d' ' -f2-" EXIT
set -eu; flag=$1; shift; for arg in "$@"; do echo $flag$arg; done
exec true
View log_if.h
#include <cstdlib>
#include <exception>
#include <iostream>
#include <sstream>
#include <utility>
#define LOG_IF(TEST, LEVEL) \
if (!(TEST)) { \
} else if (_::minLevel > (LEVEL)) { \
You can’t perform that action at this time.