Linux Video Stabilisation

Removing camera movement due to operator or environmental factors is extremely time-consuming if attempted manually and automated functions have traditionally only been available in proprietary, commercial non-linear video editing software for similarly-restrictive operating systems. The open source VirtualDub‘s Deshaker plug-in is a noteworthy free solution but require Microsoft Windows or a compatibility layer (WINE) which reduces the inefficiency compared to the flexible stabilize filter for transcode.
Continue reading

PHP Page Generation Time Code Example Script

PHP Page Generation TimeWhen optimising a website, it’s common for people to measure the PHP page generation time because it is more reliable than the client measuring the total request time which includes network delay which is beyond the scope of the code.

I recently started updating a combined CRM/CMS that I initially developed for an online-only reseller business. Back then, this was how one would usually get microsecond-accurate PHP script generation times. The reason I’m posting this, is not because it’s an integral development for the language but because I see lots of people still recommending the following solution.

Continue reading

Convert RGB to CMYK with GIMP on Ubuntu 12.10

Convert RGB to CMYK with GIMP

One of the things that graphic designers find necessary but, annoyingly, isn’t easy if you aren’t using Adobe’s Creative Suite is the ability to convert RGB to CMYK with GIMP as well as other proprietary pallettes such as the infamous Pantone. Because of licence restrictions on these sets of colours, they are not distributed with open source software so must be downloaded separately after the end-user agrees to their licencing terms.

Adobe RGB/CMYK Colour Profiles

To add Adobe’s colour profiles to GIMP, extract them into your home directory or somewhere you don’t mind having them sitting long-term, then; in GIMP, under Edit > Preferences, click the Colour Management section then select the profiles you’d like to use. A number of profiles are included in the bundle but most users will probably find themselves requiring the following:

Continue reading

mysqldump diff MySQL Differential Backup Shell Script

mysqldump diffmysqldump diff is a shell script that I wrote to take some of the pain out of differential MySQL backups.

Download mysqldump diff

After changing the appropriate values, this will dump your database daily and create a unified diff patch so you’ll only need to keep the original mysqldump intact and patch files describing the subsequent differences between each future dump. It is a simple form of version control for MySQL database dumps without the overhead of managed methods. Although results will differ based on on the frequency of record-modification and the interval between backups, using this method on weekly backups (over a 2-month period), my patches were each roughly a tenth of the size of the original dump and of course, the benefits are exponential as time goes on while allowing you to increase the frequency many-fold while still saving space.

Continue reading

wget Regex and File Type Filters to Mirror Websites

Use wget to download everything - quickly!wget is a powerful, command-line tool for file downloading flexibility, usually via HTTP. It allows you to backup entire websites or just the images, for example. It provides a lot more control and performs a lot quicker than other graphical tools or browser plugins such as DownThemAll!.

wget comes installed by default with every server operating system and every desktop operating system I use but if you are using a commercial, consumer desktop OS; follow the instructions for Apple MacOS or Microsoft Windows.
Continue reading

Origin is not allowed by Access-Control-Allow-Origin

Remote Origin Errors with JSONP and jQueryAre you self-harming because your browser is complaining about cross-domain, remote-origin XML requests? As annoying as it can be, the web would be a much nastier place without this restriction that limits what can be pulled from where. You’re probably seeing this exact message in the console/error log of your browser’s development tools:

Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin

Once you understand why you’re getting issues with this, it’s tiresome to always be re-writing this integral function so, like my other free web development resources on here, I’ve saved an example as a gist on GitHub with jQuery and PHP code which you are free to copy, clone or download then use without limitation!

Continue reading

Tor Exit Node Trials and Triumphs

Tor Exit Node SetupI recently worked on a project that required rotating IP addresses without the need for speed, just viewing specific pages from different addresses. I first started with open HTTP proxies but their reliability varies hugely and I found that parsing any (free) proxy list was so unreliable and most of the time was spent determining that a proxy was not online so I came up with the idea of leveraging the Tor network due to the ease of path-finding and pruning of dead peers. As the results have shown, the number of peers is always sufficient for the requirements.

As a way of contributing back to the community and the Tor Project, I set up a dedicated Tor Exit Node. It was quite interesting and took a little while of going through disparate documentation sources and the outdated version in the repositories for Ubuntu Server but it was thrilling to learn exactly how this service function, that I’ve admired for many years, functions.
Continue reading

Ausgrid Mobile Apps and Wireless Security

Closed for Business - No Public Ausgrid Mobile Apps I received a letter ifnorming me that I’d be inclued in a trial of Ausgrid’s new wirelessly and fibre-optic smart grid as part of their Smart Grid, Smart City initiative. I’m truly honoured because, as I’m told, I “will help shape the future of energy use in Australia”! I was quite interested in what sort of access they’d be allowing external entities – such as developers wanting to write Ausgrid mobile apps – considering that one of the most-cited feature is remote monitoring of household electricity usage and remote control of appliances via an online tool or ausgrid mobile app.

I contacted their media department and was kindly re-directed and received this response:

“The SGSC trial solution is a ‘closed system’, and as such is not designed to incorporate external-to-Ausgrid application development.”

- Senior Project Manager

Continue reading

Extract Icons from EXE Files in Ubuntu Linux

Extract Icons from EXE Files on LinuxAs I sometimes use Windows programmes for testing cross-compatibility of projects, I end up adding iconless WINE shortcuts to my launcher but there is an easy way to extract icons from EXE files! I normally just hop onto Google Image Search and find a nice .PNG with transparency but here’s a quicker method:

sudo apt-get install icoutils
wrestool -x -t 14 source.exe > output.ico

The above should result in a multi-layered file but it’s quicker and easier to open this proprietary Microsoft Windows .ICO in GIMP, select which icon you’d like to use then export it as a non-proprietary .PNG file to retain transparency.

As they’re the sort of things I wouldn’t remember (or bother) to back-up, I’ve found it convenient to store all of my icons in a sub-directory of my Ubuntu One share so that they’re painlessly accessible on every computer or future installation.

Note: As Rduke15 pointed out, it seems that 64-bit executable binaries are not supported. I’m uncertain if that’s from structural differences or missing libs to add support, such as ia32-libs .

Stream Television in Ubuntu Linux with SopCast Player

Stream Television with SopCast PlayerA friend loves to stream television online to watch the football matches from England because of costly television channel subscriptions in Australia. I thought I’d write this guide to help him stream television so he doesn’t have to stay up until silly hours of the morning. A direct television stream also means one doesn’t have to hunt around the ad-ridden, unreliable websites before kick-off time hoping to get a good feed. I hope this guide on how to stream television online for free makes someone else’s sports entertainment a little easier.

sudo add-apt-repository ppa:ferramroberto/sopcast
sudo apt-get update
sudo apt-get install sopcast-player


The Win-popular VLC will also be installed but thankfully it needn’t be seen as the front-end and SopCast Player or another  GTK-managed player can display the stream.
Continue reading