Skip to content

Instantly share code, notes, and snippets.


Frank syphernl

  • The Netherlands
View GitHub Profile
mtigas / gist:952344
Last active Nov 26, 2022
Mini tutorial for configuring client-side SSL certificates.
View gist:952344

Client-side SSL

For excessively paranoid client authentication.

Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes:

diogok / OnlineUsers.php
Created May 4, 2011
Online Users using PHP and Redis
View OnlineUsers.php
include 'predis/predis.phar';
class OnlineUsers {
/* time to consider user online */
private $minutes = 5 ;
function online() {
/* current hour and minute */
tomerd / gauge.js
Last active Aug 6, 2022
google style gauges using javascript d3.js
View gauge.js
function Gauge(placeholderName, configuration)
this.placeholderName = placeholderName;
var self = this; // for internal d3 functions
this.configure = function(configuration)
this.config = configuration;
markrickert /
Created Jun 12, 2012
Git Archive Bash Script
# Takes one parameter: a remote git repository URL.
# This is the stuff this script does:
# 1. Clones the repository
# 2. Fetches all remote branches
# 3. Compresses the folder
# 4. Deletes the cloned folder.
View Module.php
* @author Antoine Hedgecock
* @namespace
namespace Application;
use Zend\Acl\Acl,
View layout.phtml
echo $this->navigation('default-navigation')
'indent' => 4,
'ulClass' => '',
'minDepth' => 1,
quiver /
Created Oct 13, 2012
Python port of zabbix_get command
# : Python port of zabbix_get
import argparse
import socket
import struct
import sys
def str2packed(data):
KartikTalwar /
Last active Nov 18, 2022
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
luchaos / User.php
Last active Aug 29, 2015
OAuth - Remembering granted authorization
View User.php
class User extends Eloquent implements UserInterface, RemindableInterface {
// ...
public function scopesAuthorizedByClientId($clientId)
$scopesAuthorized = array();
$session = DB::table('oauth_sessions')
->where('client_id', $clientId)
SqyD / ventilation.yaml
Last active Aug 23, 2022
ESPHome PWM fan using a Wemos D1 mini lite
View ventilation.yaml
# Controlling my Buva Qstream ventilation system using:
# * A Wemos D1 mini lite (an ESP8266 based board)
# * A Wemos power shield so I can power the Wemos from the ventilation units 12V supply.
# * A simple PWM to 10V convertor like this:
# * The amazing ESPHome firmware tool:
# * Home Assistant to tie it all together:
# I used to use a Raspberry Pi and some Python code for this. See
# The Wemos approach seems more stable and doesn't require external USB power.