Setup an static IP on Arch Linux

Setup an static IP on Arch Linux can be done by placing a config file in /etc/netctl/:

As you can see, you have to install sudo first. Otherwise you have to switch to root user (su). In the file you have to place the following lines for example:

Now you only need to activate […]

Wifi setup on Arch Linux

The following steps are showing how I did setup my wireless connection with an static IP on my ArchLinux driven RaspberryPi. You need to have installed sudo to uses this instructions: Update all packages:

Install dialog package:

Install wpa_supplicant package

Run wifi-menu:

This will start the Wifi-Setup dialog. Select your network: Choose […]

Get stores last order increment ids

This can be done by the following database query:

To change or increment the increment ids of all stores, have a look at Increment order increment ids for all stores.

Increment order increment ids for all stores

The following query increments the last increment ids for all store by 100:

The actual values for each store can be queried as shown in Get stores last order increment ids.

Install CMS pages with your module

You can do this as shown in the following example of a Magento data setup script:


List processes after CPU usage

If you piped the result into the head command, you can limit the result to the n entries with the highest CPU usage.

In this example you will see the ten most CPU-consuming processes on the machine. The ‘–‘ before pcpu results in a descending order. Example output:

To see what happens […]

Install CMS blocks with your module

You can do this as shown in the following example:

For more examples have a look at the folder mage/app/code/core/Mage/Cms/data/cms_setup.

Silence crontab

Sometimes you don’t want to get any notifications from your cronjob, but somewhere in the code someone echos something and so you get an email each time. That could be very annoying. The following snipped will help you to immobilize the cron.

The important part is > /dev/null 2>&1. This throws every output into a […]