Skip to content

Instantly share code, notes, and snippets.

View jorrizza's full-sized avatar
🏠
Working from home

Joris van Rooij jorrizza

🏠
Working from home
View GitHub Profile
@jorrizza
jorrizza / computercriminaliteit.md
Created May 14, 2013 14:03
Internetconsultatie Computercriminaliteit

Wetsvoorstel Computercriminaliteit III

De tekst, zoals gepubliceerd, is voorzien van commentaar door auteur. Het commentaar betreft een mening.

Wijziging van het Wetboek van Strafrecht en het Wetboek van Strafvordering in verband met de verbetering en versterking van de opsporing en vervolging van computercriminaliteit (computercriminaliteit III)

@jorrizza
jorrizza / time-pubquiz.rb
Last active December 20, 2015 16:09
Pubquiz code
require 'date'
class PubQuizDate
class << self
def parse(str)
days = %w{zon maan dins woens donder vrij zater}
format, pattern = {
next_week: /\Avolgende week (\w+)dag\Z/,
after_that: /\Ade (\w+)dag daarna\Z/
@jorrizza
jorrizza / imgcat.go
Created May 21, 2014 09:43
Show an image in the terminal
package main
import (
"fmt"
"github.com/nfnt/resize"
"image"
"image/color"
_ "image/gif"
_ "image/jpeg"
_ "image/png"
Array.new(2, ("fd" + SecureRandom.hex(5)).gsub(/([a-f0-9]{4})/, '\1:')).join(':/64 - ') + 'ffff::/64'
@jorrizza
jorrizza / color-log
Last active August 29, 2015 14:05
Colors standard syslog output and groups by service name
#!/usr/bin/env ruby
# Colors standard syslog output and groups by service name
require 'time'
services = []
STDIN.each_line do |line|
match = line.strip.match(/\A(?<timestamp>[\w]{3} \d+ \d\d:\d\d:\d\d) (?<hostname>[\w\d\-]+) (?<service>.+?): (?<message>.+)\z/)
if match
@jorrizza
jorrizza / crack.go
Last active August 29, 2015 14:05
Bcrypt (useless) dictionary attack
package main
import (
"bufio"
"code.google.com/p/go.crypto/bcrypt"
"encoding/csv"
"fmt"
"io"
"log"
"os"
@jorrizza
jorrizza / wat.rb
Created June 21, 2016 15:07
I kind of hate Ruby for this
irb(main):001:0> wat = Hash.new {|h, k| h[k] = "Wat #{k}?"}
=> {}
irb(main):002:0> wat.keys
=> []
irb(main):003:0> wat.class
=> Hash
irb(main):004:0> puts 'wat?' if wat['foo']
wat?
=> nil
irb(main):005:0> wat.keys
@jorrizza
jorrizza / README.md
Created June 17, 2017 14:11
Nitrokey Debian
@jorrizza
jorrizza / .gitignore
Last active November 24, 2020 17:29
NaCl test Go and Python
/message_*
/.vscode