Category: Quickies

Source Code Icon 0

Avoid Duplicate Content by enforcing trailing slash in URLs

Most of today’s popular Content Management Systems (CMS) support the option to use Search Engine Friendly URLs (SEF URLs). This option is either provided by using permalink structures or simply by deploying dynamic URL rewrites based on pre-defined URL schemas (which the aforementioned permalink structures basically are anyway). Let’s take WordPress...

Git Logo 0

Enable command and branch name autocompletion for GIT

When working in GIT based software projects that have a broad range of GIT branches the need for autocompletion of these branch names and GIT commands in general in the shell is one of the first tasks you want to setup for your developers (and yourself ;). After all it’s all about...

0

Good Bye HTML5 – Welcome HTML5.1!

As you might have already heard the W3C has finally officially published a recommendation for the (15 years old) HTML5 standard. In fact, HTML 5.0 has (co-)existed for quite some time now. Numerous frameworks implemented HTML5 features long before the official recommendation (as usual). And be honest, who hasn’t used...

Source Code Icon 0

Remove Passphrase from SSL Keys

When it comes to generating SSL keys passphrases play an immanent role. They need to be specified when creating SSL keys and are checked each time the key is being used to ensure authorized access. For instance, when starting your Apache web server with a SSL certificate you will need...

Unable to remove read-only attribute for folder on Windows 0

Unable to remove read-only attribute for folder on Windows

Recently I ran into a little problem when trying to remove the read-only flag from a folder to be used as data store for a web application. Trying to remove the read-only attribute via the folder settings did not do the trick, as after unchecking the box, closing the settings...

Determine last day of month using Bash script 1

Determine last day of month using Bash script

Oftentimes software systems need to carry out tasks on a regular basis at a given time, such as archiving log files or sending out newsletters. Normally cron is able to handle all kinds of time-based setups (daily, monthly, etc.) but what if you want to execute tasks on the last...

How to access loop counters in Smarty 0

How to access loop counters in Smarty

Sometimes Smarty’s syntax is not quite self-explanatory. Recently I was asked how loop counters can be implemented for foreach-loops. According to the API docs there’s an @iteration directive for this case, such that the following should work: Unfortunately, the value remained 0 regardless of the current loop iteration. Another (working)...

Problem activating Wireless USB adapter (WN727N) under Windows 7 64bit 3

Problem activating Wireless USB adapter (WN727N) under Windows 7 64bit

Recently I ran into the problem of setting up a Wireless USB adapter (TP-Link WN727N V3) under Windows 7 x64. Although the driver installation went smoothly it failed to activate. Running the built-in diagnostics tool revealed that the driver (netr28ux.sys) failed to bind the IP stack. Luckily I remembered that...

Updating Tables across multiple Databases 0

Updating Tables across multiple Databases

Recently I was asked if it is possible to update tables with data from other databases. Of course it is 🙂 Imagine the case where you want to update your customer table with data from a backup database. Let’s call the current database currentDB and the backup backupDB and the...

Source Code Icon 2

Selecting nth sibling using XPath

XPath (XML Path Language) can be used to parse highly complex XML structures without the need to iterate over each node independently. A likely use case is to select the nth sibling or nth element from a list. Luckily, this can be easily achieved by using position(). To demonstrate the...

Cygwin Logo 0

Space instead of Backspace in Cygwin Bash Problem

Recently I’ve experienced a weird behavior in a Cygwin installation on Windows 7. When pressing the backspace key Cygwin falsly interpreted it as a space. Luckily, the problem is rather easy to fix. The easiest way (which did not work everytime while testing) is to simply reinstall terminfo and termcap...

Auto Mount TrueCrypt Drives on Windows Boot 0

Auto Mount TrueCrypt Drives on Windows Boot

Update: Please do not use TrueCrypt anymore. Development of TrueCrypt was discontinued a while ago due to numerous security flaws detected in the core part. In fact, TrueCrypt is not secure and you should switch as soon as possible. Luckily, there are a couple of viable alternative solutions available. Thanks...

Cygwin Logo 0

Converting POSIX Paths in Cygwin to Windows Format

Unfortunately, Windows programs do not understand POSIX pathnames, such as the ones produced by Cygwin, e.g. “/cygdrive/c/some_folder”. Consequently you will run into problems when trying to call Windows applications from within Cygwin, or even when supplying POSIX pathnames to these programs as parameter. Fortunately, there is an easy way to...

Error loading Python DLL: python27.dll (error code 193) 2

Error loading Python DLL: python27.dll (error code 193)

Recently I needed to run a Python based application on Windows 7 x64 with Python 2.7.3 64-bit already installed. Unfortunately, the target application did not start, instead the following error was displayed: One might now think that python27.dll simply could not be found by the target application. But the error...

Solving error “interactive login denied” in Microsoft Virtual PC running in Windows XP Mode 4

Solving error “interactive login denied” in Microsoft Virtual PC running in Windows XP Mode

If you receive the error “The local security policy does not allow you to log in interactively” when trying to login to a virtual machine instance in Microsoft Virtual PC running in Windows XP mode you simply need to add the target user to the remote desktop user group on...