About Olof Larsson

This author has not yet filled in any details.
So far Olof Larsson has created 23 blog entries.
21 03, 2019

IT Project Sanity Checklist

By |2019-03-22T08:26:02+00:00March 21st, 2019|Uncategorized|0 Comments

From my perspective as a software developer, a tool you could use to avoid some pitfalls when starting a new IT project. Sum up the points below. Higher score is better. "Keep it Simple" [#1] The lines of code would ... (+1) ... decrease (-1) ... increase TIP: Simplify and remove. You aren't gonna need it. Every line of code adds to the maintenance cost. [#2] The amount of version numbers to keep updated would [...]

2 02, 2018

Daily Droplet Backups to DigitalOcean Spaces

By |2018-02-02T15:03:41+00:00February 2nd, 2018|Uncategorized|0 Comments

In this article I explain how to setup daily backups of Droplets to Spaces at DigitalOcean. More than Weekly It should be noted that DigitalOcean provides a weekly backup system for Droplets. You may click a checkbox and get backups for the price of +20% of the droplet. Personally I want to backup daily. With that in mind I came up with this backup system that backs up to DigitalOcean spaces. There is however nothing [...]

2 02, 2018

The SSH Who Cried Wolf

By |2018-02-02T15:11:14+00:00February 2nd, 2018|Uncategorized|0 Comments

Disclaimer: This article lowers the security of your SSH client connection and leaves you vulnerable to man in the middle attacks. For that I take no responsibility. If you follow the steps below you do so at your own risk. TLDR Add the following to your ~/.ssh/config file to make SSH shut up: [crayon-5da50746beaa3932114465/] Wolf! Wolf! The wolf is performing a MITM attack! Have you ever seen this message when attempting to SSH somewhere? [crayon-5da50746beaa9987471843/] In [...]

22 12, 2017

ProGuard with Maven and PluginManagement

By |2017-12-22T17:31:07+00:00December 22nd, 2017|Uncategorized|0 Comments

I recently made use of ProGuard to reduce the size of a jar through tree shaking. Tree shaking is basically the art of holding the software upside down in the roots and shaking it so that you only keep the classes and methods you need. There is a Maven plugin called proguard-maven-plugin that allows you to run ProGuard from your Maven build with ease. How to use this plugin in a way that cooperates well [...]

12 10, 2017

Some Git sugar for your .bashrc

By |2017-10-12T10:15:33+00:00October 12th, 2017|Uncategorized|0 Comments

I'm one of those people that use Git command line quite a lot and have not really adopted any Git GUI clients. To make make life in the terminal more efficient I have added some sugar to my .bashrc. Make "g" an alias for "git" [crayon-5da50746bfe0b796183861/] The first line creates the alias "g" for "git". Sadly tab completion stops working and the second line takes care of readding that. At the time of writing I'm [...]

11 10, 2017

Why is my crontab not working?

By |2017-10-11T13:37:25+00:00October 11th, 2017|Uncategorized|1 Comment

So your crontab entry is failing and you don't know why. How do you proceed? TLDR Does your crontab end with an empty line? It must or the last entry will not be considered. Have you forgotten to set your PATH variable? Have you setup logging and checked the output for errors? Suggested Crontab Layout I suggest writing your crontab entries like below. [crayon-5da50746bffab169374275/] Start with these two lines [crayon-5da50746bffb0490628879/] The first line makes sure [...]

11 04, 2016

Automatic Git GPG Signing

By |2016-04-11T11:30:58+00:00April 11th, 2016|Uncategorized|0 Comments

This guide covers how to sign your Git commits with GPG automatically when using Cygwin on Windows. The goal is to avoid typing the password repetitively even when Cygwin does not provide the gpg-agent. What is Git GPG Signing? Git supports an extra security layer: https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work If you are a GitHub user you can read their guide on GPG signing here: https://help.github.com/articles/generating-a-gpg-key/ I will not dive into detail describing what GPG signing is and why [...]

2 09, 2015

Manual mod_cloudflare Install and Update

By |2017-10-12T10:35:04+00:00September 2nd, 2015|Uncategorized|0 Comments

Introduction This quick guide is based of the official documentation: https://www.cloudflare.com/resources-downloads These steps worked for me on Ubuntu 15.04 and Ubuntu 16.04. Install and/or Update The following batch of lines performs both the initial install and updates existing installs: [crayon-5da50746c032b346488482/]

22 05, 2013

innodb_file_per_table for existing MySQL database

By |2013-05-22T13:48:55+00:00May 22nd, 2013|Uncategorized|1 Comment

So you want to toggle innodb_file_per_table on for your existing MySQL database? This is a step by step guide explaining how to do just that. Should I really enable innodb_file_per_table? Some people prefer it on: I do http://www.mysqlperformanceblog.com/2007/11/01/innodb-performance-optimization-basics/ http://code.openark.org/blog/mysql/reasons-to-use-innodb_file_per_table https://tools.percona.com/wizard Some people prefer it off: http://umangg.blogspot.se/2010/02/innodbfilepertable.html Other Articles Other people have already written articles on the subject. I would suggest reading those as well to get other points of view: http://www.datavail.com/about-datavail/blog/50-mysql/451-innodb-conversion-to-file-per-table http://dba.stackexchange.com/questions/11043/mysql-changing-innodb-file-per-table-for-a-live-db http://serverfault.com/questions/230551/mysql-innodb-innodb-file-per-table-cons http://stackoverflow.com/questions/3927690/howto-clean-a-mysql-innodb-storage-engine/4056261#4056261 After [...]

22 05, 2013

Convert MyISAM tables to InnoDB

By |2013-05-22T13:16:25+00:00May 22nd, 2013|Uncategorized|0 Comments

Did you know that InnoDB replaces MyISAM as the default storage engine since MySQL 5.5.5? For this reason you may want to convert most (if not all) of your current MyISAM tables to InnoDB. Wordpress does for example make use of the default storage engine. That means old Wordpress installations will make use of MyISAM if you don't update them to use InnoDB instead. SQL to get the job done This is the SQL to [...]