Posts – Page 2

Testing print stylesheets using Google Chrome

Testing CSS print media queries is really difficult but a new featured was introduced in Google Chrome in December that allows you to apply different CSS media types like handheld, print, screen and so on.

  1. Open Developer Tools in Google Chrome by clicking the menu icon at the top-right of …

Programing the STK600 AVR board on Linux using C

Setting up the developing enviroment

Note: I’m assuming you have a .deb based distribution and a AVR STK600 board with a ATmega2560 microcontroller that you are programming using an USB cable.

Installing the software

We need to install the following programs and their dependencies:

  • gcc-avr: The GNU C compiler …

Usefull linux commands/tricks

These are some sort of notes to myself, this list will be constantly updated.

Sort directories by size (human readable size):

# du --max-depth=1 -h |sort -hr

Set tabsize to 4 in vim:

:set tabstop=4

Show failed login attempts on your machine:

# lastb -F

Print the …

How to fix GC overhead limit exceeded in Eclipse

If you’re performing memory intensive operations such as building workspace on big projects, Eclipse will throw this error when it runs out of memory:

An internal error occurred during: “Building workspace”. GC overhead limit exceeded

In order to fix it, you need to increase the memory allocation for Eclipse …

Backup and restore installed packages on Debian/Ubuntu

If you want to reinstall a server or a desktop and want to install the same packages after reinstalling the operating system you can easily do that with dpkg.

First we need to backup the list of packages to a file and after reinstalling the operating system, in this example …

Lock screen when closing laptop lid in Ubuntu 11.10

An useful thing to do is to have lock the screen when you close the laptop lid so you don’t have to wait for the timeout but in Ubuntu 11.10 this feature was disabled.

Note: This bug has been fixed in Ubuntu 12.04 Precise Pangolin.

To have …

Password protecting folders with nginx

If you need to password protect a folder using nginx here’s how. In this example we’re gonna password protect the /admin folder, trying to access the admin directory will prompt the user with a basic authentication dialog, and will be challenged against the created password file.

Edit your …

Installing and adding an external Tomcat server in Netbeans

Netbeans no longer comes with Tomcat bundled so if you want to deploy your application to an Tomcat server you need to manually register an external server.

Note: This article is old no longer and this is not true anymore, Tomcat is now bundled with Netbeans so the steps in …

Wordpress reset password without email

If you’re like me and you forgot your wordpress password and don’t have email setup on your system there are alternative ways to set a new password rather then sending and email.

Pick a particular method depending on what type of access you have to your website/hosting …

Hello world!

After much slacking around and ignoring this blog I decided to give it another spin and bring it back to life.

It will be mostly technical articles about Linux, system administration and network administration.

root@crappy:/# echo 'Hello, World!'
Hello, World!