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
@mrdomino
mrdomino / chrome
Created Dec 31, 2016
OpenBSD script to run chrome as a separate user in a Xephyr window
View chrome
#!/bin/sh
set -eux
NDISPLAY=:13
if [ $# -ge 1 ]
then
case $1 in
:*)
NDISPLAY=$1
shift
@mrdomino
mrdomino / browse.sh
Created Dec 5, 2016
run firefox as a separate user in openbsd
View browse.sh
#!/bin/sh
set -eu
tmpfile=$(mktemp)
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 - ;"
export DOAS_XAUTH
View a.c
#include <stdio.h>
int main() {
while (1) puts("whee");
}
View keybase.md

Keybase proof

I hereby claim:

  • I am mrdomino on github.
  • I am mrdomino (https://keybase.io/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:

View flag.sh
#!/bin/sh
# 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)) { \
View noew.c++
#include <cstdio>
#include <exception>
#include <utility>
// hypothetically...
class MyException : public std::exception {
public:
const char *what() const noexcept {
return "nope";
@mrdomino
mrdomino / copies.c++
Last active Oct 24, 2015
copy and assignment operator autogeneration
View copies.c++
class A {};
class B {
public:
B() = default;
B(B const&) = delete;
};
class C {
public:
View make_fat_objc_library.sh
#!/bin/sh
function main {
for cpu in ${CPUS[@]}
do
echo ==== $cpu ====
check bazel build --ios_cpu=$cpu $DEPS
check mkdir -p $WORK/$cpu
for dep in $DEPS
do
You can’t perform that action at this time.