Skip to content

Instantly share code, notes, and snippets.

@orng
orng / caps.ahk
Created August 26, 2015 15:31
Extremely simple autohotkey script: replaces capslock with esc and maps ctrl+shit+left|right|up to media key prev|next|play/pause
Capslock::Esc
;; media keys: < = left shift, !=alt, ^ = ctrl
<^+Left::Send {Media_Prev}
<^+Right::Send {Media_Next}
<^+Up::Send {Media_Play_Pause}
@orng
orng / artint.js
Last active August 29, 2015 14:17
Crude UserScript hack that enables arrow navigation for the html version of "Artificial Intelligence - Foundations of Computational Agents"
// ==UserScript==
// @name ArtInt Navigator
// @namespace gorn/aiNav
// @description Enables back and forth navigation using the arrow keys on AI book webpage
// @include http://artint.info/html/ArtInt_*.html
// @version 1
// @grant none
// ==/UserScript==
var base = "http://artint.info/html/ArtInt_";
@orng
orng / jqb2d.js
Created December 11, 2012 11:15
jquery box2d bookmarklet helper
//Code by Örn Guðjónsson
// with a lot of help from Vincent Robert (http://stackoverflow.com/a/756526/611292)
function loadScript(url, callback)
{
var head = document.getElementsByTagName("head")[0];
var script = document.createElement("script");
script.src = url;
// Attach handlers for all browsers
var done = false;
@orng
orng / ras2Voter.py
Created October 3, 2012 18:17
A quick and dirty script for voting for an artist on ruv.is/topp30
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Author: Orn Gudjonsson
# Methods for voting for an artist on ruv.is/topp30
#NOTE: if you vote to often your ip address will be blocked.
# you could try changing the script to automatically vote for your artist once every
# hour or so, but I have no idea if that works.
from lxml import etree