Skip to content

Instantly share code, notes, and snippets.

View koenbollen's full-sized avatar

Koen Bollen koenbollen

View GitHub Profile
@koenbollen
koenbollen / cbs.go
Created October 31, 2015 22:18
ClipBoardServer (in Go, for OSX)
package main
// usage: curl localhost:1544 -d"Text Here"
import (
"io"
"net/http"
"os/exec"
"golang.org/x/text/transform"
@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

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 / 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
@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 / bail.h
Created February 20, 2012 21:20
Old useful C header
/**
* bail.h supplies the macro bail( expr, s ); "no description, read the code"
* version 1.0
* Copyright (C) 2008, Koen Bollen
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation version 2.
*
* This program is distributed in the hope that it will be useful,
@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
#
@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 / 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 / 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;