Skip to content

Instantly share code, notes, and snippets.

@svaclav
svaclav / instructions.md
Created January 9, 2019 15:41 — forked from xsot/instructions.md
sed maze solver

Usage

sed -E -f solver.sed input where input is a file containing the maze.

For best results, resize your terminal to match the height of the maze. To disable animations, delete the lines containing p.

Maze format

The solver assumes the following:

  • The maze only contains the characters # \nSE
  • Every line has the same number of characters
  • There is only one start (S) and end (E)
@svaclav
svaclav / ubunru-rsyslog-hack.sh
Created January 4, 2016 11:39 — forked from dragolabs/ubunru-rsyslog-hack.sh
Hack to repair 100% CPU load by rsyslog on ubuntu 12.04 in openvz
#!/bin/sh
service rsyslog stop
sed -i -e 's/^\$ModLoad imklog/#\$ModLoad imklog/g' /etc/rsyslog.conf
service rsyslog start
@svaclav
svaclav / latest-firefox
Last active August 29, 2015 14:27 — forked from ruario/latest-firefox.sh
This script will find the latest Firefox binary package, download it and repackage it into Slackware format.
#!/bin/bash
# latest-firefox Version 1.2
# This script will find the latest Firefox binary package, download it
# and repackage it into Slackware format.
# I don't use Firefox for regular browsing but it is handy for
# comparative tests against Opera. :P
# Copyright 2015 Ruari Oedegaard, Oslo, Norway
@svaclav
svaclav / Makefile
Last active August 29, 2015 14:18 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@svaclav
svaclav / gist:7265696
Created November 1, 2013 13:47 — forked from jcs/gist:5573685

OpenBSD -current works pretty well on my Mid-2011 Macbook Air (A1370, SandyBridge). The new KMS code brings up the MBA's eDP display in 1366x768 with backlight control. ACPI works as expected for battery/AC status, CPU throttling, and full suspend/resume support. The Broadcom wireless card does not work, so for now I am using this tiny USB adapter (urtwn) which is rather unobtrusive when plugged in.

Dual-booting with Mac OS X is fairly easy, but once FileVault is enabled for full-disk encryption of Mac OS, it clobbers the path to boot back into OpenBSD. Here's how to get both OSes working, each with its own disk encryption, without having to use rEFIt or anything else.

###Mac OS X Configuration

  1. If FileVault is already enabled, turn it off and decrypt the SSD.

  2. Use Boot Camp Assistant to partition the hard drive, slicing off a portion of the end of the drive for OpenBSD (I used 30Gb on a 256Gb SSD). If BCA jus