Posts in 'software'

Host your own music server with supysonic

I like to self-host services to make things fit my needs instead of the other way around and to satisfy my need to control my data. Also remember that self hosting is really important for the health of the open web and internet.

There are a couple of options for self-hosted media servers. I always go for FLOSS solutions, so Plex and friends are not an option. A couple of years ago I tried Subsonic, including the MadSonic and Musicabinet forks. Subsonic looked really outdated at that time, so that didn't last long. Musicabinet was second in my evaluation ...

Snippet testing with Firefox on Docker

Mozilla's Snippets Service feeds Firefox for Desktop and Android with small HTML or JSON blobs with content to display about:home page. That's the page users get when they open up Firefox.

Desktop snippets are usually a line of text and an icon but the service supports much more complicated snippets. Multiple choice forms for our end of year fund raising campaigns, videos about our mission, interactions with the browser Chrome and others. We even had a HTML5 game going once!

As the snippets increase more and more in complexity we need better ways to test them. Unfortunately ...

Downloading HDS Flash (f4m) video streams.

Some WebTV or other video streaming websites use a special Adobe (surprise, surprise) inspired protocol to stream their content. The special thing about this protocol is that the file is split into chunks which I guess is good if you want to jump on different points in the video or you have an unstable internet connection but really annoying if you just want to download the video and view it in a different player.

This protocol is called Abode Dynamic Streaming for Flash and usually the sites link to f4m manifest files. From the SWF Wikipedia Page we read get ...

Fleet job to remove unused docker images

Engagement Engineering, the team that I'm part of at Mozilla, runs two Deis clusters on AWS to host important websites including www.mozilla.org.

Deis is a Heroku-inspired PaaS which utilizes CoreOS and Docker. It's a great open-source project, developed in the public, with a great Community and commercially backed by Engine Yard.

Apps on Deis run within Docker containers which run on CoreOS machines that form the Deis cluster. Each new release of your code, i.e. each new deis pull or git push, creates a new Docker image that is stored in the internal Deis Docker ...

List the extensions of files under a directory

I want to list the extensions of filenames in a directory, sorted and unique.

First list all the files, leaving out directories using:

find -type f .

Then use awk to get the last three characters of each line, i.e. filename.

find . -type f | awk '{ print substr( $0, length($0) - 3, 4) }'

AWK's substr function extracts four characters (last argument) of string $0 (first argument) starting at full lenth of the string minus three characters (second argument).

This will list the extensions from all files in the current directory and all directories below.

Now sort and uniq the output ...

Don't hesitate to get a VPS to do your work.

This is not going to be one of these posts about how I got a super slim, slick machine or tablet and I moved all my work in the cloud. Fortunately this is old news and nobody talks about it. That being said I have been working on VPS machines for the last 6 months for some tasks.

When your bandwidth is not enough for what you've to do renting a VPS is a great option. I've seen speeds up to 200MB/s on the cheap DigitalOcean or Vultr VPS, with the later being faster most of the ...

Duplicity scp backend weirdness

I'm a big fan of Duplicity and I use to backup my laptop to my office based server over scp which in its turn encrypts everything with EncFS and syncs everything up to my SpiderOak account. I was going under a typical maintenance today and I run duplicity collection-status to see how many backup sets I have.

Surprisingly duplicity returned only one full backup set more than a year old and no other backup sets. After some digging I found that the returned backup set was indeed the only full set I had but besides that I had many ...