Skip to content

Instantly share code, notes, and snippets.

@maikelwever
maikelwever / pingsturen.py
Created November 5, 2011 23:07
Example Python script that passes on data to the amplefrag-beamerapp API
#! /usr/bin/env python
import time
import urllib
import random
def do_it():
randomnumber = random.randint(1,10) # This should be replaced by a statement that retrieves the actual data.
openthisurl = urllib.urlopen("http://beamerapp.amplefrag.nl/api/update_ping/5121d1ca2841aeeebaa13475e5e3d5de8b73dce1/" + str(randnumber) + "/")
time.sleep(2)
@maikelwever
maikelwever / shoutspam3000xl.js
Created December 6, 2011 02:08
shoutspam3000xl
/*
* I shall call this script: shoutspam3000xl
* I = Maikel Wever (maikelwever@gmail.com)
*
* It only works in Chrome devtools, because Firebug does not like me.... :(
*/
// You can set the speed here:
var MAXIMUM_POWER = 10;
@maikelwever
maikelwever / apispam3000xl.py
Created December 6, 2011 19:17
apispam3000xl
#! /usr/bin/env python
import time
import urllib
import random
import sys
server = str("http://10.0.0.8/")
apikeys =[
@maikelwever
maikelwever / requirements.txt
Created December 16, 2011 00:31
pip requirements file useful for django debugging
-e git://github.com/django-debug-toolbar/django-debug-toolbar.git#egg=Package
-e git://github.com/jbalogh/django-debug-cache-panel.git#egg=Package
@maikelwever
maikelwever / verslag.md
Created February 2, 2012 16:37
Verslag

Verlag Project Containing

Herman ten Hoor Richard Brouwer Sietse van der Molen

// get the element we want to rotate
var target = document.getElementsByTagName("html")[0], timer;
// function that makes the site rotate
function rotate(degree) {
// clear any existing timers
clearTimeout(timer);
// set style for webkit browsers
target.style['-webkit-transform'] = 'rotate(' + degree + 'deg)';
// set style for mozilla browsers
@maikelwever
maikelwever / .bashrc
Created March 7, 2012 17:06
bashrc, git branch
# Put your fun stuff here.
function parse_git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "("${ref#refs/heads/}") "
}
export PS1="\t \[\033[01;32m\]\u\[\033[01;35m\]@\[\033[01;33m\]\h\[\033[01;35m\] \w \[\033[00m\]\$(parse_git_branch)\[\033[01;35m\]\$\[\033[00m\] "
@maikelwever
maikelwever / post_command.js
Created April 11, 2012 01:52
post_command.js
function post_command(command, arguments) {
datastring = "command=" + command + "&arguments=" + arguments;
$.post('/console/', datastring, function(data) {
if (data.length > 0) {
$("#hyperResponse").append(data.message);
}
}, 'json');
}
@maikelwever
maikelwever / vt-d-guide.rst
Last active August 29, 2015 14:06
The definitive guide to vga-passtrough with VT-d

The definitive guide to vga-passtrough with VT-d

This guide can also be reached under the shortlink: http://bit.ly/vt-d which may be useful once you are in your VM.

Ensure you have hardware support for VT-d and VT-x. In your host bios, set 'init display first' to 'iGPU'. Otherwise your AMD gpu will get initialized.

Follow the guide at: https://bbs.archlinux.org/viewtopic.php?id=162768

@maikelwever
maikelwever / libvirt-vga-passtrough.rst
Last active January 27, 2017 11:47
libvirt-vga-passtrough

New guide for vga-passtrough VMs with STOCK kernel on Arch with libvirt.

Install libvirt, virt-manager, latest stock kernel, ovmf-bin. ovmf-bin may need to come from the AUR. Check if your graphics card is UEFI compilant. If not, search for a rom/gpu bios file that does support UEFI and store it somewhere.

** You may need to run your host on UEFI as well if using the i915 as primary graphics. **

If you get permission issues, try running the qemu instances as root. Edit /etc/libvirt/qemu.conf for this.