Skip to content

Instantly share code, notes, and snippets.

View marktheunissen's full-sized avatar

Mark Theunissen marktheunissen

View GitHub Profile
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active March 31, 2024 18:45 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@marktheunissen
marktheunissen / htmlfiles_migration.inc.php
Created May 4, 2012 18:32
HTML Files Migration into Drupal using Migrate
<?php
class MyMigration extends Migration {
public $base_dir;
/**
* Constructor.
*/
public function __construct() {
parent::__construct();
commit 13a26e81a7d5dba116a7f4729ce977569cade34d
Author: Michal Trojnara <Michal.Trojnara@mirt.net>
Date: Thu Oct 2 13:09:51 2014 +0200
systemd socket activation
diff --git a/CREDITS b/CREDITS
index 8ece5a7..e649af8 100644
--- a/CREDITS
+++ b/CREDITS
@marktheunissen
marktheunissen / gist:15fb1bb70769f094211e2e32e8f41a89
Created June 5, 2016 11:49 — forked from amstanley/gist:9da7febc9a3e3c2228ee
How to install openALPR on a Raspberry Pi a/o 20160214
#!/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 / go-ssh-reverse-tunnel.go
Created September 18, 2018 20:27 — forked from codref/go-ssh-reverse-tunnel.go
Go SSH reverse tunnel implementation (SSH -R)
/*
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
#!/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 / gist:3758037
Created September 20, 2012 20:06
Mac Productivity Brown Bag

Mac Productivity

Apple OSX General

System

  • Hide the dock. It's valuable screen space. At least move it to the left or right side, as vertical is more valuable.
  • Use Spotlight / Quicksilver to quickly open applications, search machine.
@marktheunissen
marktheunissen / service-checklist.md
Created September 19, 2016 11:55 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist

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 / VagrantFile.rb
Last active June 9, 2017 00:10
Running Ansible on a Vagrant machine without a plugin
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.
@marktheunissen
marktheunissen / stunnel-systemd-socket.patch
Last active March 7, 2017 23:50
Stunnel patch for systemd socket activation
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)