Hosting a Website on Tumblr

Last year some time I whipped up a simple site based on a premise I’d had knocking around in my head for a while. The aim is simple: send jovial insults to people you know.

Offend a Friend screenshot

I originally registered a domain and hosted it on GitHub pages but as the domain expired, despite the relatively low cost, I was reluctant to waste money on a vanity project. I could have left it hosted with a Github domain, but I had been looking for an excuse to try another platform.

I knew you could bend Tumblr to host more than just the traditional tumblog format with chronological posts and this gave me the opportunity to try it.

Storing your content

The site is fairly simple, largely consisting of a bunch of images. In fact it’s closer to a single page app (SPA) than a proper website. The first task, therefore, was to figure out how to store those images so they were accessible.

As it turns out, you can store static content in relation to a theme on Tumblr, but there’s no easy way to retrieve these. On the original site I used a JSON file to store image names, etc. I would then simply use the paths in the file to retrieve the relevant images. Continue reading…

Is the Raspberry Pi a Rip-Off?

Let me start by saying that I like the Raspberry Pi, I own four of them. I’m also a big fan of the Foundation’s aims. The title of this piece is pure click-bait.

That said, I happened to be perusing the second-hand listings for computers on eBay recently, in response to a forum post, and was amazed at how much you can get for not a lot of money. The prices were so reasonable they got me thinking.

It must be something about January, as I have written before about the price of second-hand PCs, back in 2013. I’ve also asked where the cheap computers were, because prices seem to stay pretty static for new computers, with very little change in real-world performance.

That means you can pick up a lot of machine for little money. How little? Well cheaper than a Raspberry Pi.

The Cost of Pi

The Raspberry Pi was designed to offer an affordable computer to encourage tinkering and learning, and it does. The Pi Zero retails for around £4 ($5), if you can get hold of one. They go up to about £30 for the most powerful model (the Pi 3 Model B at the time of writing).

That is just for the board though. To actually use it you also need:

  • Case
  • Power supply
  • Storage (SD card)
  • Monitor
  • Keyboard and mouse

For the purposes of this exercise I assumed we were using an existing monitor or TV (as the Pi was designed to). I also decided to ignore the keyboard and mouse as the cost cancels out regardless of which option you choose. Continue reading…

Doubling Up on 4K

In the middle of last year I was presented with a 4K monitor (an ASUS MX27UQ). I was very pleased with it and the picture quality was a massive step up from the aging LG W3000H running at 2K that had been my main screen for many years. So I was very grateful to Father Christmas when he delivered a second 4K screen (a Dell UP3216Q).

Previously I had been able to get away with unlocking the clock on my existing Radeon HD 5450 card to provide a 4K picture (well, UHD @ 3840×2160). That wasn’t going to cut it to run dual 4K monitors though, so the search was started to find something suitable.

Searching the Matrix

Requirements for running 4K/UHD

Running a single 4K monitor doesn’t require a whole lot, with around 12 Gbit/sec for 3840×2160 @ 60Hz. For 30Hz that drops to about 6 Gbit/sec. Hence why I was able to push that using a cheap card released in 2010. The limiting factor doesn’t tend to be the GPU power, but the connections on the board.

Only HDMI and DisplayPort are able to provide the necessary bandwidth to drive such big screens. A lot of cards come with HDMI, but the bad news is that only those released since 2015 (generally mid-2016) come with HDMI 2.0, which is the first version that supports 60Hz. Instead, you’ll generally get HDMI 1.4, which is limited to 30Hz due to the lack of available bandwidth. Mind you, that’s perfectly usable for general desktop use (in my experience, others appear to disagree).

The other option is DisplayPort, which since version 1.2 (released in 2009) has been able to supply enough bandwidth to drive a high resolution display at a full 60Hz. Finding cards with one DP port is pretty tough, finding one with two is harder still.

There are also options to drive displays using Thunderbolt 3 or Alt-Mode over USB-C, but these are even rarer. Continue reading…

Using Fieldbook as a Static Site Data Source

On and off for quite some time I have been looking for a simple web-based database with a UI that would allow me to dump info into it without having to worry about a schema, one that allowed me to easily pull the contents out to display in a web page.

I’d come across the various DBaaS options, but they all seemed to be geared towards millions of rows and gigabytes of data. None of them had a UI that looked appealing either (at least that I could see). Then I stumbled across Fieldbook.

It’s laid out like a spreadsheet, with support for several sheets inside any book. Aside from being able to arbitrarily create columns of data (and set types, requirements, etc), you can also link fields to other sheets, creating a simple relational database. It’s got an intuitive UI that isn’t too restrictive as well.

Spreadsheet as CMS

The reason I’ve been looking for a service like it is that I tend to knock up little sites that require infrequent updates (if at all) and setting up a full CMS seems like overkill (not to mention a lot of work). The endless notifications about updates on the WordPress sites I run — along with wider security news — and my liking for optimal site speed has led me to embrace static sites. Continue reading…

Hosting a Site on PubStorm

Update: I received an email today to say that PubStorm is shutting down as of the end of November 2016.

This is part of my series of try some alternative hosting options. Next on the list was a service I stumbled across completely by accident. It’s called PubStorm from a company by the name of Nitrous.

Their tagline is ‘Deploy static websites to a superfast global CDN in seconds.” Nice. They have two tiers: Free and Premium. The latter gives you a bunch of things like extra versions, visitor stats and guaranteed uptime.

The Free tier allows you to host up to 10 sites. It does allow custom domains and even SSL certificates. The negative (which I didn’t notice until later) is that it adds a PubStorm watermark to your site.

Getting Started

The biggest bugbear to getting started with PubStorm is that you need to install their command line tool. Bizarrely, although it’s not written in JS, they ask that you do this via npm, which means you need to have Node.JS installed.

Bad enough forcing me to install a command-line tool, which hardly makes it easy to use for non-techies, but why require Node when that’s not what the tool is written in?

At least you don’t have to worry about an onerous sign-up process, just email address and password (with a confirmation email). No attempt to collect credit card details.

Then it’s into the command line. If you opt to sign up via the website (as I did) note that you’ll need to run storm login first, which seems to be missing from the instructions.

I had all my files so I just needed to run storm init and enter the details as requested.

The requirements for the project name are odd as you can only use lowercase letters, numbers and hyphens. Presumably this is to make it URL safe and there’s no prior warning of this requirement. Here’s a stunning idea: take whatever name I give you and make it URL safe! You have to pick one that’s unique across all of their users too. Continue reading…