Skip to content

Instantly share code, notes, and snippets.

View Juerd's full-sized avatar

Juerd Waalboer Juerd

  • TNX
  • Netherlands
View GitHub Profile
#!/usr/bin/perl -w
use strict;
@ARGV or die "Usage: $0 PNGFILE...\nOutputs the file names of the PNG files with trailing data.";
FILE: while (@ARGV) {
my $fn = shift;
eval {
no warnings 'exiting';
Stage start : 0.000
Stage parse : 0.338
Stage syntaxcheck: 0.000
Stage ast : 0.000
Stage optimize : 0.016
Stage mast : 0.046
Stage mbc : 0.002
Stage moar : 0.000
RevSp TechInc Hack42 Bitlair TkkrLab Frack RandomD PixelB NURD Bhack ACKsp
TERMIJNEN
Minimumleeftijd - - 16 - - - - - - - -
Minimum maanden 1 1-12 ^A 12 12 1 6 1 1 1 1 1
Verlenging per mndn 1 12 ^A 3 1 1 3 1 1 1 1 1
Wachttijd sleutel nee nee nee 3 mnd nee 6 mnd random nee 2 mnd nee nee
Sleutel voor junior 3 mnd ? nee 3 mnd 3m ^B ? ? ? ? ? ?
^A = Opzegging alleen mogelijk aan het einde van een kalenderjaar (boekjaar), met 1 maand opzegtermijn
#!/usr/bin/perl
use strict;
use URI::Escape qw(uri_escape uri_unescape);
use Socket qw(SOCK_STREAM inet_ntoa);
use IO::Socket::INET;
use IO::Select;
my $host = '10.42.66.2';
my $player = 'be:e0:e6:04:46:38';
@Juerd
Juerd / gist:cc4a187aeb5c6fd8d0ff68d31e53e30b
Created April 17, 2018 09:42
vimrc for highlighting whitespace
highlight ColorColumn ctermbg=18
call matchadd('ColorColumn', '\%81v.\+', 100)
highlight WhitespaceEOL ctermbg=blue
match WhitespaceEOL /\s\+$/
highlight TabsZijnMeh cterm=underline ctermfg=darkred
call matchadd('TabsZijnMeh', '\t', 100)
@Juerd
Juerd / patch
Last active July 19, 2016 00:53
Let irssi tab completion consider current word up to cursor instead of up to separator. Ugly hack.
diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c
index 46fd9db..0decb4f 100644
--- a/src/fe-common/core/completion.c
+++ b/src/fe-common/core/completion.c
@@ -80,6 +80,7 @@ static char *get_word_at(const char *str, int pos, char **startpos)
while (start > str && !isseparator(start[-1])) start--;
while (*end != '\0' && !isseparator(*end)) end++;
while (*end != '\0' && isseparator_notspace(*end)) end++;
+ if (end > str+pos) end = str+pos;
Types are used as a way to organize behaviour and to guarantee that
certain constraints are enforced.
=head2 Value types
Although every value will invariably be of a single specific type,
behaviour can be shared among different types by means of
inheritance and composition. Type constraints can be applied to
variables, to limit which types of values a variable may hold.
@Juerd
Juerd / db-shell.p6
Last active January 22, 2016 16:21 — forked from Ovid/db-shell.p6
A naïve db client in Perl 6
# a rewrite of http://blogs.perl.org/users/ovid/2016/01/a-naive-sql-shell.html in Perl 6
use v6;
use DBIish;
use Linenoise;
use Text::Table::Simple;
my constant HIST-FILE = '.myhist';
my constant HIST-LEN = 100;
my constant ROW-LIMIT = 100;
RFC: A more Perl6-esque "unpack"
================================
This is an idea for an "unpack" replacement. The basic reasoning behind it, is
that number encodings and string encodings needn't be treated all that
differently. Instead of passing the name of a string encoding, you can pass
a native type object. When decoding things of determinable lengths, any number
of types can be given.
A variable length thing without a length indication can only be passed at the
use v6;
use Net::MQTT::MyPack;
unit class Net::MQTT;
has Int $.keepalive-interval is rw = 60;
has Int $.maximum-length is rw = 2097152; # 2 MB
has Str $.client-identifier is rw = "perl6-$*PID";
has Str $.server is rw;
has Int $.port is rw = 1883;