Skip to content

Instantly share code, notes, and snippets.

View basbloemsaat's full-sized avatar

Bas Bloemsaat basbloemsaat

View GitHub Profile
@basbloemsaat
basbloemsaat / alles-samen.kbd.json
Last active February 24, 2021 15:27
alles samen
[
{
"name": "alles samen",
"switchMount": "cherry",
"switchBrand": "cherry",
"switchType": "MX1A-L1xx",
"plate": true
},
[
{
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is chosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
q q e e e e
e|-------------------------|
B|-------------------------|
G|-7-------7-----------6---|
D|-7---7---7---7---7---6---|
A|-5---7---5---7---7---4---|
E|-----5-------5---5-------|
q q e s s e e
e|-----------------------------|
@basbloemsaat
basbloemsaat / flintstones.tab
Last active April 16, 2018 06:31
Flintstones theme tab
E|------------3--0------------------------------------------|
B|---3--3-----3--1--3--3-----3--1--0-0-1-3---3--5--0--------|
G|---4--0-----------4--0-----4--2------------0--2--0--------| x 2
D|----------------------------------------------------------|
A|----------------------------------------------------------|
E|----------------------------------------------------------|
E|---2-----3-2-2-0-0-2-0------0------2-0-0-----0------------|
B|---3--0---------------------2------------3-3---3----------|
G|------1------------------------2--------------------------|
@basbloemsaat
basbloemsaat / .block
Last active December 1, 2017 09:24
Unexpected behaviour with data binding
license: gpl-3.0
@basbloemsaat
basbloemsaat / kenteken.pl
Last active January 3, 2016 22:38
Dutch vehicle registration open data Kenteken check RDW open data
#!/usr/bin/env perl
use strict;
use Data::Printer;
use REST::Client;
use JSON::XS;
use URI::Escape;
my $req = 'https://api.datamarket.azure.com/opendata.rdw/VRTG.Open.Data/v1/KENT_VRTG_O_DAT?$filter=' . uri_escape("Kenteken eq '31PHP6'") ;
@basbloemsaat
basbloemsaat / kirandom.pl
Created February 24, 2013 09:34
Set random colors on an LED on the RPi GPIO pins. Does not work as well as kiglow.pl because the frequency is too low to actually do PWM.
#!/usr/bin/env perl
use 5.014;
use constant STEPS => 50;
our $pins = {
red => 17,
green => 27,
blue => 22,
};
@basbloemsaat
basbloemsaat / kiglow.pl
Created January 27, 2013 17:25
Raspberry Pi "glow" gpio output. See http://youtu.be/99Sbynu1zqY for the output.
#!/usr/bin/env perl
use 5.014;
my $pins = [ 17,27,22 ]; # red, green and blue leds
use constant STEPS => 50;
initpins($pins);
foreach my $pin (@$pins) {
glowon($pin);