Using Raw Disks with VMware Server 2

For various reasons I had the need to open a raw disk inside VMware Server 2. The reports from the field say that this just isn’t supported. Although I don’t need to actually run a raw disk, I needed to get some data off it – 400GB worth. It turns out ’not supported’ really means ’not in the UI.’ I don’t know the reason why it isn’t in the UI, maybe marketing wants people to use ESX, or maybe the UI guys fell behind with their workload.
Read Using Raw Disks with VMware Server 2

Ubuntu 8.04 64-Bit and VMware Server 2

I now have successful installation of VMware Server 2 (Beta RC1) on top of Ubuntu 8.04 64-bit. I have been using various virtualization technologies for years, and VMware is usually the easiest to install and configure. So far, VMware Server 2 RC1, has proven to be the exception to the rule. That said, I am very excited by the direction VMware is taking – this new server version looks to have great potential.
Read Ubuntu 8.04 64-Bit and VMware Server 2

VMware Tools in VMware Server 2

Installing the tools in VMware Server 2 is a little different than Workstation or the previous versions of VMware Server. Under the Summary tab of your Virtual Machine, look for a link that says “Install VMware Tools” – click it. Wait for ‘Success’ to show up on the bottom, and jump into your virtual machine. Mount the tools as so: mount /dev/cdrom /media/cdrom And install as normal (copy the .tar.gz to /usr/src, extract it, install it). Easy peasy.
Read VMware Tools in VMware Server 2

Setting up Windows 2003 as an NTP Client

I have had to search for the commands to setup a Windows 2003 box as an ntp client a few times now, so have decided to finally write them down here for my own good measure. Funny thing is, I’m pretty sure there are three ways to setup a 2003 box as an ntp client. Open up the cmd prompt and type in: w32tm /config /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org" /syncfromflags:MANUAL /reliable:YES /update net time setsntp: "0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org" Type in gpedit.msc and your local GPO editor will pop up. Go to the folder as indicated in the below screenshot and Enable the “Enable Windows NTP Client” option. Next …
Read Setting up Windows 2003 as an NTP Client

Setting up a Mapnik Server on Ubuntu

First, we go ahead and install the needed packages. I’ve tried to include “my” list of packages that were needed to get a vanilla 7.10 image up to steam. apt-get install build-essential libltdl3-dev autoconf libtool automake \ postgresql postgresql-8.2-postgis postgresql-server-dev-8.2 \ wget subversion libboost-python1.34.1 libboost-thread-dev \ libboost-program-options-dev libboost-regex-dev \ libboost-python-dev libboost-serialization-dev \ libboost-filesystem-dev libpng12-dev libjpeg62-dev \ libtiff4-dev zlib1g-dev libfreetype6-dev libgeos-dev \ unzip apache2-prefork-dev Next we start to download a few components. I did this in my home directory, /home/kelvin
Read Setting up a Mapnik Server on Ubuntu

Notes on Installing mod_tile for Mapnik

I have no idea if these notes on how to install mod_tile will be useful for anybody. The current readme states that you need to edit the source code, but never actually where. Well, this is where, at least until the code can either take switches or can auto-configure itself. This is quite brief, so if you need more details, shoot me an email or leave a comment. I have repeated this process on two Ubuntu 7.10 machines.
Read Notes on Installing mod_tile for Mapnik

Tunneling over SSH

As a rule, whenever I’m online I’m logged into my server back in the States. I’m also usually wireless, which we all know is beyond insecure – I’ve found it especially useful to tunnel firefox over SSH. I try my best to tunnel stuff over SSH back, and if you want to also, this is how. I’m on Linux, so this is pretty darn easy. ssh [email protected] -D 1080 If the SSH daemon runs on a different port, you’d do something like this:
Read Tunneling over SSH

Alexa Site Thumbnail And Django

So, you’ve seen how to look up thumbnails via python, but wonder how to integrate this with Django? I created a sample app to demonstrate. One thing to note about this app is it is slightly more complex than just using the previously mentioned ThumbnailUtility. For starters, the thumbnail is downloaded from Alexa onto the server. Another part is first searching if the thumbnail exists already, and if it does, serving that instead of querying Alexa. Let’s just start with some code.
Read Alexa Site Thumbnail And Django

Alexa Site Thumbnail with Python

For one of my sites I needed to get thumbnails, yet Alexa Site Thumbnail didn’t have any code snippets for Python. Well, no they/you do. import base64 import datetime import hmac import sha import sys import re import urllib import xml.dom.minidom AWS_ACCESS_KEY_ID = 'your-access-key-id' AWS_SECRET_ACCESS_KEY = 'your-super-secret-key' # This one is for an individual thumbnail... def create_thumbnail(site_url, img_size): def generate_timestamp(dtime): return dtime.strftime("%Y-%m-%dT%H:%M:%SZ") def generate_signature(operation, timestamp, secret_access_key): my_sha_hmac = hmac.new(secret_access_key, operation + timestamp, sha) my_b64_hmac_digest = …
Read Alexa Site Thumbnail with Python

Alexa Site Thumbnail with Python II

This is how I actually use Alexa Site Thumbnail, and since I’min a sharing mood, I’ll extend the code your way. In short, this takes the url and searches in STORELOC first, then any urls not already in STORELOC are retrieved and named via a slug. You need to pass two variables to either of these: blog_site.url and blot_site.slug – since I’m using Django, this is naturally how sites are returned after I filter a queryset. What I do is place the call to Alexa as high up the page as I can, and because I’ve threaded this, the page can continue to load without waiting for Alexa’s response. For instance, let’s say you have some model with cool sites, and you want to return …
Read Alexa Site Thumbnail with Python II