Skip to content

Instantly share code, notes, and snippets.

@joakimbeng
joakimbeng / usr-share-X11-xkb-rules-evdev.xml
Last active Apr 23, 2018
Swedish Mac keyboard Layout for a PC
View usr-share-X11-xkb-rules-evdev.xml
// 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 Jul 12, 2020
A small and simple Javascript test runner
View test_runner.js
/**
* 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) {
View gist:6a724d78b699b2cf00ff
### 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 Apr 10, 2021
A really simple Javascript router
View router.html
<!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: