Just a quick helper on how to format a MomentJS duration correctly as hours and minutes.| TCS Blog
Today we found two of our ECS instances in a cluster had unusually high CPU loads. A quick look revealed dmeventd was responsible for that. Turns out old containers and images are not getting cleaned up by ECS. We got back to normal levels by removing old containers and images from the instance:| TCS Blog
To quickly serve a robots.txt from Nginx without actually having access to the physical file you can define the content of the robots.txt file in the Nginx .conf file.| TCS Blog
Since Amazon started offering EBS instances the classic instance-store images have gotten little love. But when you want to spawn lots and lots of instances a simple instance-store AMI is more flexible and cheaper. The following steps let you create an instance-store AMI from a running Ubuntu 14.04 LTS instance.| TCS Blog
Storing tree structures in a database is simple. Add a column for the parentid and everything makes sense.| TCS Blog
Google Chrome on Mac OS X does not use the printer defaults set in the system. To set the defaults for the Chrome print interface, for example to set the default color mode to black and white / grayscale, follow these steps:| TCS Blog
Need to list all table sizes and their row count of a single database in MS-SQL Server? This neat script works on MS-SQL 2008 - please comment if it works on other versions.| TCS Blog
Our Linux machines use a S3 bucket to backup some files every night. The machines only need write access (PutObject) to a single bucket on S3.| TCS Blog
Getting rid of a cache.manifest file in chrome is a bit tricky. It can’t be flushed by just clearing the cache.| TCS Blog
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.| TCS Blog
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.| TCS Blog
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 ...| TCS Blog
OS-X Mountain Lion introduced a feature to prevent the automatic execution of third party software not downloaded from the Apple App-Store.| TCS Blog
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.| TCS Blog
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.| TCS Blog
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.| TCS Blog
Working with SQL databases is easy and straightforward in Coldfusion. Looping and creating HTML output from queries is easy too.| TCS Blog
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.| TCS Blog
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?| TCS Blog
Coldfusion 9.0.1 is essentially disqualified to be used with NoSQL datastores where JSON is involved. We have used Coldfusion since 3.0 in 1998 upgrading to 4.0, 5.0, 6.1, 7.0, 8.0 and 9.0. We did this upgrade for our servers and for even more of our customers servers that use our software.| TCS Blog
The standard history.back() does not work in Chrome and probably Safari and other Webkit browsers. It took me a while to figure this out.| TCS Blog
After reading this nice post about a stored procedure to create random numbers i figured i needed a function for more flexibility. Here’s how to create a user defined function to generate some random characters with a length of up to 100 characters.| TCS Blog
We are using CSS files with embedded images on some sites. Have a look at Nicholas C. Zakas excellent cssembed utility. The good thing: Just after loading the CSS most of the images needed to display the site are at the client. No longer does a new visitor request dozens of small 1KB PNG files for backgrounds, bullets and tiny icons. It’s all right there in the CSS. This really pays of when you target mobile users where latency and slow connections let page rendering times go thru the roof ...| TCS Blog
Based on this post and that post i created a simple string prototype to evaluate emails via one Javascript RegEx in Javascript.| TCS Blog
If you use Coldfusion to create Javascript endpoints - e.g. for Ajax Requests, then everything might work just fine at first sight. Later some users might report that in Internet Explorer (6.0, 7.0 and 8.0) content that you refresh via Ajax requests might not get updated.| TCS Blog
Amazon S3 is awesome for scalable hosting especially for images, videos and other assets. If you still want to show your visitors your own domain instead of the s3.amazonaws.com domain for your assets then you can setup a CNAME record for your domain pointing to the S3 bucket.| TCS Blog
So we used Google Analytics on many of our projects - but no longer do. Still most of our visitors have those lifetime cookies __utma and __utmz set and send those to our servers with every request.| TCS Blog
Just a quick note - as I keep forgeting this. With its standard setting Internet Explorer will fetch the same URL from its cache if called a second time within the same browser session. That is if the URL had no special Headers set.| TCS Blog
After installing a brand new Ubuntu 64bit on VMWare i got the message: ACPI: I/O resource piix4_smbus [0x1040-0x1047] conflicts with ACPI region SMB_ [0x1040-0x104b] Resolved this by adding blacklist i2c_piix4 at the end of /etc/modprobe.d/blacklist.conf| TCS Blog
Amazon S3 is a great way to store files that need to be exposed on the web. Every uploaded file can be accessible to the public or accessible to authorized users only via a clever system of expiring signatures. Joe Danziger wrote an excellent CFC to do all kinds of operations via the S3 REST interface. The only missing part is the new way Amazon is offering to upload files without the need to first buffer them on your own server.| TCS Blog
In Apache i used something like: Redirect permanent /images/ http://www.s3-imageserver.com/myimages/ to redirect a certain direcotory to another server. In Nginx there is no redirect, so we gotta use something like: location/images { rewrite/images/http://www.s3-imageserver.com/myimages/permanent; }| TCS Blog
UPDATE 12/29/2012: Please check the “How to convert a SQL query to a JS object” post for a much better way to handle SQL queries that need to be converted to Javascript objects.| TCS Blog
While pumping lots of records / docs / bulk inserts to the new CouchDB Server I got a mysterious connection timeout that appeared always after about 4000+ inserted records.| TCS Blog
While playing around with CouchDB, ColdFusion and SerializeJSON i found that the SerializeJSON does not honor the SetLocale setting. It will use the “Java Default Locale” which is set for the JRE.| TCS Blog
The usual setup is ColdFusion on either Windows with IIS or on Linux with Apache. Both webservers are great webservers unless you get excessive load on them. At that time you wish that you had one server to do all the static files and one or more servers to do the ColdFusion requests.| TCS Blog
Coldfusion 9 offers a nice new feature: the server.cfc. The server.cfc can be enabled in all CF editions to be called once the server starts. Much like a bootscript or the good’ol autoexec.bat from MS-DOS.| TCS Blog
Just found out after 2 hours of debugging that Coldfusion / Jrun does never refresh its DNS cache. I was trying to aggregate several RSS feeds and one feed, even though I knew it was there, was constantly throwing errors that I could not explain. Obviously that site, which was in the DNS query cache of the JVM, was moved to a new location and Coldfusion still tried to get it from the old IP. Turns out Java is setup by default to cache the DNS results forever. In your Coldfusion directory go t...| blog.tcs.de
Prevent OS X from creating .DS_Store files on network drives / shares| blog.tcs.de