🚏 kollektiv.sanntid.org

This app uses data from Entur to show live departures from Norwegian public transport. It’s built with the JourneyPlanner API and is the first app I’ve created using vibe coding.

Flashing a custom rom on Nexus 4

Flashing a custom image on an Android mobile could be just fun. But if you don’t know why you want to do it, or do it just because it’s a challenge. Then don’t!

The bad and the good

I’m only pointing out some of the cons and the pros here.

Negative sides

  • An OS image could contain malware; only use community trusted images.
  • If you don’t pay attention you can get malware running as root. That’s B A D !
  • May not have all the phones vendor functionality.
  • The image may be buggy.

Consequences of a buggy image

  • Lock up your phone when you least expect it.
  • Drain the battery quicker.
  • Suddenly reboot.

Positive sides

  • You can get a newer more secure operating system.
  • Use less battery.
  • No crapware.
  • Extra security functions.

Flashing CyanogenMod

One of the custom Android images based on AOSP is CyanogenMod. As I know, it’s one of the more used ones. Quite stable if you keep away from the nightlies and rich on functionality but not bloated.

[Read More]

OCSP Stapling on Apache

Excerpt from Remy van Elsts tutorial: OCSP stapling is an enhancement to the standard OCSP protocol that delivers OCSP responses from the server with the certificate, eliminating the need for relying parties (web users) to check OCSP responses with the issuing CA. This has the effect of reducing bandwidth, improving perceived site performance, and increasing security for everyone involved in establishing the secure session. This tutorial shows you how to set it up with Apache.

[Read More]

Auto generate Pelican blog from Dropbox

This is my notes for how to update my Pelican blog automaticlly when I write new posts. See Creating a blog based on Pelican for getting started with Pelican blog engine.

A way to be able to blog from anywhere is to use Dropbox as repository for the your blog. Then let Pelican auto regenerate the blog on changes in the Dropbox folder.

A prerequest for this recipe is that /var/www is not directly exposed to the web.

[Read More]

Configuring OpenVPN server on RTN66U

The router firmware Tomato, see previous post RT-N66u with Tomato by Shibby firmware, can act as an OpenVPN server.

Using open Wi-Fi access points can be very useful and necessary, but it is inherently insecure. Using the router as an OpenVPN server can increase your privacy and security when you are on the go. By creating an encrypted VPN connection back home to the router, you don’t only get protection from nosy eavesdroppers but you get access to all your equipment behind the router at home as well.

[Read More]

Better entropy with haveged

Entropy is important for generating good encryption keys. Do you have a busy server relying on crypto, generating keys, you need lot of good entropy. Or if you have a disk less system you don’t get as much entropy from the kernel that you may wish. One way to get a lot of good entropy is to use haveged. Haveged is closer to a TRNG than a PRNG.

[Read More]

RT-N66u with Tomato by Shibby firmware

This is a part of my personal notes. Use this information at your own risk. If you are uncertain or don’t know what you are doing. Do not proceed.

Asus RT-N66U is a Linux based wireless router. The stock firmware can be a bit limiting for the more advanced user. If you want better QoS, OpenVPN or just more control over the network I recommend installing Tomato by Shibby firmware.

Download the latest version of the firmware from Tomato by Shibby. Look for Asus RT-N66u 64k in the version folder in K26RT-N repository.

[Read More]

Bash getopts example

This is a small example how to use getopts in bash. I wrote it down for my own sake, as my own cheatsheet :)

[Read More]
howto  bash 

Cloud virtual machine

Easiest way I know to create cloud virtual machine is to create a Droplet on Digital Ocean.

Modeline in vim

Options set in .vimrc applies to all vim files. You can use modelines to set specific vim options for one file. Modeline option must be set in .vimrc to take advantage of this option.

[Read More]
howto  vim 

Creating a blog based on Pelican

Pelican is a static website generator written in Python. It’s perfect for maintaining a tiny blog without having to mess around with databases. Static pages can be served from any Web server. Even your wireless router if you run custom firmware as Tomato by Shibby or dd-wrt.

Running Ubuntu Trusty I chose to use Pelican package in repository. A very quick recipe for creating a blog with the default theme.

  1. Install Pelican and package for Markdown language. With Markdown you write the content in text and Pelican translates it to HTML.

    [Read More]