Sunday, November 13, 2011

dual booting windows 7 and ubuntu 11.10 on lenovo x120e

This was a bit trickier than I hoped it would be. I didn't really want to reinstall windows 7 and the default ubuntu install didn't seem to detect the right partition to overwrite MBR (or Windows 7 was doing something odd). In lieu of digging into what was really going on I ended up adding an entry to the windows 7 bootloader using BCDEdit, following these directions. I diverged from those instructions by running the "dd" command immediately after install while still within the ubuntu live environment (thereby avoiding the reboot). Following that route seemed to be the quickest. I tried the alternate iso route earlier but it turned out that wasn't necessary with 11.10.

Hope this helps out anyone else out there dealing with the same issue. If this is unclear I can add more details. This was done with the amd64 11.10 iso, default partition was /dev/sda5 for me, I could mount the main windows 7 system partition with the ubuntu disk utility (it mounted to /media/Windows7_OS). Those would likely be the defaults for someone else going this route as well but YMMV.

Thursday, October 21, 2010

a couple videos from DjangoCon 2008

Cal Henderson on why he hates Django, covers issues of scaling and how Django may implement better scaling features in the future. Some of these are likely implemented now.

Guido on the Google App Engine:

Sunday, October 3, 2010

upgrading PostgreSQL on Debian/Ubuntu

I've been upgrading pg on a few servers today. One from 8.1 to 8.4 (debian) and the other from 8.2 to 8.4 (ubuntu). In both cases the process worked as noted here (though I used aptitude):
  1. backup your db(s)

  2. add backports repositories ubuntu, debian instructions (don't forget about pinning)
aptitude install postgresql-8.4
pg_dropcluster --stop 8.4 main
pg_upgradecluster 8.1 main

Once you're sure that's working:
pg_dropcluster --stop 8.1 main
apt-get remove postgresql-8.1

Friday, October 1, 2010

mysql string search and replace

UPDATE [tablename] SET [fieldname] = REPLACE([fieldname],"[oldstring]","[newstring]");

The code above would operate on every row in the table but you may want WHERE conditions. Example:
UPDATE profile SET homepage = REPLACE(homepage,"","") WHERE first_name="Joe" AND last_name="Schmoe";

Will change Joe's homepage to instead of

Sunday, August 8, 2010

more altruistic engineers

Awesome story about the devs who created "Graphing Calculator 1.0, which Apple bundled with the original PowerPC computers". They basically built it on their own time, unofficially, at Apple without being Apple employees and without official approval.

Saturday, August 7, 2010

great video on the Python GIL

Taught me more than I wanted to know about how the GIL works and reveals a critical problem.