Skip to content

Instantly share code, notes, and snippets.

View hermanbanken's full-sized avatar
🇳🇱

Herman hermanbanken

🇳🇱
View GitHub Profile
@hermanbanken
hermanbanken / preseed.cfg
Last active August 29, 2015 13:59
Preeseed CH
# Using preeseeding https://help.ubuntu.com/lts/installation-guide/i386/preseed-using.html
# Inspired by http://www.briancarpio.com/2012/04/04/system-automation-part-1/
# and https://help.ubuntu.com/12.04/installation-guide/example-preseed.txt
# Change PXE default:
# label Ubuntu 10.04 (Ubuntu 10.04)
# menu label Ubuntu 10.04 (Ubuntu 10.04)
# kernel pxe/images/ubuntu/ubuntu-10.4-x86_64
# append initrd=pxe/images/ubuntu/ubuntu-10.4-x86_64.img \
# ksdevice=eth0 DEBCONF_DEBUG=5 locale=en_US.UTF-8 \
@hermanbanken
hermanbanken / .editorconfig
Last active August 29, 2015 14:04
MasterDetailPage example
root = true
[*]
end_of_line = lf
insert_final_newline = true
[*.cs]
indent_style = space
indent_size = 2
@hermanbanken
hermanbanken / gist:fba7c3603aaa5ccf74fa
Last active August 29, 2015 14:17
Optimise Exact
import java.util.Arrays;
public class Main {
public static int startStock = 20;
public static int deliveryTime = 2;
public static int box = 30;
public static void main(String[] args) {
@hermanbanken
hermanbanken / script.sh
Last active September 6, 2015 00:46
iPhone photos extract script
# Extract all photos from your unencrypted backup. Includes Whatsapp photo's and videos.
dir="name-of-backup-folder"
(IFS='
'
for file in `ls $dir`; do
out=$(cd $dir;file --mime-type $file);
if [[ $out == *"image/"* ]]; then
ext=`sed -e 's/.*image\/\(.*\)$/\1/g`;
cp "$dir"/"$file" "extract-tmp/"$file.$ext;
@hermanbanken
hermanbanken / automata.py
Last active September 21, 2015 18:04 — forked from Arachnid/automata.py
import bisect
class NFA(object):
EPSILON = object()
ANY = object()
def __init__(self, start_state):
self.transitions = {}
self.final_states = set()
self._start_state = start_state
//
// buffer.swift
//
// Created by H.J. Banken on 06/10/2015.
// Copyright (c) 2015 Q42 Internet B.V. All rights reserved.
//
public class BufferList<T> {
private let maker: (Int -> T?)
private let offset: Int
@hermanbanken
hermanbanken / tv-autostart.bash
Last active December 20, 2015 08:09
Het grote 'zet-de-tv-goed-beunscript'
#!/bin/bash
# Het grote 'zet-de-tv-goed-beunscript'
# Copyrighties belong to me :)
# TO DO BEFORE USAGE
# Hide Unity Launcher
# Install Firefox
# Setup exception for wrong certificates of CH
# Set enabled=0 in /etc/default/apport to prevent error messages
@hermanbanken
hermanbanken / bash.desktop
Created July 28, 2013 10:20
GNOME autostart shell launcher
# Remove this line. Name this file: ~/.config/autostart/bash.desktop
[Desktop Entry]
Type=Application
Name=TV Systeem
Comment=Sponsoring en activiteiten
Exec=sh /home/tv/.autostart
Hidden=false
NoDisplay=false
Icon=system-run
X-GNOME-Autostart-enabled=true

Keybase proof

I hereby claim:

  • I am hermanbanken on github.
  • I am hermanbanken (https://keybase.io/hermanbanken) on keybase.
  • I have a public key ASBjLbD1MTjXXM6g2laBrCbIwdFtH4su3dKPB3cAozB3vgo

To claim this, I am signing this object:

@hermanbanken
hermanbanken / index.html
Last active July 1, 2016 15:41
Difficulties with implicit syntax #3
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.1.0/rx.all.min.js"></script>