Skip to content

Instantly share code, notes, and snippets.

commit 13a26e81a7d5dba116a7f4729ce977569cade34d
Author: Michal Trojnara <[email protected]>
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 / 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 / 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 / install_ruby_rpi.sh
Created July 21, 2016 17:46 — forked from blacktm/install_ruby_rpi.sh
A Bash script to install Ruby 2.3 on the Raspberry Pi (Raspbian)
#!/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 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 / ls.sh
Created April 2, 2015 09:31
5592aa63-54d9-4d25-9445-196a20b9d558 tmp files
[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 August 13, 2014 14:07
Here are some things you can do with Gists in GistBox.
// 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 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)
@marktheunissen
marktheunissen / gist:5784425
Created June 14, 2013 19:12
Patch for simplesaml auth
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') {