sjkblog

Open source projects

I have created, modified and contributed some open source software. Some of the projects I have been poking around with are listed below. Patches for my programs are welcome via e-mail as well as Github pull requests.

*nix configuration and utilities

Configuration files

A collection of my configuration files for applications I use often, such as vim, zsh, git, and tmux. Comes with a bunch of handy shell scripts, as well as an installer setting up the proper symlinks for dot-files and ~/bin files.

block

This program, written in C, reads IPv4 addresses from STDIN (in any format) and adds (or removes) them to a configurable pf table. It can be configured to kill states. This little handy tool can be used in conjunction with e.g. grep. To block all IP addresses associated with invalid SSH logins, except ones coming from 1.2.3.4, one could do something like:

# grep Invalid /var/log/auth.log |grep -v 1.2.3.4 |block

To kill IRC drones, all using the same 'real name', and also kill states (to actually have them disconnect from the server):

# grep -E some_regex_here /path/to/irc/logs/userlog |block -k

Whether the IP:s added by block are to actually be blocked is up to your pf rules. Such a rule might look like:

table <attackers> persist
block in quick on $ext_if from <attackers> to any

See 'man block' and 'man pf.conf' for more information.

IRC related

Irssi scripts

Collections of scripts I have written or modified for the Irssi IRC client. Most of them only make sense to use if you are a server operator.

snipget

Snipget is an Irssi script which displays pastebin snippets directly in your client, either in the current window or in a separate window. It supports a range of pastebin services, and adding support for even more is a trivial task. I added support for themes and updated some pastebin service url regexps in snipget.

Irssi

Irssi is a feature-rich, terminal based IRC client that runs on Linux, BSD, OS X and probably other operating systems as well. It supports perl scripting and has a large script archive. Joost Vunderink has written about some useful features of Irssi.

I have made a small contribution to the project by submitting a patch resulting in leading and trailing whitespaces being stripped from boolean /SET values. The patch fixes a bug where additional whitespaces in boolean /SET commands, e.g. '/SET paste_join_multiline on ' (notice the trailing whitespace), would result in an error:

21:11.00 -!- Irssi: Value must be either ON, OFF or TOGGLE
21:11.00 [misc]
21:11.00 paste_join_multiline = OFF

LaTeX classes and packages

LaTeX notes skeleton

I used LaTeX extensively for note taking at university lectures. This is the source file skeleton I use. When starting a new course, I simply cloned this repository, made appropriate changes (course name etc) and started typing away.

RKH LaTeX classes

When I started studying at the Red Cross University College, I was provided Microsoft Word templates for reports, theses, memorandums, et.c. I much prefer using LaTeX over Word, especially when collaborating with other students and having to handle lots of citations, so I 'translated' the templates into LaTeX. I suggest using biblatex, biblatex-apa and biber for handling references.

BibLaTeX-apa

This is a fairly complete BibLaTeX style for APA (American Psychological Association) publications and implements most of the guidelines in the 6th edition of the APA style guide. I contributed Swedish localisations.