. If you just want the audio, you can hide the element that contains the video: Here we use…"},{"@type":"BlogPosting","headline":"Learning a Programming Language","url":"https://kaeruct.github.io/posts/2014/02/14/learning-a-programming-language/","datePublished":"2014-02-14T00:00:00.000Z","abstract":"I’ve heard that if you’re a good programmer, you should be able to pick up a new language in a few days. And I’ve done this myself, I learned the basics of Go a few months ago. Built some command line programs and a web app with it, all in a few days. Yet, what does it take to really learn a new language? To master it? Sure, there are some concepts that translate well from…"},{"@type":"BlogPosting","headline":"Go Learn","url":"https://kaeruct.github.io/posts/2013/09/08/go-learn/","datePublished":"2013-09-08T00:00:00.000Z","abstract":"Today I decided to try out Go . What is Go? Go is a programming language designed and developed at Google. It was designed by really smart people: Robert Griesemer, Rob Pike, and Ken Thompson. Syntax-wise, it looks a lot like C, except the ending semicolons are optional, and parentheses for if , for , etc are not required. Here’s a gist showing some syntax: It’s a fibonacci calculator…"},{"@type":"BlogPosting","headline":"Trying out Ruby on Rails","url":"https://kaeruct.github.io/posts/2013/06/30/trying-out-ruby-on-rails/","datePublished":"2013-06-30T00:00:00.000Z","abstract":"I’ve heard a lot of stuff about RoR for a while, so I decided to finally try it out and see what all the fuss is about. What is Ruby on Rails? A web framework that runs on the Ruby programming language. First impressions: too much magic going on. It seems like a good thing for quick development, but I prefer knowing exactly what is going on in case anything goes wrong so the problem can be…"}]}
LocalStack is a great product. It’s basically an emulator for the AWS cloud that you can run locally. We rely on it for development and automated testing. However, nothing comes for free. Understandably, the company behind this amazing piece of software has some bills to pay. They changed the license to require a subscription to run their provided Docker images. If the license is not…
I think a codebase can tell you a lot about the people that work on it. From this specific example in particular, I felt very reassured that the team takes work-life balance seriously and never works on weekends. For context, the software interfaces with old-school banking systems that famously do not run certain processes on holidays or weekends. We had some logic to to an early return to avoid…
SSH has a nice feature in which you can store aliases for frequently accessed hosts. Combining this with fzf , you can have a nice quick shortcut to quickly pick a server to connect to into. This comes in very handy if you need to ssh into different servers and forget their IP or hostname often. Here’s a sample ssh config file (normally located at ~/.ssh/config ): # see…
NodeJS has a neat API called AsyncLocalStorage . It’s used to share information across callbacks and promise chains. For example, it is useful to share information for all the code executed when serving a web request. I also found it very useful to keep trace information to easily keep track of which item was being processed during a batch process. The only caveat in my opinion, is that you…
This is a simple, straightforward implementation of a visualization reminiscent of the classic Windows 95 starfield screensaver. It is also interactive: you can touch the screen or use the accelerometer to influence the direction of the movement. This is how it works: Create a bunch of particles (100), each in a random position. Every frame, move each particle further away from the center *. The…
About a year ago, I decided to move all my personal notes from DokuWiki to Obsidian . DokuWiki is great software and has served me well, but I never utilized it to its full capacity. It’s biggest strength is that it’s a… wiki, and I was the sole user. It made little sense for me to keep a service running when I could just have some Markdown files locally. And Obsidian provides a…
Keycloak provides user federation, strong authentication, user management, fine-grained authorization, and more. Here is a guide to enable HTTPS access to your Keycloak server using a free Let’s Encrypt SSL certificate. The beauty of Let’s Encrypt is its ease of use and the fact that it’s free! This guide assumes you have already installed Keycloak at /opt/keycloak/ using the…
Nowadays it’s very easy to publish on the web for free. There are countless blogging platforms and website creators. But these platforms usually end up controlling your content. Sometimes you cannot even export your own data! The other extreme is to set up your own server by yourself. Buy a VPS (virtual private server) or a shared hosting somewhere, install a web server, and upload your…
I made some small apps for Android and I wanted to distribute them. I also care a lot about software freedom, so F-Droid is the best place for me to publish my apps. Disclaimer! You are not able to sell your app on F-Droid. If you want to make money with it, you would need to allow users to pay through another method. Please see this StackExchange question if you’re interested in…
Last year, I was tasked with mentoring an intern. It wasn’t my first time mentoring, but it was my first time being fully in charge of a new employee. In the end, the intern was hired as a full-time employee, and I thought it would be helpful to compile all the advice I’ve been giving them, for future reference. The following tips come from my experience and my way of working, as well…
You know when you share a link on social media or mesagging apps, sometimes the app shows a nice preview thumbnail with a description? You can click on it and it will take you to the linked website. I wanted to have this functionality for a website I was working on, so I did some research on how to get it working. Short answer: use the og:image meta tag. Longer answer: read on. You have to use…
In my spare time I often enjoy creating visualizations using HTML5 canvas. I’m planning to do a little presentation about this so I thought a good way to get started was to create a blog post explaining how to do a simple one. This tutorial will teach you how to create something like the image below from scratch! IMPORTANT – you can try out the result of this part of the tutorial by…
This is part of a series! Please make sure you have read Part 1 first! IMPORTANT – you can try out the result of this tutorial by visiting this CodeSandbox . However, I encourage you to read the blog post and try to follow along to understand how and why it works. Last time we left off with a very nice starry sky, but it’s a bit dead. We need to add some animation to it! The way…
Recently (at work) I had to migrate a medium-sized JavaScript codebase (20KLOC) to ES6 . We wanted to migrate to take advantage of the new features such as arrow functions, destructuring, and classes (there are a bunch more!). Additionally, I was tasked with introducing eslint and prettier to improve the quality of our code a bit more. Before diving into the migration process, first I’d like…
Disclaimer: the instructions below are for Ubuntu, but they should work for most distros, the biggest difference is that the configuration files might be located elsewhere. If you’re like me, you have a main email address and other email addresses set up in other domains. I dislike having to check all my email addresses individually, so I set up my mail servers to redirect all the email to…
I ran into a small issue recently when setting up a Java project to use the Salesforce APIs. Basically, you need to download a WSDL file from Salesforce, then use a tool made by them to generate a jar that you then include in your Java program. They instruct you to download force-wsc.jar and then run it, but when you run it you realize they didn’t pack the dependencies within the jar! To…
The Youtube JavaScript API allows you to embed YouTube videos and interact with them programatically. To use it, first you need to embed this script into your page: <script src="http://www.youtube.com/player_api"></script> . If you just want the audio, you can hide the element that contains the video: <div id="player" style="position: absolute; top: -9999px; left: -9999px;"></div> Here we use…
I’ve heard that if you’re a good programmer, you should be able to pick up a new language in a few days. And I’ve done this myself, I learned the basics of Go a few months ago. Built some command line programs and a web app with it, all in a few days. Yet, what does it take to really learn a new language? To master it? Sure, there are some concepts that translate well from…
Today I decided to try out Go . What is Go? Go is a programming language designed and developed at Google. It was designed by really smart people: Robert Griesemer, Rob Pike, and Ken Thompson. Syntax-wise, it looks a lot like C, except the ending semicolons are optional, and parentheses for if , for , etc are not required. Here’s a gist showing some syntax: It’s a fibonacci calculator…
I’ve heard a lot of stuff about RoR for a while, so I decided to finally try it out and see what all the fuss is about. What is Ruby on Rails? A web framework that runs on the Ruby programming language. First impressions: too much magic going on. It seems like a good thing for quick development, but I prefer knowing exactly what is going on in case anything goes wrong so the problem can be…
I decided to replace the Arch Linux installation on my desktop (my main computer) with Ubuntu. Too bad I don’t get to feel 1337 for using Arch anymore. So far, so good, except I had a few issues when setting up Eclipse, but I always seem to get issues when installing Eclipse, no matter what platform… One of the main reasons why I decided to do this is because whenever I updated Arch,…
I really wanted to make a new post today. It took me a while to think of a good thing to post about, but I finally came up with something. I’m going to tell you how I got into programming. I’ve always been an introvert. When I was a kid, I had only one or two friends, and I would always play videogames after school. I remember the first console I owned was a Nintendo GameCube. Anyway,…
I started doing the Project Euler problems last weekend. So far managed to get to problem 10. I have realized how much I suck at math, and now I want to learn more. I know people with knowledge in math will probably laugh at my solutions, I really feel like I half-assed most of them so far. Those with knowledge in math will probably find the problems easier than those with knowledge only in…
Today I had some more time to code something fun, so I decided to make a tunnel of sorts. The trick is really simple, first you just draw rings around the center of the page, and tweak their position a bit depending on the position of the mouse. To achieve the rainbow effect, you just have to make it so each ring has its hue value a little higher than the ring before it, and increase all of the…
Yesterday after work I had some time to waste, so I decided to do some silly things in javascript with a canvas and some trigonometric magic. Move your mouse around to change some variables, and click to toggle clearing of the canvas. You can achieve some trippy effects! colorful sine wave colorful flower These are all on my github, in case you wanna take a look .