2021-05-17

Backup your PostgreSQL database on Kubernetes

I did not find any out of the box solution so I created my own.  Please see the Github Readme page for more information:

postgresql-backup-s3

It simply runs pg_dumpall and aws s3 cp but provides a simple solution that can be easily applied to production as well as development/test setups. 

If you want to have retention policies I recommend creating multiple jobs that upload to different folders:

  • daily -> s3://my-s3-bucket/daily
  • montly -> s3://my-s3-bucket/monthly
And then create a lifecycle rule for each with the corresponding prefix. These can then delete the backups after e.g. 30 days and 24 months correspondingly.


2019-09-14

icenlp_bridge and nefnir-package open sourced

I have created pypi packages around IceNLP (see icenlp_bridge) and nefnir (see nefnir-package).  With the help of cookiecutter both of these have full tox, pypi, travis and readthedocs documentation.
I am working on a future library that will tie these two together to ease the pain of Icelandic Natural Language Processing.


Stay tuned...


2019-02-23

Envirou - Master your shell environment

Envirou is a simple tool that I created years ago to manage my own shell environment.  I was tired of having a long list of unreadable PATH definitions and learning the various idiosyncrasies of the many tools that require you to learn their own syntax and conventions.
Now I simply create a new profile and switch between Python versions, AWS profiles and Kubernetes contexts using the same tool.  The best part is that it is complementary - you can use it to view your config and check out what changes various scripts do to your environment.

Envirou in action
How Envirou gives you quick overview of your environment

Head over to Envirou to install.  It is fully open sources with the most permissive license possible (MIT).

2018-04-10

Mandelbrot set browser in 100 lines of code

When I started to learn go a while back I created a small web server in approximately 100 lines of code using only the standard library.  This server is a fully functional production quality web server that renders the Mandelbrot set in a png and serves it - no external web resources required.
I find this is the perfect example of the elegance of creating web services in go. Here is a quick demo of the server in action:
Browsing the Mandelbrot set
All the source is released using the MIT license and is accessible here:
https://github.com/sverrirab/mandelbrot-go


2016-04-03

Google Account Chooser

Do you use Google Account Authentication?  Then you have seen this window a few times I would guess:
Having to select the correct account every single time is tedious and and that is the reason I created  a Chrome Extension that remembers your choice and automatically selects the right account for this domain (my use case I always use the same account for the same domain).
Install the Chrome Extension - Google Account Chooser for yourself and try it out.  The source code is all Open Source under MIT license and information along with Frequently Asked Questions can be found on the Project Home Page.

  1. You just install the extension from here: Google Account Chooser
  2. Log into a Google Account Authentication enabled site and see the icon light up with blue.
  3. Click the Icon for Options (disable for site, unselect account.
The extension does not store any credentials just the email address and domain and only has access to the account selection page.  It uses Chrome Sync so stores this across your computers if you have that enabled.  Read the source code if you want to be sure! 


Hope you find this useful!

2013-05-28

Your book has an update available

Today I received my first ever update for a book.  It felt rather good actually - pressing update to get a new and improved version of a book I purchased several months ago.  The experience was a lot more pleasant than my first update for the software for my TV.  The minutes that it spent with "Do not power of..." message felt like a lifetime.

This feature of electronic books is definitely second on the list of my favorite benefits of online books after availability.  The list of my non-favorites is a topic for a separate post (starts with DRM).

For the curious the book was Tactics Time! 1001 Chess Tactics from the Games of Everyday Chess Players on my Amazon Kindle - highly recommended if you love Chess Puzzles.

2012-08-23

Working with multiple Google Accounts just got easier

I'm one of many that have multiple Google Accounts.  Some of them are personal, other work, school or related to projects I work on.  I don't have an exact count but I guess I have currently access to at least 6 different accounts.  Until now it has been a major pain using more than one of them at the same time.  I've tried multiple approaches such as running multiple browsers, such as Chrome and Firefox or Chrome and Chromium but I've always found that annoying.
Even though you can technically log into multiple accounts and switch between them it still doesn't work properly and even Google warns you when you log into your second account that it might not work for some of their domains.  Current example is Blogger.com :).
Add new user
There is finally a solution to this and it is a new but well hidden feature in Chrome.  Go to your wrench menu -> Settings and select "Add new user".  This user is a standalone browser session with plugins, browser sync and all the goodies you have come to know and love.
This means that multiple users is on par with browser sync as my favorite Google Chrome feature :)
Finally a screen shot of my setup.  One user for work, the other for my personal mail and pages.  You can switch between User sessions or simply windows and see which session you are in by the user selectable icon in the top right corner.
The only limitation I have found is that I can't user the same Google Account to sync my bookmarks across both sessions, but this is a restriction I'm willing to live with.

Backup your PostgreSQL database on Kubernetes

I did not find any out of the box solution so I created my own.  Please see the Github Readme page for more information: postgresql-backup-s...