RSSAmplifier

Blog

Stacked Notion

Recent content on Stacked Notion

stackednotion.comRSS feed ↗57 posts

Latest posts

Automatically dimming your monitor at night

I have a LG 27” 4K monitor, which is great in the day time, but at night it’s rather bright. I use Redshift to automatically reduce the colour temperature of what is displayed on the screen, but the monitor is still too bright on full brightness. It turns out the brightness of external monitors can be controlled via what’s called the Display Data Channel. Note that my monitor is…

On documenting code

When I write code, I try to make it clear what it does without needing comments; I try to use meaningful function and variable names, not make functions too big or too small, try not to write anything too ‘clever’, etc. Recently I’ve began to feel that’s not really enough. I feel that I can make improvements to make it clearer to others what is going on in my code, and most…

Setting up a new drive on your Linux NAS

I received some new drives recently to expand my NAS. Here I document the process of setting up a new drive, mainly for my future reference, to get everything in one place so I don’t need to look at a load of different articles to figure out what to do. Write down the details When I first receive a drive the first thing I do is update a spreadsheet with the details of it.

The death of XMPP

There was a post this morning on Hacker News, asking what should replace XMPP, an open chat protocol which is now practically dead. If you look at the development of social media over the last 10 years, the biggest failure in my opinion is that nothing is open – if anything we have gone backwards. When ‘web 2.0’ was still a cool buzzword there was talk about the semantic web and open data formats…

WordPress permission issues

If you try and install a WordPress plugin or upgrade to a newer version through the admin console you might get this error message and a prompt to enter FTP details: To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. Contrary to what it says, you don’t actually need to enter your FTP credentials, you just need to set the…

Formatting dates and times in Rails with I18n.localize

irb(main):001:0> Date.today.strftime("%d-%m-%y") => "03-01-15" The typical way of formatting a date in Rails apps is to use the standard #strftime. This works great to start with, but repeating the formats again and again throughout your code leads to issues with maintainability. If you want to change the format you’ll need to go through many different files, and you’ll probably end up with…

WordPress multisite with multiple domains

One of the reasons why I decided to migrate to WordPress rather than another blogging product, is because WordPress is a platform you can use to build more complicated sites on. One feature (that is now built in) is multisite – it allows you to setup multiple sites sharing a single Wordpress installation. The idea originally was to create a “network” of related sites, but you can use it to create…

Travelling while working is terrible; travelling while working is awesome

For the last couple of months I’ve been living as a digital nomad. I’ve been to 5 cities so far, and I’m currently in Georgetown, Penang, Malaysia. It’s 32c and sunny outside, yet I’m sitting in Starbucks (more on that later). When I meet people and tell them what I do, they say they would love be able to do that, yet my usual response is a bit of a negative “it’s not too bad”.

Migrating from Octopress to WordPress

I’ve recently migrated from Octopress to WordPress (yep, you read that right). I moved over to Octopress when it first became popular a few years ago, but it has started to get a bit limited for my needs. I want something more like a CMS, which WordPress handles quite well. Unfortunately migrating wasn’t so straight forward, here is what I did.

Vim after 11% of my life

Right now on Hacker News there is an article Vim after 11 years , detailing the authors current configuration of Vim. I haven’t quite been using it for 11 years (hell, I don’t think I was even programming that long ago…), but I’ve been using it for at least 11% of my life, so close enough. Anyway, this is why I love Vim. I first started using Vim back when I was in London. I had just started work…

January Progress Update

So I’ve noticed on /r/OneGameAMonth quite a few people have been posting progress updates so I figured I should get on that. I’m not going to give any video updates as I a) find 25 minutes of some guy talking about code incredibly boring and b) my game doesn’t have very exciting gameplay or graphics to show off unlike others . When I first decided to seriously do this I created a GitHub repo for…

One Game A Month

First of all Merry Christmas to everyone! It is 20:30 on Christmas Day, and I am most utterly stuffed with turkey and stuffing. The year is pretty much over, so it is time to look forward to 2013. I’ll should sum up what happened in 2012 as well, as a lot changed for me. I’ll leave that for a seperate post though. For the last few months I have been pretty much slacking on my personal projects. I…

