Wireless setup on Debian (Fujitsu Lifebook S7110)

The S7110 uses the IntelĀ® PRO/Wireless 3945ABG Network Connection adapter iwl3945. Use lspci to find out what type of network card you have: # lspci -nn | grep Intel 05:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 3945ABG Network Connection [8086:4222] (rev 02) You’ll need at least the 2.6.24 kernel, available on Lenny onwards. If you’re using Etch (or even Sarge), tough luck. Significant upgrades to follow. Find out what kernel is loaded:

Programmer questions

What is the output for the following 3 code snippets? // Snippet 1 $x = 3; if (4 < $x) { print "The quick brown fox jumps over the lazy dog."; } else { print "She sells seashells on the seashore."; } // Snippet 2 $x = 1; $x = ++$x * 2; print $x; // Snippet 3 $x = 1; $x = $x++ * 2; print $x;

Google Chrome (BETA) for Windows

Nice comic book published at http://www.google.com/googlebooks/chrome/; I promptly downloaded Chrome, of course, from http://www.google.com/chrome/. The UI is pretty sweet, and it feels faster than Firefox 3. Way to go! I hope a (Debian) Linux version comes out soon!

Useful MySQL commands

# Set the auto_increment value (e.g. `id`) to one more the highest `id` value currently alter table `foo` auto_increment=1; # Show how MySQL will parse this query, including key (indices) used and any additional parameters explain select * from `foo`; # Show indices for the given table show keys from `foo`;

Disk usage sorted by file size

The following shell command runs the du command to a max folder depth of 1, pipes its output to sort, and the finally writes it du_log; e.g., du -h --max-depth=1 | sort -n -r > du_log