Skip to content

Instantly share code, notes, and snippets.

Mark Theunissen marktheunissen

Block or report user

Report or block marktheunissen

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
@marktheunissen
marktheunissen / go-ssh-reverse-tunnel.go
Created Sep 18, 2018 — forked from codref/go-ssh-reverse-tunnel.go
Go SSH reverse tunnel implementation (SSH -R)
View go-ssh-reverse-tunnel.go
/*
Go-Language implementation of an SSH Reverse Tunnel, the equivalent of below SSH command:
ssh -R 8080:127.0.0.1:8080 operatore@146.148.22.123
which opens a tunnel between the two endpoints and permit to exchange information on this direction:
server:8080 -----> client:8080
View gstreamer-build.sh
#!/bin/bash
export MAKEFLAGS="-j 3"
set -e
BRANCH="1.14"
[ -n "$1" ] && BRANCH=$1
# Create a log file of the build as well as displaying the build on the tty as it runs
exec > >(tee build_gstreamer.log)
@marktheunissen
marktheunissen / service-checklist.md
Created Sep 19, 2016 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist
View service-checklist.md

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@marktheunissen
marktheunissen / install_ruby_rpi.sh
Created Jul 21, 2016 — forked from blacktm/install_ruby_rpi.sh
A Bash script to install Ruby 2.3 on the Raspberry Pi (Raspbian)
View install_ruby_rpi.sh
#!/bin/bash
# -----------------------------------------------------------------------
# Installs Ruby 2.3 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
#
# Run from the web:
# bash <(curl -s raw_script_url_here)
# -----------------------------------------------------------------------
# Set up variables
@marktheunissen
marktheunissen / gist:15fb1bb70769f094211e2e32e8f41a89
Created Jun 5, 2016 — forked from amstanley/gist:9da7febc9a3e3c2228ee
How to install openALPR on a Raspberry Pi a/o 20160214
View gist:15fb1bb70769f094211e2e32e8f41a89
#!/bin/bash
# STATUS A/O 2016 02 14: tested, works
# based on https://barclaysapps.wordpress.com/2014/07/06/openalpr-install-for-rpi-and-udoo-and-tre-and-yun/ ,
# http://lukagabric.com/raspberry-pi-license-plate-recognition/, and updated for new packages.
# there are other random notes and googled pages that also informed this tutorial whihc may not be specifically referenced.
#This is not optimized for space or whatever, but does work. well, not as of 2016 01 03 but working to fix that)
# discussion is at https://groups.google.com/forum/#!topic/openalpr/-vckIsPe618: please contribute if you can, and ask questions if you # # have them
# thanks to Timis for tips and hints...
@marktheunissen
marktheunissen / ls.sh
Created Apr 2, 2015
5592aa63-54d9-4d25-9445-196a20b9d558 tmp files
View ls.sh
[mark@endpointf2e4f62a tmp]$ find /tmp -maxdepth 1 -user ee1e319c567d43489dd4d3d5443e711f -ls
655920 0 -rw-r--r-- 1 ee1e319c567d43489dd4d3d5443e711f ee1e319c567d43489dd4d3d5443e711f 0 Apr 1 05:00 /tmp/info-html.tmp
656201 0 -rw-r--r-- 1 ee1e319c567d43489dd4d3d5443e711f ee1e319c567d43489dd4d3d5443e711f 0 Apr 1 05:01 /tmp/info-html1.tmp
656482 0 -rw-r--r-- 1 ee1e319c567d43489dd4d3d5443e711f ee1e319c567d43489dd4d3d5443e711f 0 Apr 1 05:01 /tmp/info-html2.tmp
656514 0 -rw-r--r-- 1 ee1e319c567d43489dd4d3d5443e711f ee1e319c567d43489dd4d3d5443e711f 0 Apr 1 05:01 /tmp/info-html3.tmp
656758 0 -rw-r--r-- 1 ee1e319c567d43489dd4d3d5443e711f ee1e319c567d43489dd4d3d5443e711f 0 Apr 1 05:01 /tmp/info-html4.tmp
656903 0 -rw-r--r-- 1 ee1e319c567d43489dd4d3d5443e711f ee1e319c567d43489dd4d3d5443e711f 0 Apr 1 05:01 /tmp/info-html5.tmp
659716 0 -rw-r--r-- 1 ee1e319c567d43489dd4d3d5443e711f ee1e319c567d43489dd4d3d5443e711f 0 Apr 1 05:01 /tmp/i
@marktheunissen
marktheunissen / 0_reuse_code.js
Created Aug 13, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@marktheunissen
marktheunissen / stunnel-systemd-socket.patch
Last active Mar 7, 2017
Stunnel patch for systemd socket activation
View stunnel-systemd-socket.patch
diff a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -478,8 +478,18 @@ if test "$fips" = "auto"; then
])
fi
+# Check for systemd support for socket activation.
+AC_CHECK_LIB(systemd-daemon, sd_notify, SYSTEMD_LIBS="-lsystemd-daemon")
+AC_CHECK_HEADERS(systemd/sd-daemon.h)
@marktheunissen
marktheunissen / gist:5784425
Created Jun 14, 2013
Patch for simplesaml auth
View gist:5784425
diff --git a/sites/all/modules/contrib/simplesamlphp_auth/simplesamlphp_auth.module b/sites/all/modules/contrib/simplesamlphp_auth/simplesamlphp_auth.module
index 05ceba3..f9b7d3f 100644
--- a/sites/all/modules/contrib/simplesamlphp_auth/simplesamlphp_auth.module
+++ b/sites/all/modules/contrib/simplesamlphp_auth/simplesamlphp_auth.module
@@ -159,6 +159,11 @@ function simplesamlphp_auth_init() {
global $_simplesamlphp_auth_saml_config;
global $_simplesamlphp_auth_saml_version;
+ // Bail on pages that aren't concerned with user login.
+ if (arg(0) !== 'saml_login' && arg(0) !== 'user' && arg(0) !== 'my-account') {
@marktheunissen
marktheunissen / VagrantFile.rb
Last active Jun 9, 2017
Running Ansible on a Vagrant machine without a plugin
View VagrantFile.rb
Vagrant::Config.run do |config|
config.vm.define :default do |tw_config|
tw_config.vm.box = "precise64"
tw_config.vm.box_url = "http://files.vagrantup.com/precise64.box"
tw_config.vm.provision :shell, :path => "provision/ansible-setup.sh"
tw_config.vm.provision :shell, :path => "provision/controller-setup.sh"
# Load a local setup file if it exists, so you can use it to
# provide additional provisioning steps.
You can’t perform that action at this time.