Forward All Email from Gmail (even SPAM)

Problem

By default, Gmail does not forward email it considers spam even if it’s configured to forward all email to a designated address.

Solution

You can make Gmail forward ALL emails by following these simple steps:

  1. Go to settings:

  1. Go to Filters and ‘Create a new Filter’

  1. Set Size less than 500 MB and ‘Create Filter with this search’

  1. Then select ‘Never mark as spam’ and [Create Filter]

Note: This will assure that messages marked as SPAM are forwarded. However, it will also result in all messages you sent being copied into your INBOX automatically. To prevent this, add a second filter:

5. Create a new filter

6. In the ‘From’ field put Your Email address¬†and click ‘create filter with this search’.

7. Tick the option ‘Skip the Inbox (Archive it) and click [Create filter]

All done; all your emails should be forwarded from now on.

Remove Hard Disk in Linux in 3 Easy Steps

This guide describes how you can unlink a hard disk from Linux/Unix. This might be useful for instance if you replaced a disk image in Virtual Box or another VM.

WARNING: Do a backup of your virtual machine first or, if you are running on a physical computer, make sure you know what you are doing!

1. Assure the Hard Disk is not mounted

Edit /etc/fstab and assure there is no mount point for any partition of the hard drive.

IMPORTANT: Make sure that as many hard drives are identified by their UUID as possible since Hard Disk ids might change. See here.

2. Delete the Partition

Use fdisk as described here.

fdisk [your disk id eg /dev/sdb]

Note: You can find out the disk id by running fdisk -l (and use sudo if there is no output)

In fdisk running, input:

d

then input (assuming there is only one partition, otherwise give the number of a valid partition and repeat for all paritions):

w

3. Restart Machine

Shut down Linux

Disconnect your hard drive.

Restart Linux.

Your hard disk should be gone and no error should occur when you are staring.

Notes

When you are getting a message upon booting the machine that ‘The superblock could not be read or does not describe a correct ext2 filesystem.’ You are doing something wrong. Just reattach the hard disk in that case and Linux should start again. Make sure your other (not removed disks are identified by UUID as noted above).

 

 

 

Xtend Error: Cannot find class Consumer

Problem

When deploying you Xtend application to a different environment than your development environment you might encounter an error such as:

[ERROR] symbol: class Consumer
[…]
[ERROR] cannot find symbol

Solution

This error is caused by Xtend trying to use Java 8 features. It does so when your development machine runs Java 8.

For eclipse, you can fix this by using a Java 7 JDK under Window / Preferences / Java / Installed JREs. Then ‘Clean’ your project and all references to the Consumer class should be obliterated.

For Maven, you can find more information on this page.

Windows Explorer New: Add File Types and Templates

Right clicking within a folder of the Windows Explorer allows access to a convenient way to create new files through the context menu:

This post discusses a number of ways how this context menu can be changed.

Edit Menu With Handy Tool

ShellNewHandler is a useful tool to ‘clean up’ the ‘New’ context menu. Just download and run the application and deselect the options you do not need:

Edit Menu Through Windows Registry

Search for ‘regedit’ in the windows search and open the Registration Editor. The relevant entries for the ‘New’ context menu can be found under ‘HKEY_CLASSES_ROOT’.

Specifically, the relevant information should be under the key ‘.[filetype]/ShellNew’.

Set various values within this key to control the behaviour of the New context menu.

  • Adding a value with the name ‘NullFile‘ (and no value) will create a new empty file for the extension if it’s selected from the new context menu.
  • Adding a value ‘FileName‘ with a value of a path to a file will use the pointed to file as a template for creating new files.

References

Add file types and templates (Windows XP)

Reference for Registry Entries (Windows 95)

ShellNewHandler: Useful open source tool to remove entries from the ‘New’ context menu