Skip to content

Instantly share code, notes, and snippets.

View vkarlsen's full-sized avatar

Vidar Karlsen vkarlsen

View GitHub Profile
@vkarlsen
vkarlsen / Disk layout
Last active April 24, 2022 08:52
Workstation disk layout
_________________________________________
| ______ __________ |
| | | | ada1 | |
| | ada3 | | ________|_ |
| _________ | | |_| | |
| | | |______| | ada2 | |
| | ada0 | |__________| |
| |_________| |
|_________________________________________|
@vkarlsen
vkarlsen / kohana-koseven-migration
Last active March 6, 2022 14:45
Checklist for migrating from old Kohana (pre-3.3) to Koseven
# Shamelessly stolen from:
# https://stackoverflow.com/questions/13935621/how-to-upgrade-from-kohana-3-2-to-3-3-implementing-psr-0
# Note that this is merely the start; you should expect to make a number of other changes to your code
# after going through this checklist.
cd application/classes
# Capitalize class filenames and directories:
# NOTE: Use bash for this!
for SRC in `find . -depth`
@vkarlsen
vkarlsen / knockd with ipfw table
Last active December 23, 2019 22:20
Port-knocking with ipfw lookup table
Abdorrahman Homaei wrote an excellent howto for this, using security/knock and ipfw:
https://bsdmag.org/freebsd-port-knocking-abdorrahman-homaei/
However, I want to use a table for this rather than to add new firewall rules when knocked.
/etc/ipfw.rules:
$cmd 09012 allow tcp from table\(10\) to any 22 in via $vif setup keep-state
/usr/local/etc/knockd.conf:
[openSSH]

Keybase proof

I hereby claim:

  • I am vkarlsen on github.
  • I am vkarlsen (https://keybase.io/vkarlsen) on keybase.
  • I have a public key ASCw5mlxtkKPjzC8e9tMJu0zXglyvDdsRUJCnaAQlveu-wo

To claim this, I am signing this object:

@vkarlsen
vkarlsen / US keymap with Norwegian and Slovenian characters
Last active July 30, 2021 08:15
xmodmap config for US keymap in Norway
!~/.xmodmap
!Use the capslock key as escape
remove Lock = Caps_Lock
keysym Caps_Lock = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock
!Add Norwegian special characters æøå to super-key + ';[
clear lock