Skip to content

Instantly share code, notes, and snippets.

@joakimbeng
joakimbeng / usr-share-X11-xkb-rules-evdev.xml
Last active April 23, 2018 06:55
Swedish Mac keyboard Layout for a PC
// Find <layout> for "Swedish" and add the following into its <VariantList>:
<variant>
<configItem>
<name>mac_joakimbeng</name>
<description>Swedish (Joakimbeng Macintosh)</description>
</configItem>
</variant>
@joakimbeng
joakimbeng / test_runner.js
Last active July 12, 2020 22:38
A small and simple Javascript test runner
/**
* A Javascript test runner in 20 lines of code
* From http://joakimbeng.eu01.aws.af.cm/a-javascript-test-runner-in-20-lines/
*/
(function () {
// The test queue:
var tests = [];
// Function to add tests:
this.test = function test (name, cb) {
### Keybase proof
I hereby claim:
* I am joakimbeng on github.
* I am joakimbeng (https://keybase.io/joakimbeng) on keybase.
* I have a public key whose fingerprint is F3D9 C691 DB9D 2910 DA57 E3F9 0143 6819 1B3F 4CBE
To claim this, I am signing this object:
@joakimbeng
joakimbeng / router.html
Last active March 15, 2024 06:18
A really simple Javascript router
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Building a router</title>
<script>
// Put John's template engine code here...
(function () {
// A hash to store our routes: