GIT – How to merge specific files from another branch

Posted in category Programming, Unix/Linux, Web

Using GIT you can merge specific files from another branch using the ‘checkout’ command. After you checkout the files do a commit on the current branch.


$ git checkout anotherBranchName  path/to/file.etx    path/to/file2.ext     path/to/file3.ext

$git commit -m “Merged files from anotherBranchName”

Digital photographic mosaics using AndreaMosaic

Posted in category Graphics, Windows

Using Andrea Mosaic you can create interesting digital photography mosaics. A photo mosaic is an image composed of many tiled photos.

AndreaMosaic is free to download.

Visit the page at:

M-AUDIO Fast Track Ultra not recognized. Problem identified.

Posted in category Audio


A number of M-AUDIO Fast Track Ultra devices has a problem of not being recognized by the operating system or losing connectivity after system restart.
M-AUDIO has identified the problem, and it is a technical one which requires the device to go into repair.

If the 6th digital is the letter “F”, there is a chance your device may be affected by this malfunction. M-AUDIO tech support should be contacted.

Official statement:

*TIP: If your device is not recognized by the operating system, try quickly switching it on and off several times in a row.

Linux server – Change default timezone

Changing the timezone on a Ubuntu/Debian server can be done using the following command:

su dpkg-reconfigure tzdata

Use GMail to send emails through the Linux consolse

If you need to be able to send simple, one user account emails from a Linux server which has no mail server configured then this is for you.

Additionally you can use GMail to send messages from.

Install software:

# apt-get update

# apt-get install ssmtp

Edit configuration file:

#nano /etc/ssmtp/ssmtp.conf


# echo “email test” | mail -s “Email test” myemailaddress@domain.tld

VirtualBox – Disable Date and Time synchronization for a VirtualBox Guest system

The following command will disable the date/time synchronization for a Guest operating system.

Assuming the host is running Windows OS.

Open the command prompt. (Run -> cmd)

Enter command:
C:\Users\User>”c:\Program Files\Oracle\VirtualBox\VBoxManage.exe” setextradata ENTER_MACHINE_NAME_HERE “VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled” “1″

* Replace ENTER_MACHINE_NAME_HERE with Guest system name
* This command will add an extra line to the “C:\Users\User\VirtualBox VMs\MACHINE_NAME\MACHINE_NAME.vbox” file.
* To enable the sync again, edit the file above


If GuestAdditions have been installed, they will automatically sync the clock. Disable GuestAdditions.

# /etc/init.d/vboxadd-service stop

MySQL InnoDB table truncate fails because of foreign keys

Posted in category Database

If trying to truncate MySQL InnoDB tables and you are getting an error because of foreign keys constraints try disabling the foreign keys checks.

TRUNCATE tableName;
TRUNCATE tableName2;

MediaWiki – List all namespaces and their ID numbers

Posted in category Web

To list all available namespaces and their ID numbers in MediaWiki you have to query MediaWiki’s api.

Simpy open the following address in your browser:


*replacing http://www.mywebsite.tld/mediawiki_installation with the path to your MediaWiki page.

This will return a XML representation of Namespaces data.

Linux Ubuntu – User not in the sudoers file

Posted in category Unix/Linux

If your user is not in the sudoers file you won’t be able to do any root tasks.

To fix this:

1. Boot into the recovery mode and load the root console. (Hold left shift on boot to show the Grub loader)

2. To make the file system writable execute: mount -o remount,rw /

3. Add user to the group admin by executing: adduser username admin (additionally you can add the user in the sudoers file, command: visudo)

4. To finalize the changes execute: sync ; mount -o remount,ro / ; reboot -f

WordPress Custom post type and pagination problem – Error 404

Posted in category Wordpress

1.5hour of pure frustration.

After registering a custom post type, slug “news”, and creating a page “news” to display the latest posts the pagination just wouldn’t work. I was always getting a 404 error. Setting the permalinks to default and back to the old setting solved the problem.

$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$wp_query = new WP_Query("post_type=news&paged=$paged&posts_per_page=1");

if (have_posts()) :


WordPress 3.1 supports archive pages for custom post types. Add “has_archive” => true when creating the custom post type. No custom page required any more. Name the archive page: archive-customPostTypeName.php

Paging still has problems. Setting the default wordpress posts per page value lower or same as the custom wp_query(“posts_per_page”) value solves this somehow. Weird.