<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Machiel</title><link>https://machiel.me/</link><description>Recent content on Machiel</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Wed, 07 Dec 2022 22:33:04 +0000</lastBuildDate><atom:link href="https://machiel.me/index.xml" rel="self" type="application/rss+xml"/><item><title>Proxmox with a Single IP on Hetzner</title><link>https://machiel.me/post/proxmox-with-a-single-ip-on-hetzner/</link><pubDate>Wed, 07 Dec 2022 22:33:04 +0000</pubDate><guid>https://machiel.me/post/proxmox-with-a-single-ip-on-hetzner/</guid><description>I am not sure what it is with me, but I keep moving between self-hosted and hosted solutions. About a year ago I got rid of all my self-hosted services, and moved them all to hosted services. Nice, no more maintenance, nothing to break. No endless debug sessions right when you most desperately need access to one of your systems. Perfect.
Till I was talking to a friend of mine the other day, he was talking about his self-hosted Nextcloud instance&amp;hellip; And I started to miss mine.</description></item><item><title>Photos</title><link>https://machiel.me/photos/</link><pubDate>Wed, 15 Jan 2020 22:14:46 +0100</pubDate><guid>https://machiel.me/photos/</guid><description/></item><item><title>Using the Google Analytics API with Go</title><link>https://machiel.me/post/using-google-analytics-api-with-golang/</link><pubDate>Sun, 25 Nov 2018 22:33:04 +0100</pubDate><guid>https://machiel.me/post/using-google-analytics-api-with-golang/</guid><description>Over the past few years there were several occasions on which I had to access the Analytics API using Go. This should be, and is, fairly simple. However, each time it took me too long to get it up and running. So for a future reference to myself, and for anyone else out there struggling with the Google Analytics API in Go, I wrote the steps down.
So for this first step we need to set up Analytics in our Google API Console.</description></item><item><title>Deploying a Go application to your server</title><link>https://machiel.me/post/deploying-a-go-application-to-your-server/</link><pubDate>Mon, 19 Nov 2018 22:07:04 +0100</pubDate><guid>https://machiel.me/post/deploying-a-go-application-to-your-server/</guid><description>Alright, time to deploy our application to some host. I often use DigitalOcean, but feel free to use whatever provider you like. As long as you&amp;rsquo;ve got SSH access, you should be good.
If you feel like trying DigitalOcean, you can use my referral link to get a free $10 credit.
Let&amp;rsquo;s assume we&amp;rsquo;ve wrote this wicked application, and we can&amp;rsquo;t wait to open the doors to this to the public:</description></item><item><title>Pongo with Echo or net/http</title><link>https://machiel.me/post/pongo2-with-echo-or-net-http/</link><pubDate>Sun, 15 Jan 2017 16:21:04 +0100</pubDate><guid>https://machiel.me/post/pongo2-with-echo-or-net-http/</guid><description>It&amp;rsquo;s been a while since I started web development with Go, and I&amp;rsquo;ve been enjoying it a lot. I&amp;rsquo;ve used mainly Echo and the well-known net/http library.
However, today I am not here to talk about web frameworks, but about a templating engine instead. I like the default html/template package, but I am not very fond of it when it comes to bigger projects. Some things are simply harder to accomplish (like template inheritance) than I am used to.</description></item><item><title>Go, gb and Bitbucket Pipelines</title><link>https://machiel.me/post/go-gb-and-bitbucket-pipelines/</link><pubDate>Tue, 24 May 2016 07:40:12 +0200</pubDate><guid>https://machiel.me/post/go-gb-and-bitbucket-pipelines/</guid><description>Earlier today Atlassian announced Bitbucket Pipelines. It is basically CI built into Bitbucket. I gave it a try and it works perfectly fine for my not so extensive use case.
When setting up Pipelines, the documentation has NodeJS, Java, Ruby, Python and PHP covered. Unfortunately Go is nowhere to be found. Don&amp;rsquo;t fret, we can do it ourselves :).
Pipelines makes use of Docker images, so we&amp;rsquo;ll require a Docker image with both Go and gb installed.</description></item><item><title>Time in Go: A primer</title><link>https://machiel.me/post/time-in-go-a-primer/</link><pubDate>Tue, 26 Apr 2016 07:40:12 +0200</pubDate><guid>https://machiel.me/post/time-in-go-a-primer/</guid><description>Time is of the essence.
This initially started out as merely a few snippets of code regarding the formatting of dates, but then I decided that it is probably of more use if I publish it.
I extended the snippets slightly, and added some examples of commonly used functionality within the time library.
The reason why I have these snippets is because, well, Go&amp;rsquo;s date/time formatting is a bit odd.</description></item><item><title>Auto-renewal of Let's Encrypt certificates</title><link>https://machiel.me/post/auto-renew-lets-encrypt-certificates/</link><pubDate>Wed, 23 Mar 2016 21:57:17 +0100</pubDate><guid>https://machiel.me/post/auto-renew-lets-encrypt-certificates/</guid><description>Over the past few weeks I received the first batch of reminders regarding Let&amp;rsquo;s Encrypt certificates that are about to expire. I renewed the first few by hand, but surprisingly that get&amp;rsquo;s real boring real quick.
Let&amp;rsquo;s fix this. I wrote a simple bash script just to do this for me, here we go:
#!/bin/bash service nginx stop letsencrypt certonly --standalone -d machiel.me service nginx start Now just add the following line in your crontab:</description></item><item><title>Telegram, Go and 10.000 users in 24 hours</title><link>https://machiel.me/post/telegram-go-and-10000-users-in-24-hours/</link><pubDate>Thu, 24 Sep 2015 20:38:42 +0200</pubDate><guid>https://machiel.me/post/telegram-go-and-10000-users-in-24-hours/</guid><description>Telegram introduced their Bot API a few months ago, and I started playing around with it. The result of my messing around was a very non-creative but funny baby: StrangerBot. StrangerBot &amp;ndash; Chatroulette for Telegram.
After one or two hours of hacking, I set this bot free to roam the world with the other Telegram bots. These &amp;lsquo;other&amp;rsquo; bots were non-existant because it was about 24 hours after Telegram released their API.</description></item><item><title>Small introduction to tags in Go</title><link>https://machiel.me/post/using-tags-in-go/</link><pubDate>Tue, 21 Jul 2015 18:14:50 +0200</pubDate><guid>https://machiel.me/post/using-tags-in-go/</guid><description>Go has an awesome feature built in, namely tags. You are probably already familiar with them, they are like annotations in Java for example.
This is just a quick introduction: how to use them, and how to implement them.
First of all, a quick introduction to tags. Let&amp;rsquo;s take a look at the encoding/json package. This package makes use of tags for the marshalling and unmarshalling of structs/json.
A simple example:</description></item><item><title>bytes.Buffer for string concatenation in Go</title><link>https://machiel.me/post/bytes-buffer-for-string-concatenation-in-go/</link><pubDate>Mon, 13 Jul 2015 23:52:40 +0200</pubDate><guid>https://machiel.me/post/bytes-buffer-for-string-concatenation-in-go/</guid><description>Just thought I would write a quick reminder on how to properly do string concatenation in Go.
Every now and again I see string concatenation done like this: myString := myOtherString + anotherString. This is not the most effective way.
Let me show you an example. Recently I quickly wrote a library to slugify titles for one of my personal projects. When hacking it together I used string concatenation like demonstrated earlier.</description></item><item><title>Gracefully stopping goroutines</title><link>https://machiel.me/post/gracefully-stopping-goroutines/</link><pubDate>Wed, 08 Jul 2015 15:06:44 +0200</pubDate><guid>https://machiel.me/post/gracefully-stopping-goroutines/</guid><description>Recently I developed StrangerBot, a bot built using the Telegram Bot API. It&amp;rsquo;s pretty cool. It got more than 10,000 users in a week.
This bot was quickly hacked together, so I keep improving it and deploying fixes on a daily basis. I make use of channels that holds the received messages, and redeploying causes a loss of these messages.
My application contains one goroutine, that continuously tries to receive the newest messages sent to the bot.</description></item><item><title>What framework should I use for my project?</title><link>https://machiel.me/post/what-framework-to-pick-for-my-project/</link><pubDate>Sun, 28 Dec 2014 23:43:55 +0100</pubDate><guid>https://machiel.me/post/what-framework-to-pick-for-my-project/</guid><description>Do you recognize this question? You have a great idea for a new side project and after 100 hours of research and looking at benchmarks you&amp;rsquo;ve finally decided what programming language to use.
Nice! Well done. So - now it&amp;rsquo;s time to search for a cool framework to use! Yay, big fun.
So you start searching things like &amp;lsquo;best web framework for X&amp;rsquo;. Where X is the programming language you just picked.</description></item><item><title>Inject JPA Entity Manager with Guice and Play</title><link>https://machiel.me/post/inject-jpa-entity-manager-with-guice-and-play/</link><pubDate>Wed, 10 Dec 2014 00:20:13 +0100</pubDate><guid>https://machiel.me/post/inject-jpa-entity-manager-with-guice-and-play/</guid><description>Recently I&amp;rsquo;ve been making a lot of use of the Play Framework, overall I am pretty satisfied, but Play makes use of a lot of static helper classes which quickly lead to tightly coupling Play into your code.
For a while I have been trying to find out how to inject the EntityManager using Guice into my classes without having to call the play.db.JPA helper class everywhere.
The reason? Simple, I don&amp;rsquo;t want to couple my code so tightly to a specific framework.</description></item><item><title>Java enums as Request Parameters in Spring 4</title><link>https://machiel.me/post/java-enums-as-request-parameters-in-spring-4/</link><pubDate>Mon, 07 Apr 2014 00:34:56 +0200</pubDate><guid>https://machiel.me/post/java-enums-as-request-parameters-in-spring-4/</guid><description>Looking for a solution to pass enum values as Request Parameters in URIs using Spring is quite easy. However, my enum values are always fully uppercase. I do not like having capitalized characters in my URIs, so I went looking for a solution.
It’s actually quite simple, first off you simply configure your route to accept the parameters. Here you’ll see how that is done, this is my ExchangeController:
@RequestMapping(value = &amp;quot;/exchange/{currencyOne}/{currencyTwo}&amp;quot;, method = RequestMethod.</description></item><item><title>How to configure Spring Security using Hibernate with Spring MVC</title><link>https://machiel.me/post/how-to-configure-spring-security-using-hibernate-with-spring-mvc/</link><pubDate>Tue, 01 Apr 2014 11:04:49 +0200</pubDate><guid>https://machiel.me/post/how-to-configure-spring-security-using-hibernate-with-spring-mvc/</guid><description>Java is almost always giving me a bit of a hard time. I run into problems every now and then, so I start looking for answers on Google. Coming from PHP I am used to finding the answers within one query on your favorite search engine. However, with Java this is almost never the case.
I always have to view at least the first ten results to forge the answer to the problem I am having.</description></item><item><title>The quest for privacy</title><link>https://machiel.me/post/the-quest-for-privacy/</link><pubDate>Fri, 28 Mar 2014 11:09:08 +0100</pubDate><guid>https://machiel.me/post/the-quest-for-privacy/</guid><description>Recently I started worrying about my privacy. ‘Just recently?!’, you ask. Yup, to be honest with you, yes, just recently. It started off with an advertisement for a VPN provider on the BitcoinTalk forums. Private Internet Access is the VPN provider I am talking about, and it truly works like a charm. I can recommend it to anyone. It has a great app for both my Mac and my Android phone.</description></item></channel></rss>