Folding HTML with vim

I usually fold manually when working with HTML files:

:setlocal foldmethod=manual

Then I use zfat to fold and za to toggle the fold.

at is a text object in this context. To see how this works you can use it in visual mode to see what will be affected: vat.

If you want to use syntax folding you can set:

:setlocal foldmethod=syntax

I find this a bit too much but it might suit you. To make it behave a bit better when dealing with multiline tags you could follow the advice given here.

More →

slow boot - timeout initializing reports

When booting a newly installed system I noticed the process took unusually long to complete. Looking through the output of dmesg I noticed entries like this indicating my keyboard was causing some sort of timeout delaying the boot:

[   11.057376] hid-generic 0003:1B1C:1B17.0002: timeout initializing reports
[   11.113364] hid-generic 0003:1B1C:1B17.0002: input,hidraw2: USB HID v1.11 Keyboard [Corsair Corsair K65 RGB Gaming Keyboard ] on usb-0000:00:14.0-3/input1
More →

Nvidia drivers on Ubuntu 14.04

I was installing different versions of Xubuntu testing some stuff and I kept forgetting how to quickly add the Nvidia driver and ended up searching for it again and again. Since I can remember my own blog URL I decided to create this post.

More →

Dell earns their place on the shit list

Dell earns their place on my personal shit list after their fantasticly bad idea of putting a rouge CA, including the private key, on their machines.

More →

Take advantage of screen

Some advantages of using screen:

  • Multiplexing, Using multiple windows (running/debugging, editor, version control, etc)
  • De-coupled from desktop window manager
  • Persistence, possible to detach/reattach sessions
  • Easily accessible remotely via SSH
  • Able to share screen sessions with others over SSH

Here's a short list of some useful keyboard shortcuts for screen to release some of its power.

More →

Prepare a Raspberry Pi Image for a Kiosk Project

I'm playing around with different Raspberry Pi images to use as a base for a kiosk project I'm working on. So far I have created a prototype that works fine and now I'm working on creating a custom image for further development of the project. This is the first post with notes on that endeavour.

More →

FreeBSD on Raspberry Pi 2

I was trying out different images to use as base for a project of mine and thought I'd try to get the FreeBSD image for Raspberry Pi to run since it's been supported for a while now.

TL;DR I got 10.2-STABLE to boot on Model B+ and 11-CURRENT to boot on Raspberry Pi 2 Model B.

More →

Create GIF from movie sequence

You know all those funny GIFs with sequences from movies? I got curious and wanted to see how I could create one of my own.

This is a simple way to do it utilizing ffmpeg in conjunction with gimp or imagemagick.

More →

Redirection in Bash

A short note to self about redirection of stderr to stdout in bash since I keep forgetting about the &> shorthand and sometimes mix up the order when redirecting to file.

More →

Test read write performance

A quick way to get a sense for read/write performance is to utilize the hdparm and dd tools.

More →

Python Toolbox

A list of tools and libraries for development with Python.

HW Shitlist

A list of hardware manufacturers that I personally wish to avoid purchasing equipment from and why.