Setting up pass on OS X

Over the weekend there was a post on Hacker News about Pass, the standard unix password manager now being on Homebrew. I hadn’t heard of pass before, so I did a bit of reading about it. From the announcement post: Password management should be simple and follow Unix philosophy. With pass, each password lives inside of a gpg encrypted file whose filename is the title of the website or resource that…

Logos Quiz is genius

Over the past few weeks all the app buzz has been about Draw Something and Instagram. Admitiedely good apps, but they’ve had their 15 minutes of fame. I’ve noticed over the past few days on Facebook a lot of posts about an app called Logos Quiz. I usually ignore most game posts on Facebook, and did the same with this, oh how I was wrong… I noticed this today: Yes that is right, it is #1 in the UK…

Easy Rails daemons with Upstart

Back in 2010 when I wrote TweetedLinks I needed a couple of daemons running in the background. I’ve used tools like God and DaemonKit before, but honestly they are more hassle than they are worth. I wanted something really simple that would play nicely with Bundler and not complicate development and debugging. At the time, at work I was working onan old Rails app, so I looked to see how that did…

Puppet: Setting up and using the Puppetmaster

Over the past few months I’ve been working on using Puppet to automate my server setup. At the moment I only have one server, but it is still a pain to rebuild every few years whenever an old version of Ubuntu is discontinued. You can see what I’ve got so far on GitHub. Puppet seems like a great idea but documentation is absolutely appalling. The tool itself has changed quite quickly, so a lot of…

I’ve switched to Octopress!

Like most geeks in 2011, I’ve decided to make the switch to Octopress. Previously I was running a WordPress installation that hadn’t been updated since early 2009 which I wasn’t too uneasy about. Plus I’ve also been meaning to consolidate a couple of servers for a while, and this makes it even easier as I don’t have to worry about moving the database. 🙂 At the moment I have imported all the posts…

Things that should work in IE that don’t…

For the first version of TextJs I “forgot” about Internet Explorer. I didn’t have a machine to easily test it on, and just wanted to get something out there to see whether the idea is worthwhile. I quickly soon got a complaint about this, so thought with the latest version I should fix that. I installed Windows 7 onto (into?) a virtual machine, here is what I got: Le sigh.

TextJs: Now available on the Android Market

Just a quick note to say that TextJs, my desktop SMS app, is now available on the Android Market! If you need any help or support feel free to send me an email or post a question in our Get Satisfaction group!

How to setup log rotation for Rails apps

I’m sure we’ve all been there. You’ve been tasked with fixing a Rails app, you go in for some debugging magic and find the production.log is 3GB and counting as nobody bothered to setup log rotation. Here is how to avoid that… On Ubuntu machines (and I would guess most other Linux distributions) logrotate comes installed by default. To set it up, you just need to create a new config file in…

Testers Required

Over the past few weeks I have been working on an app which lets you send and receive SMS messages on your phone using your PC. I first started working on it over a ago but like most projects something more interesting came along (Tweeted Links I think :-p). After seeing a few other apps trying to solve this problem, and although having half-assed implemenatations getting quite a bit of traction,…

Dear Google, what’s going on?

I don’t know how long this has been going on for, but I first noticed it about a month ago. Certain tube stations in London have non-English names on Google Maps. I haven’t actually visited them, so they could have been renamed as far as I know… I would have thought I would have read about it in The Metro at least. White City. Victoria. Southwark.

My Problems

I have to use different applications on different platforms to communicate with people. There is no fully integrated cross platform messaging system. I may SMS one person, and then later talk to them on GTalk, or maybe send them an email if there is something a bit longer than can fit in an SMS. For each of these I need to use a different application (SMS, Adium / IMO, GMail), and more often than…

New features on Tweeted Links

Over the last couple of weeks I’ve been implementing a few new features on Tweeted Links. I actually released them last week, but forgot to write up a follow-up post 🙂 First of all there is a new design. The old one was hacked together in about 5 minutes, so this is kind of a relief. It was made by my old friend James Deer for a project we worked on together a few years ago, but never got around…

Facebook Apps Primer

I was interested in how the flow of Facebook apps work and the interactions a user can make. This presentation is the results 🙂

