Skip to content

Instantly share code, notes, and snippets.

Jakub Jirutka jirutka

Block or report user

Report or block jirutka

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am jirutka on github.
  • I am jirutka (https://keybase.io/jirutka) on keybase.
  • I have a public key whose fingerprint is D785 8912 669D 3A20 F4F4 6BD2 F95B D679 104D 3115

To claim this, I am signing this object:

View acme-challenge.conf
#
# Server challenge directory for Let's encrypt!
#
location /.well-known/acme-challenge/ {
alias /var/www/acme/;
}
@jirutka
jirutka / cz-qwerty-ng
Last active Oct 28, 2018
Czech QWERTY keyboard layout revisited
View cz-qwerty-ng
partial alphanumeric_keys
xkb_symbols "qwerty-ng" {
// 2018 by Jakub Jirutka <jakub@jirutka.cz>
name[Group1]= "Czech (QWERTY/ng)";
// Unmodified, Shift, AltGr, Shift+AltGr
key <TLDE> { [ semicolon, asciitilde, grave, degree ] };
key <AE01> { [ exclam, 1, exclamdown, notsign ] };
@jirutka
jirutka / cz
Created Jun 6, 2018
Keyboard layout for X11 that corresponds to the Apple's Czech – QWERTY
View cz
partial alphanumeric_keys
xkb_symbols "qwerty-mac" {
// This layout corresponds to the Apple's Czech - QWERTY.
// 2018 by Jakub Jirutka <jakub@jirutka.cz>
include "latin"
name[Group1]= "Czech (QWERTY, Macintosh)";
// Unmodified, Shift, AltGr, Shift+AltGr
@jirutka
jirutka / procs-using-deleted-files
Last active Apr 12, 2018
Find processes that use (maps into memory) files which have been deleted or replaced on disk.
View procs-using-deleted-files
#!/bin/sh
#---help---
# Usage: procs-using-deleted-files [options]
#
# Find processes that use (maps into memory) files which have been deleted
# or replaced on disk. If /proc/$PID/map_files is accessible, then it omits
# files that have been replaced by the same files (i.e. content is the same).
#
# Options:
# -e PATT... Case pattern (POSIX shell's "case") specifying paths to exclude
@jirutka
jirutka / rc-service-pid
Last active Apr 11, 2018
Script for finding PID of running OpenRC service and vice versa.
View rc-service-pid
#!/bin/sh
#---help---
# Usage: rc-service-pid [-h | SVCNAME | PID]
#
# Prints list of running OpenRC services with their PIDs (services which PID
# cannot be resolved are omitted). If SVCNAME is provided, prints only PID
# of service with name SVCNAME. If PID is provided, prints name of the
# service that started process with the given PID or its ancestor.
#
# Source: <https://gist.github.com/jirutka/5cf0e731dbc39a3a6fff0c6e1a2c2510>
@jirutka
jirutka / Makefile
Created Nov 13, 2017
Custom OpenLDAP overlay that adds a “virtual” attribute with person’s full name constructed from other attributes.
View Makefile
LDAP_SRC = ../../..
LDAP_BUILD = $(LDAP_SRC)
LDAP_INC = -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd
LDAP_LIB = $(LDAP_BUILD)/libraries/libldap_r/libldap_r.la \
$(LDAP_BUILD)/libraries/liblber/liblber.la
LIBTOOL = $(LDAP_BUILD)/libtool
CC = gcc
OPT = -O2 -Wall -Wno-discarded-qualifiers -Wno-format-extra-args -pedantic
DEFS =
@jirutka
jirutka / prague-voting-places.json
Created Oct 20, 2017
Voting places in Prague for year 2017 in JSON. Source: https://app.iprpraha.cz/apl/app/volby/PS_2017
View prague-voting-places.json
[
{
"voting_districts": [
1001
],
"districts_ruian": [
30531
],
"address": "Pohořelec 111/25, Hradčany, 11800 Praha 1",
"name": "Pobočka Městské knihovny Praha - Pohořelec",
@jirutka
jirutka / apk-chroot-installation-demo.sh
Created Oct 8, 2017
This is a demo script used at Alpine Linux booth at LinuxDays 2017 to demonstrate how is apk-tools and Alpine Linux awesome. Recorded output: https://asciinema.org/a/141360
View apk-chroot-installation-demo.sh
#!/bin/sh
# vim: set ts=4:
#
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
#
set -eu
APK_KEY_URI='https://alpinelinux.org/keys/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub'
APK_KEY_SHA1='3af08548ef78cfdedcf349880c2c6a1a48763a0e'
@jirutka
jirutka / LICENSE
Last active Jun 11, 2019
Generate a new GPG key pair in a temporary GPG Home and export it to a file. It can run completely unattended, without prompting for a passphrase.
View LICENSE
The MIT License
Copyright 2018-2019 Jakub Jirutka <jakub@jirutka.cz>.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
You can’t perform that action at this time.