How to simulate a slow network connection on Mac OS-X

Mobile connections especially while moving in a car or train will always have a lot more latency and packet loss than a typical DSL or cable connection.

read more

share

Speed up your ssh connections with compression

By default compression is not enabled for outgoing ssh connections on OS-X.

Very simple compression is no problem for modern CPUs and even on a gigabit network it is faster to compress data first before sending it over the network instead of leaving it uncompressed. However compressing data that can’t be compressed anymore (like JPEG files) makes no sense. If your typical ssh traffic is not .jpeg or .zip files then read on.

read more

share

Import VMware Fusion to Virtual Box on Mac OS-X Yosemite

UPDATE 10/27/2014: This post applies to OS X Mavericks and Mountain Lion as well but has been corrected to address the most recent version.

I really like VMware and i love my Mac but being forced to update a software that works perfectly is something i don’t like at all. So after installing OS X Yosemite there is this dreaded situation again. Pay for an upgrade to VMware Fusion just because VMware refuses to patch their next recent version.

So i decided to move to Virtual Box which is free on OS-X. Here’s how to import / convert your old VMware image to Virtual Box within few minutes.

read more

share

SOLVED: Program can't be opened because it is from an unidentified developer

OS-X Mountain Lion introduced a feature to prevent the automatic execution of third party software not downloaded from the Apple App-Store.

read more

share

Coldfusion CFHTTP UTF-8 Problem with Non-ASCII characters when receiving application/json responses

It cost me quite some time to figure this out.

Consider this scenario: You are using CFHTTP to request some JSON data from an external API. The data is sent UTF-8 encoded and everything is fine as long as the API uses Content-Type: text/html. Now if the Content-Type changes to application/json everything will break and the characters get messed up. Now what if you can’t tell the external API to use text/html as Content-Type? Besides application/json is perfectly fine and UTF-8 by design.

read more

share

Client-Side File Upload to Amazon S3 with NodeJS backend

This article describes the upload of a file to Amazon S3 purely on the client. This means the server (NodeJS) in this case never gets to see / has to handle the actual file the user is uploading.

To upload files from within NodeJS the npm (Npm) module Knox can be used.

Node.js 0.4.9 or higher is required as a runtime environment for our example.

read more

share

Install wkhtmltopdf static binary on Ubuntu Server

Running wkhtmltopdf and wkhtmltoimage to create PDF files from HTML files on a Mac is easy and simple. When you need to install it on a non-mac production server a little bit of work is involved.

read more

share

How to convert a Coldfusion SQL query to a Javascript object

Working with SQL databases is easy and straightforward in Coldfusion.

Looping and creating HTML output from queries is easy too.

read more

share

Amazon CloudFront Invalidation with Coldfusion

Amazon’s CloudFront is great to reduce load on local servers if you are serving a lot of static files or files that can have a long cache timer set.

Sometimes you need to remove files from the CloudFront caches and this is where the Invalidation feature comes in.

An invalidation batch-request invalidates one or more files (paths) from all CloudFront edge location.

read more

share

Using the Bcrypt hash algorithm in MS-SQL Server

Storing the passwords in plain text within a database is not a good idea. Many people use the same password for their email, online-banking or social network accounts and probably your app. So the passwords should be safe if your database gets into the wrong hands.

So how do you safely store a password?

read more

share