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 


Learning a Programming Language

󰃭 2014-02-14 | #javascript #programming-projects #ramblings

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 language to language, but some languages have their own thing going on.

Continue reading 


Go Learn

󰃭 2013-09-08 | #golang #programming-projects

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 made using a closure, caching previously calculated numbers.

Continue reading 


Trying out Ruby on Rails

󰃭 2013-06-30 | #programming-projects #ruby

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 fixed easily.

Continue reading 


Just switched to Ubuntu

󰃭 2013-05-28 | #linux #ramblings

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, something would break.

Continue reading 