What to do if you get a bash: /usr/bin/rm: Argument list too long error.

If you have directories which you contain millions of files you might get in trouble when you want to apply an operation on a bunch of files. For example rm *.jpg will not work in that case due to memory limits.

An easy way is you to use find for the job you want to do:

If you want to move all files in a directory which have the extension jpg.gif to gif only  you can use the following command:

> find -name “*.gif.jpg”  -exec mv ‘{}’ jpg \;

Another useful application is to easily remove all files with the extension .jpg

This can be done with the following command:

> find -name “*.json”  -exec rm ‘{}’ \;

In principle you can apply find to any other job you want to perform.

Howto add a Login with Facbook/Google Plus Botton to a Website

Many sites offer Login with Facebook or Google+ features in order to make it easier for new users to connect to members-only features: To get this for your project too you just have to follow some simple steps

Howto get the Facebook Login:

Go to https://developers.facebook.com/apps and create a new application by clicking “Create New App”. Fill out any required fields such as the application name and description. Put your website domain in the Site Url field. Once you have registered, copy and past the created application credentials (App ID and Secret) into the HybridAuth config file.

Howto get the Google+ Login:

Go to https://code.google.com/apis/console/ and create a new project. Go to API Access under API Project. After that click on Create an OAuth 2.0 client ID to create a new application. A pop-up named “Create Client ID” will appear, fill out any required fields such as the application name and description. Click on Next. On the popup set Application type to Web application and switch to advanced settings by clicking on (more options). Provide this URL as the Callback URL for your application: http://mywebsite.com/path_to_hybridauth/?hauth.done=Google Once you have registered, copy and past the created application credentials (Client ID and Secret) into the HybridAuth config file.

Mysql: Allow Access from an IP Address

In order to enable access from a remote client to a mysql server just perform the following steps:

$ mysql -u root -p
Enter password:

mysql> use mysql

mysql> GRANT ALL ON *.* to root@’′ IDENTIFIED BY ‘root-pw’;


use ” ‘ ” in all four cases above.

Afterwards the remote client should be allowed to communicate the MySQL server you updated the privileges. This receipt usually solves the ERROR:

“Host is not allowed to connect to this MySQL server”

Tipps and Tricks creating a SSL Certificate

In order to create a SSL Certificate one needs a CSR request for the server first. Under Linux it is very easy to create such an request:

openssl req -new -newkey rsa:2048 -nodes -keyout domain.key -out domain.csr

will do the job. Afterwards you have a csr file and a private key in the directory where you executed the command.

If your private key is protected by a password you can remove the password by:

> openssl rsa -in old.key -out new.key

During this process it is necessary to give the password once. The new key will not be protected by a password any more.

BOINC: How to Turn your Laptop into a Research Lab

The Berkeley Open Infrastructure for Network Computing, known for short as the BOINC project, is an open source system that focuses on volunteer and grid computing. It was originally created to support the SETI@home project, but has become a useful platform for many other projects as well.

How it works is that people from around the world will volunteer their computers to provide processing power to these projects in order to help them continue running. These projects are quite expansive, and any donation of a computer’s processor will help the project to function better. Many of these projects are based in the sciences, such as mathematics, climatology, astrophysics and environmental science. They require the collection of a lot of data and need a lot of processing power in order to make sense of this collected data.

It was developed by a team based at the Space Sciences Laboratory at the University of Berkeley when they started the SETI@home project. Since its creation, the BOINC project has amassed over one million active computers all over the world, with over 400, 00 active participants. This is because the BOINC projects are all based on open source software, so just about anyone can contribute the processing power of their computer just by downloading a program for the project of their choice. This allows users with Windows, Mac OS, Android, Linux and FreeBSD operating systems to participate.

What makes the BOINC projects even more enticing is that volunteers can earn credits for the number of work units they’ve contributed to the project of their choice. People can work separately as individuals, or they can pool together as groups in order to earn more credits. The ranking of these credits is maintained, providing a means of friendly competition between users all over the world to try and beat each other in credit numbers. Some users have even invested more of their own money to purchase more processors, just to increase their credits.

One of the pioneering BOINC projects is SETI@home, which stands for Search for Extraterrestrial Intelligence. This is a scientific experiment that collects and analyses telescope data in order to find narrow-bandwidth radio signals from space. Since they don’t naturally occur in space, any detection of them would provide evidence of alien technology.

Another project is Asteroids@home, which seeks to discover the presence of as many asteroids in space as is possible for the computer to process, as well as analysing them, since very little is known about them. A third project is ClimatePrediction.net, where climate models are run on the computers of volunteers in order to answer the questions on how climate change affects the current state of the world, as well as in the future.

Make a Difference and Switch to Green Webhosting

The Internet itself is a very large place, and it can be quite difficult to determine just how much power is being used to keep it going. With the state of green house gas emissions as they are, it’s about time someone started taking the initiative combining the Internet with greener sources of energy.