Designing Android Interfaces

One of the issues that has started to annoy me as Android has started to game momentum commercially is that a lot of Android apps are just a copy of the iPhone application. This issue occurs on iOS as well, as a lot of iPad (compatible) apps are just scaled up iPhone apps, however this is a really bad practice. Android has a lot of different ways for users to interact with an application compared…

Agile development in a team of one

The other day at work we were discussing something that I expect the majority of developers feel. When working on your personal projects, you never seem to finish anything. Fortunately one of the guys came up with an answer that he used to get his app out of the door: Do what you do at work, use agile! It seems he isn’t the only one, a quick search turned up a few related posts:

What I’m running on my Nexus One

Just for future reference, here is what software I’m running on my Nexus One: Cyanogen Mod (6.1.0 RC1) intersectRaven’s Kernel (20101107)

Tweeted Links: An introduction, and a review

If you follow me on Twitter you have most likely seen my rants about my new service, Tweeted Links. The method behind the madness of it is basically this: I post a lot of links to Twitter, and often want to revisit them at a later time. I usually don’t Tweet anything meaningful with them that will help searching (e.g. KK) and usually shorten the URLs. Tweeted Links solves that problem!

Unicorns and Rainbows

Last week I gave what we call a “Munch ‘n’ Watch” at work. If anyone comes across a new technology they like the look of, over lunch they give a presentation about it. I have been playing with the Unicorn server recently, and I am using it to serve one of my side projects. It is also available as a PDF version. (On a side note I have been using Google Docs for everything recently.

What are BFS and CFS?

A couple of weeks ago I was browsing the XDA Developers forums looking at custom kernels for my Nexus One. I came across a kernel that looked good, however I was a bit confused about the two different versions on offer. One was called BFS and the other CFS. At the time I must have been having a bit of a blonde moment as the two acronyms completely passed me by….

ext4 options for a media drive

2016 update: I’ve published a new article about setting up a new drive on my NAS. If you are doing this now I’d highly recommend you use a filesystem that has built in bit-rot protection such as BTRFS or ZFS. Take a look at that article for instructions of how to do that! At the moment I am reinstalling my desktop PC, and setting it up to be a media server / HTPC.

Thoughts on the Facebook privacy model

In todays ‘everything connected’ environment you need to be careful about what you say online. It can have knock on effects in terms of what people think about you, especially in the more serious aspects of life such as your career. As such, personal branding is the key, and you should consider everything you say online a press release. In terms of my social presence I have Stacked Notion (this…

Getting Social

If you are reading this post on the full site, you will notice a new bar at the bottom of the page. I’ve added the Meebo Bar which lets you do cool social-shary stuff. At the moment it isn’t really that impressive, however it looks like they are going to be doing some cool stuff with XAuth, a service that shares what social connections you have with a site you are visiting.

Watch your UTCing…

After a good few hours of investigating a bug at work yesterday, I came across a weird Ruby feature…. The #utc method on Time objects is destructive and modifies the receiver. $ irb<br /> ruby-1.8.6-p383 > a = Time.now<br /> => Wed Apr 14 15:36:21 +0100 2010<br /> ruby-1.8.6-p383 > a.utc<br /> => Wed Apr 14 14:36:21 UTC 2010<br /> ruby-1.8.6-p383 > a<br /> => Wed Apr 14 14:36:21 UTC 2010

How I used Twitter to harvest 8000 email addresses in twelve hours

After arriving home from work this evening I turned to the Twittersphear to see what was happening in the Blogosphear. I came across an article detailing how some guy got sued by Facebook for scraping their site. It is a rather interesting read, and rather eye-opening at how easy it is to do such things on social networking sites. Facebook has to be one of the worse in terms of security, or at…

Nice Loader

Since the start of Web 2.0, there have been a number of fancy loaders for Ajax requests and the type. Most of them are all based on the spinner type, which to be honest, is getting a bit old. Today I saw something original in Tweetdeck, and decided to create a HTML5 / Canvas version. Enjoy!

Daylight Savings Time Woes

Daylight Savings Time (DST) is one of those things you don’t really think about. You get an extra hour in bed in the Spring and an hour less in the Autumn, other than that and having to change the clocks you don’t have to think about much. Oh my, just be wait until you have to work on a system that has to deal with these… Here in Blighty we call it British Summer Time (BST).

Timing Attacks in Ruby

A few days ago I read an article I saw on Twitter discussing how analysing the time it takes your application to do stuff can lead to the discovery of security flaws. The actual flaw seems rather obvious once explained, too obvious infact, so I decided to test it out in Ruby. My results are documented below. So whats the flaw? One of the important rules of security is to never let anyone know more…

Painting the canvas

I have been having a bit of fun today playing with the canvas element in HTML5. From scratch, not knowing anything about the element, to making this clock took about 45 minutess. The API is nice to use, and I think in the future ‘canvas’ games will be taking over from flash games. More examples: Chain Reaction Game HTML5 Twitter Experiment – I just love this! Updated March 2010 to automatically…

New Project: YsFlight Organiser

Over the past week and a bit, when I haven’t been rescuing drunk, drugged up, hippies, I have been working on a remake of a tool I first made about 6 years ago! Back in the day I was using RapidQ Basic, this time around I took the easier option and wrote YsFlight Organiser in C#. What is the YsFlight Organiser? YsFlight Organiser is an addon management tool for the flight simulator / game…

Recommended Reading (Design Patterns and Frameworks)

Since I returned from London last week, after being unsuccessful with my job applications, I have been hard at it writing the codes. I build a new server, and compacted two servers on to this (the site should be a bit snappier now). I then decided to rewrite a project I first made about 6 years ago, in C# .NET using the joys of OO-design and managed code. After a few hours I then wondered how on…

Centralised development links

Random links, more explanation in a few days! [Moving on from centralised-decentralised development, or: what’s after github and gitorious?]1 Github vs Gitorious and centralised development revisited

Swine flu trends

Google Trends provides an interesting insight into the popularity of swine flu over the last month. The graph shows exponential growth in searches over the past week, which relates directly to the number of confirmed cases. Interestingly all of the top regions have confirmed cases, except for Singapore.

The Linux Experiment

Linux ewww! If thats what you are thinking then you had better avoid this place for the next couple of weeks. From Monday I am going to be using only Linux! Linux and myself have a love hate relationship (well its a bit one way to be honest). I love the ideas behind Linux, but I also hate those same ideas. Open source software can produce wonderfull pieces of software, such as Firefox the browser…

Git: Undoing the last commit

No posts for a few weeks, whoa I’ve been slacking! Well here is a good one about Git! I just did something stupid. Something really stupid. Firstly I haven’t been following Gits ‘commit often’ moto. As such I have a load of changes that need to be committed, which really should be seperate commits. Luckily most of the changes are in seperate files so its not too much of an issue.

RCov: Must have development tool for TDDers

Although you are using a test driven development to create your latest app, how do you know that you tests are covering all your code? If done correctly it should, as you need to write tests, then when they fail, write the code to make them pass, but how many of us follow that religiously? Even if you do, how does somebody else know you are? Enter code coverage, as defined by Wikipedia it is “a…

Five second delay with Sqlite and ActiveRecord

Another project I am working on uses Sinatra as a framework, so doesn’t have all the fancy Rails stuff built in. Originally I was using my own database code, but that started to get a bit complicated, so I am using ActiveRecord (as is used in Rails) instead. This worked fine, apart from one thing… Occasionally when accessing pages I would get a random 5 second delay. At first I thought it was the…

Creating a secure User model in Rails (Part 2)

In the last post I discussed why I wanted a secure user model, and the design for the database. This post one (hopefully) secure implementation. Design Time The requirements for this aren’t particularly high, but here is the basics: When being created, a password and password confirmation must be supplied, which must match When being created, the password is hashed and saved in the hashed_password…

Creating a secure User model in Rails (Part 1)

While doing my third year project, one of the issues that has been perplexing me for about the last week is how to create a secure User model in Rails nowadays (version 2.2.2). In the good old days I used to do some magic and it worked, but then restful_authentication came along and everyone seemed to use that instead. Although it is a good plugin, it isn’t very apparent how it works behind the…