Category: Scripting

Setting up an Active Directory domain controller with Samba 4 on a Raspberry Pi 3

The Raspberry Pi is a wonderful platform to simplify your daily IT jobs, such as serving as a media centre for your smart-TV, being the central hub for your home automation system or in the case at hand act as an Active Directory (AD) domain controller in a test lab. Obviously, we are talking about […]

Setting up MongoDB on Debian Wheezy 64Bit

Here are the steps required for setting up MongoDB on Debian Wheezy. This is the manual guide since the official MongoDB packages provided by Debian are a little dusty. Don’t worry, the setup process is pretty straight forward. Let’s get started! Import public key for package management tool apk First you need to import the […]

Install PHP intl extension using Homebrew on XAMPP

Recently, when trying to install the PHP intl extension for a Symfony2 based web project using Homebrew to following error message kept showing up: /usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory /usr/local/bin/brew: line 23: /usr/local/Library/brew.rb: Undefined error: 0 This post steps explains what is needed to install PHP intl extension using Homebrew on […]

Enabling Cross-Origin Resource Sharing CORS for PHP

This post is an addition to Enabling Cross-Origin Resource Sharing CORS for Apache to show you how to enable Cross-Origin Resource Sharing CORS for PHP. Thus, in case you don’t have access to the .htaccess you can simply enable CORS for PHP using the following steps. Setting required headers using PHP As explained in Enabling […]

Resize root Partition on Raspbian to use free space

Raspbian comes pre-configured to run on smaller SD cards. Thus, the default partition sizes are generally configured to not exceed 4GB. In case you want to use SD cards larger than 4GB (e.g. 32GB) you will definitely want to use the free unallocated space, right? Luckily, this can be achieved rather easily. The default Raspbian […]

Fixing ownCloud 6.0.3 upgrade problem on Asustor Data Master (ADM)

Unfortunately, trying to upgrade ownCloud on an Asustor AS-602T to version 6.0.3 running Asustor Data Master (ADM) 2.1.1.R3B2 resulted in a corrupted installation. Even removing and re-installing ownCloud via the App Central didn’t solve this issue. So, in order to solve this issue and remove your corrupted ownCloud installation from your system first remove it […]

Custom build script for GIT based projects

When managing smaller GIT based projects I find it helpful to opt for custom build scripts rather than having to deal with the overhead of setting up proper Jenkins (or-likewise) runtime environments. In order to deal with this need I’ve created a simple build script that creates a compressed TAR file based on committed files. […]

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 window and re-opening it the […]

Installing OAuth PECL extension for XAMPP beta on Mac

Recently I ran into problems when installing OAuth PECL extension for XAMPP beta on Mac OS-X. Running pecl from the command line gave the following error: Luckily, the solution to this problem is pretty simple. First, delete pear.conf by making a backup in your XAMPP setup: This way PECL will create a new and correct […]

Using multiple SSH Keypairs for Git

When using multiple (GIT) services and repositories from different provider you are very likely to also use different sets of SSH keypairs. At first managing multiple keypairs might sound a little complicated but it is in fact quite easy. Let’s say you have three keypairs for three different GIT services: GitHub PHP Cloud your local […]

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 day of each month? A […]

Cygwin CMake Error cygmpfr-4.dll missing

In case you run into the following error message when trying to run cmake in cygwin bash be sure the setup libmpfr4 via setup.exe: /usr/lib/gcc/i686-pc-cygwin/4.5.3/cc1.exe: error while loading shared libraries: cygmpfr-4.dll: cannot open shared object file: No such file or directory As always, make sure to restart your Cygwin bash afterwards.

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 customer table respectively customer. Furthermore, […]

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 via setup.exe, as mentioned here: […]

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 to Comparitech for the heads-up on […]