About Olof Larsson

This author has not yet filled in any details.
So far Olof Larsson has created 25 blog entries.
16 11, 2019

Tweaking Git Push

By |2019-11-16T16:24:11+00:00November 16th, 2019|Uncategorized|0 Comments

I recently investigated what terminal commands I used the most. Turns out "git push" is a common one. With that in mind it could make sense to investigate and solve some pain points I have with "git push". Pushing Tags I commonly have to do both "git push" and "git push --tags" after a release. Ideally I would want it to push tags always at the same time. My first attempt at a solution was [...]

16 11, 2019

What commands are you running?

By |2019-11-16T16:24:14+00:00November 16th, 2019|Uncategorized|1 Comment

As a software developer I use the terminal a lot. As I look for ways to save time and become more efficient it would make sense to reflect upon my terminal usage. I couldn't say with certainty which commands I use the most. I've hammered them into the spinal cord. Luckily there is the bash history. Making a "historytop" command is relatively simple. This command prints your top ten most used commands. [crayon-5dd59d9a7899c979633828/] Breakdown of [...]

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-5dd59d9a78e1d583986004/] Wolf! Wolf! The wolf is performing a MITM attack! Have you ever seen this message when attempting to SSH somewhere? [crayon-5dd59d9a78e22909789530/] 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-5dd59d9a79b41956639659/] 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-5dd59d9a79d17456539783/] Start with these two lines [crayon-5dd59d9a79d1d180939530/] 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-5dd59d9a7a02f751335445/]