scp, finally

scp examples with Darth Vader. yarr, I see less sftp in my future.

PDO

wtf is PDO? -- a PHP extension that gives you a class with a standard set of methods for working with data in databases. Why? You can use that standard set of methods. And apparently PDO MySQL operations are faster than native PHP MySQL operations, at least in some cases. The catch? Comes with PHP 5.1. You might have to compile PHP with the pdo_mysql driver (exhibit a, exhibit b).

Eclipse install notes

Today I installed Eclipse. Like my ubuntu-eee install notes, the following is not a how-to. I'm documenting my experiences so that knowlegeable users can compare (and correct me), and so that I have a reference for future Eclipsy activities.

Update: 2008-09-10 Eclipse has not really worked out for me at all. Checking stuff out of SVN and setting up projects worked fine, but when I went to write code, the code-completion features did not work at all--in fact, they crashed Eclipse entirely. I turned them off... and Eclipse still crashed. So maybe the following should serve as a "what not to do"...

  1. First of all I knew I needed to use PDT (PHP Development Tools for Eclipse). So I installed the Eclipse 3.3/PDT 1.0.3 bundle--Eclipse + PDT all pre-packaged. While this was labeled "stable", it turned out to be seriously crashy. So I went all cybermen and deleted it.
  2. The second time around, I installed plain Eclipse (Ganymede), and used Eclipse's internal "update manager" to install...

    Eclipse's update manager is under the help menu as "Software Updates..." (at least on the Mac). The first two plugins I downloaded as .zips and added within the Update Manager via Add Site... > Local... > path/to/unzipped/plugin. Subclipse I installed by adding the update site directly: Add Site... > http://subclipse.tigris.org/update_1.4.x (the other two were less clear about their Eclipse update manager URLs). yay, PHP and SVN support.

  3. I work with Drupal, which uses the .module and .install extensions for some php files, and I had tell Eclipse to treat files with those extensions as PHP. how to force php syntax highlighting in Eclipse--you get more than just syntax highlighting with this.
  4. When I first checked out my project from svn using subclipse, Eclipse didn't set it up as a PHP project, meaning that no code features were available. This FAQ was helpful: How do I manually assign a project Nature or BuildCommand? Project "nature" I guess has some sort of "project type" implications that make various project features and behaviors available, and "build commands" are "parse-y things that report php warnings and errors". As the link above specifies, I went into the .project file in my project's base directory and added the right "nature" and "build commands"; I got the correct values by creating a fresh php project and looking at its .project file.

It remains to be seen whether I actually like working in Eclipse, but I've resolved to give it a good try.

Ubuntu on my Eee 1000

Last week I got an Asus Eee 1000H, and this weekend I installed Ubuntu on it (this is the "Windows" version and came with XP installed--NewEgg had a $100 instant rebate on the 1000H). Thanks to some fantastic software and how-tos from the community, it was mostly straightforward.

The following is not a how-to. I'm documenting my experiences so that knowlegeable users can compare, and so that I have a reference for future linuxy exploits.

  • I got a 4 GB flash drive and turned it into an Ubuntu Live USB. Right on the Eee, I downloaded the Ubuntu ISO via bittorrent (linked on the get Ubuntu Eee page) and UNetbootin, and used UNetbootin to put the ISO stuff on the flash drive. I also downloaded the Ubuntu Eeee kernel from these installing the Ubuntu-eee kernel manually which should fix Eees with Ubuntu but no internet access.
  • How to put a live Ubuntu image on a USB stick
  • I saw instructions to hit escape during startup to switch the boot device, but it wasn't working for me, so hitting f2 (over and over) let me enter the BIOS and switch the boot device.
  • Originally I couldn't seem to boot to the flash drive... to make it work I dumped the contents of the USBTest.zip file from this Pen Drive Linux boot test on my freshly formatted flash drive, running the makeboot.bat file (from the flash drive only!) and then putting the Ubuntu ISO on again with UNetbootin (and choosing to overwrite the exisiting syslinux). So that worked, but may not have been necessary, because I also twiddled some BIOS settings--I'm a total PC noob, and I wasn't exactly sure what needed to be changed.
  • In the BIOS I also disabled "quick boot" and "quiet boot" for the time being. I re-enabled "quick boot" but I haven't paid attention to any difference it might make.
  • I installed Ubuntu over the whole Windows partition.
  • Once I rebooted into my new Ubuntu installation, my flash drive refused to automount--it kept saying "Invalid mount option". It turned out that the fstab (a file that describes how the OS should deal with mounting devices) was messed up. Apparently a bunch of Ubuntu users were having similar issues after installing 8.04.1. My fstab had my USB devices trying to mount as a CDROM (I suspect because Ubuntu assumed that my install device was a CDROM rather than a flash drive).

    First of all I read this page on understanding and editing fstab. fstab is a plain text file located at /etc/fstab. You can only edit it with root permissions, because messing it up can prevent your system from booting.

    Basically, I had a line that looked like this:

    <code>/dev/sdb1       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0</code>

    that needed to look like this:

    <code>/dev/sdb1       /media/usb      auto    auto,user,exec,rw,utf8  0       0</code>

    I examined the fstab with:

    <code>tail /etc/fstab</code>

    I confirmed the device path (in this case, "/dev/sdb1") by plugging in my USB drive, opening a terminal, and typing:

    <code>sudo fdisk -l</code>

    This will prompt for a password, then spit out a block of info about each available drive; the block describing my 4 GB flash drive looked like this (note the "device" and "system", which in this case are "/dev/sdb1" and "W95 FAT32" respectively):

    1. <code>Disk /dev/sdb: 4009 MB, 4009754624 bytes
    2. 255 heads, 63 sectors/track, 487 cylinders
    3. Units = cylinders of 16065 * 512 = 8225280 bytes
    4. Disk identifier: 0x00000000
    5.  
    6.    Device Boot      Start         End      Blocks   Id  System
    7. /dev/sdb1   *           1         488     3915733+   b  W95 FAT32
    8. Partition 1 has different physical/logical endings:
    9.      phys=(1023, 254, 63) logical=(487, 124, 63)</code>

    I created the mount point (/media/usb), made a backup, then edited my fstab with vi (for gui, use gedit):


    1. sudo mkdir /media/usb
    2. sudo cp /etc/fstab /etc/fstab.bak
    3. sudo vi /etc/fstab</code>

    This made my flash drives automount as expected.

  • Once I could automount my flash drive, I followed the instructions I mentioned earlier on installing the Ubuntu-eee kernel manually and using the array.org ubuntu-eee repository. This got internet access (and swishy UI effects) working.
  • I updated installed programs via the clicky red arrow and didn't bother to find out the consistent way to access this.
  • I installed Apache, MySQL, and PHP according to these instructions for LAMP on Ubuntu. Basically:

    <code>sudo tasksel install lamp-server</code>

    Patience is a virtue. I think that after installing AMP via tasksel, you can stop and start Apache and MySQL via the Services panel (in the menus at System > Administration > Services).

fish list

Consumer Guide to Mercury in Fish. Also notes whether the species are "in trouble".

subnotebook purchase

Since I won't be able to get the MSI Wind before I go out of the country at the end of the month, I need to get something else to travel with (am not taking my main laptop out of the country with current border policies). I almost got the HP Mini-Note, but then I settled on the larger/faster Asus eee 1000. Pros: ships now. Cons: having to settle.