According to The New York Times, there are at least 30 billion watts of electricity that are used, just to power the Internet. That’s a lot of fossil fuels that are being used. One would think that with the forward thinking of those who use the Internet, there would be more sources of green energy available. Sadly, that doesn’t seem to be the case. In fact, the energy consumption is actually increasing, with more and more people gaining access to the Internet from their homes as well as taking it with them on the go on their smartphones and mobile devices. This is a steadily growing problem that needs to be taken care of.

The earth photographed from the cassini space craft. Such a fragile jewel in the big void of the universe. Take care of it. (Foto: NASA)
Climate change is a serious concern that has been slowly altering the normal temperatures of the planet throughout the year. The greenhouse effect is making summers a lot hotter and winters a lot colder, which further increases the use of fossil fuels. Consumers are likely to turn the settings of their HVAC systems up even higher, which uses even more energy. Coupled with the increased use of the Internet during these times when people want to stay inside, it ends up being a circular problem with no end in sight.

That’s why we need to start reducing the energy consumption of the Internet by seeking alternative sources. There are several web hosting service providers who have started to use sources of green energy for just this reason. They are capable of still providing the same quality service while still saving the environment in the process. If you want to see changes being made, consider switching to and supporting green hosting in any way you can. It could soon become the standard by which we use the Internet and save the environment even further.

Web hosting services offering green hosting:

Some of the web hosting services out there that use green energy include Ecological Hosting, Green Geeks, and Hetzner. Ecological Hosting has been in the business of web hosting since 1999, and have made it their mission to provide services that interfere with the environment as little as possible. They rely on solar energy and other renewable resources in the services that they provide to the world. Green Geeks has been in the business for over forty years and has always made it their goal to have a positive energy footprint on the environment, through the use of wind power. Hetzner Online has provided many web hosting services through their choice of green energy, allowing more users to feel better about not harming the environment further.

CSS: How to create a three column layout without tables

In modern web design the use of tables got a bit outdated recently since they render slow and therefore do not contribute to a positive user experience. To everybody who is used to design his web projects with tables this might be annoying. However, CSS shows an easy way out here. You simply can mimic the behaviour of a table using division elements which contain each other in combination with CSS style sheets. The following example illustrates how this works. We want to reach the following requirements.

  • The page shall be divided in three colums
  • The central colum will have a fixed width
  • The remaining columns adapt their width dynamically

This layout can be very usefull if you want to see your content centred on the screen while the remaining white space is used for ads. The following code sample does exactly what has been required above:

[sourcecode language=”html”]
<style type="text/css">
.container {
float: left;
width: 100%;

width: calc(50% – 490px);

width: 980px;

width: calc(50% – 490px);
<div class="container">
<div class="columnLeft">
<div class="columnCenter">
Central Column
<div class="columnRight">
Right Column

To calculate the width in CSS dynamically the calc() function is used. It allows also to subtract a width in pixels from a width in percent. In case you want to have a empty column you should add a space like in the example, otherwise it will not render properly in some web browsers.

Help, My Server Reboots Randomly! What Could Be the Causes?

There are times when misfortune strikes when you least expect it. Server reboots can make your life a living hell. At first you might panic a bit as you try to find out what causes the server to reboot on its own. It is hard to keep calm when your system has become unstable. There are many reasons why a server reboots randomly. When it happens to your server, check out the tips below and find out the real cause of the reboots.

Check Wattage of Power Supply

One of the reasons why servers become unstable is the lack of juice that flows in the system. The power supply is one of the most important components in the server because it delivers the needed power for the other parts of the system to work. A defective or inadequate PSU can cause random reboots or hangs. Common issues with a power supply include stopping to work; output is not the specified wattage, or overheating. There are also times when the output is less than the total energy consumption of the components.


Picture of a Google Data Center (Foto: Google)

Look at the Bios Settings

There are times when problems with the BIOS can cause random reboots. That’s why it is vital that you check the BIOS setting to rule out the BIOS as the root of your server’s problems. There are instances when an empty BIOS battery has made a system instable. You can also program the boots and shutdowns of the server through the BIOS settings. Sometimes a problem with the server can be solved by updating the BIOS.

Monitor Temperature of the Server

Another issue that you should consider when your server reboots randomly is overheating. When your system overheats, the server will crash or reboot on its own. You should monitor the temperature of your system and find out whether it is overheating or not.

Check Power Connections

There are times when the connection of the server to the electricity supply is the problem. Make sure that it is plugged in properly into the outlet. You should also check if the mains lead is plugged completely into the back of the system. If the server is plugged into a UPS, make sure that the UPS is not the problem. Try to plug the system directly into an outlet and see if the reboots still occur.

Check Transistors of the Motherboard

Random reboots can be caused by bad hardware. Check whether all the transistors of the motherboard are okay or if they are burnt. If you find burnt transistors, you can either replace them or replace the motherboard as a whole.

Check the RAM

The server might be rebooting because it lacks RAM. You might not have noticed, but one of your RAMs might not be functioning anymore. Test your RAMs to find out if they are still in good working condition.

If you have gone through all the above and still experience random reboots, then the last resort is to remove all the components and connections, and rebuild the server. This is to ensure that the cause of the reboots is not loose connections.