Skip to content

Instantly share code, notes, and snippets.

View koenbollen's full-sized avatar

Koen Bollen koenbollen

View GitHub Profile
@koenbollen
koenbollen / gpb.ino
Created June 30, 2014 20:16
Generic Panic Button - Firmware
/* Copyright (c) 2014, Koen Bollen <meneer@koenbollen.nl>
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
@koenbollen
koenbollen / gpb.py
Created July 22, 2014 19:08
Generic Panic Button - Python Script, to execute commands. (see: https://gist.github.com/koenbollen/a87b3eca1e92f2dade70)
#!/usr/bin/env python
#
# Copyright (c) 2014, Koen Bollen <meneer@koenbollen.nl>
#
# Permission to use, copy, modify, and/or distribute this software for any purpose
# with or without fee is hereby granted, provided that the above copyright notice
# and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND

Keybase proof

I hereby claim:

  • I am koenbollen on github.
  • I am kaji (https://keybase.io/kaji) on keybase.
  • I have a public key whose fingerprint is E429 280B 5525 9D90 B8FC 1B0D 521B 6165 3E9E F05D

To claim this, I am signing this object:

@koenbollen
koenbollen / ns.py
Last active August 29, 2015 14:14
Alerts for NS issues by keyword.
#!/usr/bin/env python3
# Koen Bollen, 2015
import sys
import urllib.request
import xml.etree.ElementTree
# Train stations you are interested in:
keywords = ("utrecht", "bijlmer", "amstel")
# If one of those keywords is found in the
@koenbollen
koenbollen / go4celebrity.py
Created July 4, 2010 20:44
Download a random wallpaper from go4celebrity.com
#!/usr/bin/env python
# Koen Bollen <meneer koenbollen nl>
# 2010 GPL
#
# Download an random wallpaper from go4celebrity.com
#
#
# My setup:
# =========
#
@koenbollen
koenbollen / addrhash.py
Created November 28, 2010 19:29
Utility to convert an address to a hash and back.
#!/usr/bin/env python
# Convert an address to a hash and back.
#
# Koen Bollen <meneer koenbollen nl>
# 2010 GPL
#
import socket
import struct
import base64
@koenbollen
koenbollen / Terrain.cs
Created April 26, 2011 12:12
A multitextured heightmap.
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
@koenbollen
koenbollen / SimpleConsole.cs
Created April 26, 2011 12:23
A simple line based game console for XNA.
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
@koenbollen
koenbollen / load.py
Created September 25, 2011 07:40
Very simple system load monitor.
#!/usr/bin/env python
# load.py
# Test the current load of this system and report through e-mail when it's
# above a given threshold.
#
# Koen Bollen <meneer@koenbollen.nl>
# GPLv2 2011
#
LOAD_THRESHOLD = 0.8 # normalized (load/cpus > LOAD_THRESHOLD)
@koenbollen
koenbollen / wake.py
Created January 20, 2012 22:41
Send a wake-on-lan packet to a certain host specified by name.
#!/usr/bin/env python
# wake.py - Send a wake-on-lan packet to a certain host specified by name.
# The hosts that can be woken are stored a csv file.
#
# Default path for the hosts file is ~/.mac and the
# format is this (one host per line):
# Title, name, mac-address, port
# Example:
# My Computer, living, 00:11:22:33:44:55, 7
#