Howto use Amazon RDS from Heroku

Heroku is quite popular for lightweight webservice and like projects. Until recently Heroku only offered PostgreSQL-based database backend providers, but now Heroku offers a quite large range of database backend providers; among them Amazon RDS. This is a short run-down on how I managed to get a Heroku-based application to connect to a Amazon RDS-based database. Install the Amazon RDS command line tools $ sudo apt-get install rdscli Create a AWS Credential File (~/....

January 31, 2013

Howto Setup PDF Printer on Linux

Installing a pdf-printer on Windows is crap, but in Linux/Ubuntu/Debian it is quite easy. $ sudo apt-get install cups-pdf Then restart your cups daemon $ sudo service cups restart And you are ready to print to pdf files.

January 30, 2013

RIP Aaron Swartz

It is sad to hear that Aaron decided to end his own life. He was a great inspiration.

January 14, 2013

Howto create a real multi-resolution favicon

Most favicons are created in a single resolution only, which by default is 16x16 pixels. This is often fine, but low resolution 16x16 favicons look pixelated when seen in some browsers and when used for bookmarking and application icons in e.g. IOS. Some browsers expects favicons in different sizes e.g. 16x16, 32x32, 48x48, 64x64, and 128x128. Most browsers can deal with favicons. GIF, JPG, PNG formats, and Microsoft Icon format (....

January 13, 2013

Fast Static Sites with Ruby on Heroku/Cedar

Recently I needed a simple and fast way for serving a basic static website. I ended up with a simple Ruby and Rack/Thin-based application, suitable for deploying to Heroku. Which means more or less no maintenance and it supports SSL - which is good in this case. For even simpler free HTML cloud hosting check out GitHub Pages. For SSL support Rack::SslEnforcer is used. {% gist 4181366 %} Run it locally $ rackup

December 1, 2012

Pretty Printing XML with xmllint

Yesterday I was doing some tests towards Visa 3-D Secure test directory url, which responds in XML format. curl -s -X POST -d @vereq.xml –cert visa.crt –key visa.key https://dropit.3dsecure.net:8443/PIT/DS The raw response looked like this: 1.0.2YA0fTY+pKUTs3A4AjhdYQ+g==https://dropit.3dsecure.net:9443/PIT/ACSThreeDSecureI used xmllint to pretty print the raw response: xmllint -format veres.xml –output - and the pretty printed looked like this: 1....

November 20, 2012

Install R on Ubuntu

The statistical analysis and data mining package R is given its single letter name quite difficult to find help for in Google. What is R R is an open source programming language and software environment for statistical computing and graphics. The R language is widely used among statisticians for developing statistical software and data analysis. How to Install R sudo apt-get install r-base How to use R You can start R simply typing R (case sensitive) on your command line x2q@x2q:~$ R...

October 28, 2012

Mac OS X Drivers for the HP Color LaserJet 1600

Currently there is no a official driver available for the HP Color LaserJet 1600, however there is a simple work-around. First download and install the HP Printer Drivers v.2.12 for OS X - from Apple Support. Next install the HP Color LaserJet 1600 using the “HP Color LaserJet 2600” from the dropdown list in the config section as the driver for the HP Color LaserJet 1600. Confirmed to work for OS X Mountain Lion, OS X Lion and Mac OS X v10....

October 23, 2012

Howto: Install a Brother MFC-9970CDW on Ubuntu

I got a Brother MFC-9970CDW printer, a multifunction device with wired/wireless network. For unknown reasons the driver are not available in Ubuntu and as as user you are not able to find them using the printer configuration search tool. Thereby you need to download the drivers yourself. Download Drivers Go to Brother Linux Driver Downloads and download the LPR driver and the cupswrapper driver. Install the Drivers sudo mkdir /var/spool/lpd sudo dpkg -i mfc9970cdwlpr-1....

October 22, 2012

Howto: Install Adobe Air on Ubuntu

For some reason Adobe only supported Linux until Adobe AIR 2.6. Download Adobe Air Download Latest Version Air 2.6.0 For Linux http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRInstaller.bin (16,1 MB) wget http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRInstaller.bin Install ia32-libs The ia32-libs 32bit crap is needed if you want to run this in 64-bit Ubuntu. sudo apt-get install ia32-libs Install Adobe Air chmod +x AdobeAIRInstaller.bin sudo ./AdobeAIRInstaller.bin You might get an error saying: “Sorry, an error has occured. Adobe AIR could not be installed....

October 22, 2012