Skip to content

Instantly share code, notes, and snippets.

Nico Kaiser nicokaiser

Block or report user

Report or block nicokaiser

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
nicokaiser / photoSwipeGalleryBuilder.js
Created Mar 19, 2020
Single (instead of multiple) PhotoSwipe Gallery for Mauer Stills
View photoSwipeGalleryBuilder.js
(function ($) {
"use strict";
$(document).ready(function() {
// Pure vanilla JS solution by fabulous Dmitry Semenov.
// Some options changed. numNodes counter altered.
nicokaiser /
Created Jun 30, 2019
Raspberry Pi with read-only file system

Raspberry Pi with read-only file system

Raspbian Buster Lite edition

Here are some very basic steps to make a Raspbian Lite installation read-only (stateless, volatile). This saves write cycles on the SD card and allows the Raspberry Pi to be powered off without shutdown.

Prepare the system

This guide is based on a fresh Raspbian Buster Lite (tested on version June 2019) installation.

#!/usr/bin/env python3
from __future__ import print_function
from datetime import datetime
import os
import sys
import time
import tempfile
import shutil
View events.js
function EventEmitter() {
this._events = {};
this._maxListeners = this._maxListeners || undefined;
module.exports = EventEmitter;
EventEmitter.prototype.emit = function(type) {
if (!this._events[type]) return false;
View etc-nginx-conf.d-ssl.conf
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 24h;

Keybase proof

I hereby claim:

  • I am nicokaiser on github.
  • I am nicokaiser ( on keybase.
  • I have a public key whose fingerprint is 653E FE2F 98D5 3D04 D41C E0F2 8CA2 3480 C02A 6A60

To claim this, I am signing this object:

View client.html
<!DOCTYPE html>
<script src="">
// WAMP session object
var sess;
var wsuri = "ws://localhost:9000";
View contents.lens
<koken:load limit="10" infinite="true">
<div style="margin:25px auto;">
<koken:link lightbox="true">
<koken:img lazy="true" fade="true" />
nicokaiser /
Created Oct 24, 2012
Conversion from Roman to Arabic numerals
$_=shift@ARGV;s/CM/+900/g;s/CD/+400/g;s/XC/+90/g;s/XL/+40/g;s/IX/+9/g;s/IV/+4/g;s/M/+1000/g;s/D/+500/g;s/C/+100/g;s/L/+50/g;s/X/+10/g;s/V/+5/g;s/I/+1/g;eval'print 0'.$_;
nicokaiser /
Created Oct 24, 2012
Conversion from Roman to Arabic numerals
$_=shift@ARGV;s/Mↂ/+9000/g;s/Mↁ/+4000/g;s/CM/+900/g;s/CD/+400/g;s/XC/+90/g;s/XL/+40/g;s/IX/+9/g;s/IV/+4/g;s//+10000/g;s//+5000/g;s/M/+1000/g;s/D/+500/g;s/C/+100/g;s/L/+50/g;s/X/+10/g;s/V/+5/g;s/I/+1/g;/^[0-9\+]*$/ or die;eval'print 0'.$_;
You can’t perform that action at this time.