Skip to content

Instantly share code, notes, and snippets.

@pbock
pbock / null-bytes.py
Created March 27, 2023 10:22
Find all files ending in lots of null bytes
#!/usr/bin/env python3
"""
This script recurses through the current user's home directory and prints the
paths to all files that end in 2 kB or more of null bytes.
The motivation for this is that Time Machine seems to have corrupted my music
files. Several kilobytes' worth of data have gone missing from the middle of
some files and replaced with an equivalent number of null bytes at the end.
"""
@pbock
pbock / smau.txt
Created January 29, 2021 08:57
Liste over smau i Bergen
Arbeidersmauet
Asylsmauet
Bakersmauet
Bakkesmauet
Bedehussmauet
Borgesmauet
Bratlandsmauet
Bredenbecksmauet
Bøkkersmauet
Claus Ockenssmauet
@pbock
pbock / rents.geojson
Created August 25, 2019 13:00
Radforschung: rents
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pbock
pbock / gg.md
Last active August 13, 2018 18:34
Grundgesetz nach Länge

vom 23. Mai 1949 (BGBl. S. 1), zuletzt geändert durch Artikel 1 des Gesetzes vom 13. Juli 2017 (BGBl. I S. 2347)

Der Parlamentarische Rat hat am 23. Mai 1949 in Bonn am Rhein in öffentlicher Sitzung festgestellt, daß das am 8. Mai des Jahres 1949 vom Parlamentarischen Rat beschlossene Grundgesetz für die Bundesrepublik Deutschland in der Woche vom 16.-22. Mai 1949 durch die Volksvertretungen von mehr als Zweidritteln der beteiligten deutschen Länder angenommen worden ist.

Keybase proof

I hereby claim:

  • I am pbock on github.
  • I am bock (https://keybase.io/bock) on keybase.
  • I have a public key ASDIVYPjfuaDUQ2kGLUaodVnlvxudFVb5VZLSqxDZq3XLQo

To claim this, I am signing this object:

@pbock
pbock / imagesize
Created April 18, 2015 13:14
Pick images and display their width and height
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Image Size</title>
<style type="text/css">
body {
background-color: #ccc;
color: #333;
@pbock
pbock / buergerbot.rb
Last active April 22, 2024 10:58
Bürgerbot: Refreshes the Berlin Bürgeramt page until an appointment becomes available, then notifies you.
#!/usr/bin/env ruby
require 'watir-webdriver'
def log (message) puts " #{message}" end
def success (message) puts "+ #{message}" end
def fail (message) puts "- #{message}" end
def notify (message)
success message.upcase
system 'osascript -e \'Display notification "Bürgerbot" with title "%s"\'' % message
rescue StandardError => e