Starry Sky in HTML5 Canvas - Part 2

󰃭 2019-04-13 | #canvas #javascript #programming-projects #tutorials

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!

Continue reading 


Migrating old-style JavaScript code to ES6

󰃭 2017-12-28 | #es6 #javascript #refactoring #webpack

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 to give some context on the state of the application.

Continue reading 


Setting up sendmail to redirect emails

󰃭 2016-05-14 | #email #linux #tutorials

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 my main address automatically.

Continue reading 


Generating partner.jar for Salesforce API Integration

󰃭 2014-11-12 | #java #tutorials

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!

Continue reading 


How to use the Youtube JS API to play music in the background

󰃭 2014-05-23 | #javascript #tutorials #youtube

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 absolute positioning with negative coordinates because using display: none; will prevent the onReady handler from the Youtube player from triggering on Firefox.

Continue reading 