A Fein Bunch of Guys

posted on 2009-10-04 - amd.im/1xzw

This past weekend were the nuptials of TJ Guy and Margot Fein. It was a good opportunity to take my camera out after it being in a bag for quite some time.

The wedding was at the Firethorne Country Club in Charlotte, North Carolina. Margot is a native North Carolinan and TJ has been living there for the last few years working for Budweiser.

The Guy family and I flew out a few days early to help with preparations and to be there for all the lead up into the actual wedding Saturday evening.

We flew out early in the morning on inconvenient flight that we bought with points I had on Cathay Pacific's Asia Miles program. I cannot recommend the experience. Flight selection was terrible, customer service was spotty, not very pleasant at all.

But in the end we got to Charlotte fine, and the wedding proceedings commenced without many hiccups.

Outdoor Rehearsal

Indoor Rehearsal

We had a great rehearsal outdoors, but practiced indoors just in case.

The Tribe

The indoor practice ended up being a good thing, it rained on the wedding day. The wedding went really well, I didn't take many pictures at all, but I did get this good shot of "The Tribe" as Joy calls them.

The Guys

I've posted the rest of my photos from the trip in a "Fein Bunch of Guys" photoset on Flickr. Let me know what you think.

I just started using Pinboard as an alternative to my previous use of Delicious and Instapaper.

One cool thing that I was able to work out (that I had trouble with using Instapaper) is using the new Send To feature in Google Reader, I can now send links directly to Pinboard as unread items or bookmarks.

The Pinboard blog has basic instructions for sending as bookmarks:

Go to Settings, and then the "Send To" tab. Click the "Create Custom Link" and enter the following:

Name: Pinboard
Url: http://pinboard.in/add?url=${url}&title=${title}   
Icon Url: http://pinboard.in/favicon.ico

But to send it as an unread item just requires changing the URL to:

http://pinboard.in/add?later=yes&noui=yes&jump=close&url=${url}&title=${title}

If you're a Pinboard user, enjoy!

My Morning Commute Tokyo

posted on 2009-08-18 - amd.im/BeL8

When I stay in Tokyo, I rarely "stay" in Tokyo long. It's more of a base-of-operations, or more accurate: a place where I leave my suitcase.

I have not yet had a vendor that could actually call themselves, "based in Tokyo" but it's still a major hub and so it ends up being a hub of my travels in Japan.

This commute is not a single day's commute like the other days, instead I'm posting pictures from two days of commuting as they were drastically different.

Day 1:

The first day I had to visit a vendor in Toyama, which unfortunately is difficult to get to by train (mountains in the way). This meant a day flight, not my favorite.

It took me nearly 5 hours to make the 176km flight for a 4 hour meeting and then another 5 hours to get back to the hotel, but that's life.

Day 2:

The Chue express line from Shinjuku to the Tokyo Central Station.

On the second day, I had to visit a vendor that was outside Niigata, a ways north of Tokyo, but much more easily accessible by train.

Stripes generated by the blur of a passing train.

To get there, I took the Chue line from Shinjuku to the Tokyo Central Station then the JR Shinkansen up to the Tsubame-Sanjo Station.

A self-portrait in one of the tunnels during my commute

And a bonus shot below, of my evening commute back to Shinjuku after a long day...

My Evening Commute

My Morning Commute Shanghai

posted on 2009-08-11 - amd.im/8Osc

I'm a little late posting these, but it's been a crazy week. Here's a continuation of the My Morning Commute photos I took.

The next stop in my travels took me to Shanghai, a city that I've been to but really have only been visiting much recently.

What has always stricken me about the city is it's glaring contrast between the modern world and the city's long history. This photo of a modern skyscraper immediately behind a historic office building is one of several scenes that I have come across that really shows that contrast.

Leaving Shanghai is a completely different contrast. Shanghai is in the top 10 largest cities in the world, but when I leave it, it doesn't seem to trail off the way that other large cities do, into a maze of suburbs. Leaving Shanghai often feels like traveling into another world.

Here's a less interesting, but frequent view that I have from the back of whatever vendor's van I'm in. China's freeway system is comprised of more tollways than anywhere else I've seen yet.

My Walk in Shinjuku

posted on 2009-06-21 - amd.im/TR6b

Had a day off in Japan, so I went for a stroll around Shinjuku. Nothing too special, had some lunch, took some photos, but here it is, documented in a Google Map.

If you click through to Google Maps, you can see the list of pins in order. If you're still here though, start where the two closest pins are, and then follow the trail (anti-clockwise), clicking on the dropped pins as you go to see what I did, and any pictures I may have taken. Feel free to click the pictures to get a link to larger ones on Flickr.


View My Walk in Shinjuku in a larger map

To ease my development while on the move, I have local development copies of my websites running on my MacBook Pro. This has always worked pretty well for me, as content for my websites was created, predominantly, by myself, and when new content was created at a single site I could sync that database manually and get an up to date local content set.

With my recent efforts into lifestreaming, this is no longer the case. My content now comes in whenever I post content on any website. I'm a fairly frequent user of the internet services that feed my lifestream (Twitter, Delicious, Flickr, etc), and keeping the content on my local version up to date was turned into a troublesome task, forcing manual, tedious syncing each time I went to work.

Without further explanation, here are the steps I took to make a one line MySQL database syncing command. There may be better ways to do this and if you know them, please comment.

  1. Setup a MySQL "dump" user. Mine is cleverly named "dump" and is passwordless, although if you are more security conscious than I am, you can add a password of your choosing. On the server, log into mysql and issue this GRANT statement from a user with the proper permissions.

    GRANT SELECT, LOCK TABLES ON `dbname_remote`.* TO 'dump'@'localhost';

  2. Create a bash alias in ~/.bashrc :

    ALIAS clone_lifestream='ssh -q -t hostname "mysqldump -u dump dbname_remote" | mysql -u root dbname_local'

Notes: For this example, you need to replace a few things.

  1. dbname = the remote database name
  2. hostname = the remote hostname
  3. dbname_local = the local database name
  4. clone_lifestream = the name of the alias, can be anything.

Cab Ride to the Airport

posted on 2009-05-23 - amd.im/FYDE

Today I'm flying up to Shanghai, so that I can enjoy a rare weekend off up there, instead of sticking around in Shenzhen, which is sure to be less interesting.

I had quite a time trying to get to the airport though, and I figured I'd pass the story along.

As I was leaving the hotel with my luggage and a box full of samples in tow, I asked the doorman to tell the cab driver to take me to the Shenzhen Airport and also asked how long it was going to take to get there, as I knew I was low on local funds. He was polite about it and told me it would take about 15 minutes and that he had already told the driver the airport and terminal to take me to.

Well, unfortunately the cab ride was closer to 30 minutes, and when I got there, I was about 20RMB (about $3) short of the 90RMB ($13) fare. Well the cabbie decided to freak out about this, understandably as that much money could probably feed him pretty well for a meal or two.

Not knowing what else to do, I offered him all the RMB I had along with 20HKD ($2.50) and $4 (all the relevant money that I had, I didn't think he would be interested in Euro or Yen) but he still wasn't satisfied. There was no way that I was going to try and leave this cab with my luggage and samples safely locked in the trunk of his cab. So we sat there and stared at each other in silence for a moment or two, before he decided to berate me in Chinese that I'm sure I'm glad I didn't understand.

Eventually I called the hotel I had just left and had a lady working at the desk tell this guy that if he came with my luggage to an ATM, I would be happy to pay him in full. He hesitated for a minute and then double parked his cab and followed me and my luggage inside.

As soon as we entered the door, he was obviously excited to see a police officer standing there and asked him to come along as well. I guess he wanted to ensure that I didn't try any funny business.

Well we got to a Bank of China ATM and no matter what buttons I pushed, the combination of my card and that ATM did not result in money to pay the driver. I tried several times and eventually resigned to defeat pulled my card out, looked at the cabbie and shrugged.

Much to the confusion of myself and the policeman, the cabbie felt this was hysterical and he started laughing and laughing. It was such a reversal from the attitude he had just moments earlier I really had no idea what to think, but at least the mood was a little lighter.

After the first failure, the cop took us to a China Construction Bank ATM (sounds fake, but it's a real bank), and I was able to pull out enough funds to last me the rest of my trip.

I felt so bad about the whole situation that I paid the guy 200RMB, and he looked at me quizzically as if he couldn't make change. Then started scrambling in his pockets to find some way to make change. So I laughed and gestured for him to keep it, and his face changed dramatically. All sins had been forgiven and beyond; it looked like he was a kid on Christmas morning.

Anyways. That was my ride to the airport

Taiwan's Treasures

posted on 2009-05-18 - amd.im/ZjgC

I had a free day this weekend while in Taipei, so I decided to do a little sight seeing.

After consulting with a couple of the local Apple team, I was told to head to the National Palace Museum. The history of the museum itself is pretty interesting.

Apparently, when the communist "insurgents" were rising up, Chiang Kai-Shek decided that it was his duty to protect all the ancient Chinese artifacts from them and shipped them all to southern China and then off to Taiwan as part of his retreat. So in the end a lot of the stuff that was originally in the Forbidden City and other historical sites in China ended up being put in a museum in Taiwan.

I expected it to be an awful day to go to the museum as it was like 31C and pretty humid, but I went off anyways as a day sitting in the hotel room watching bad movies on HBO Asia sounded even worse.

After glancing at the directions on the website for the museum, I hopped on the train and headed to the Shilin station. Unfortunately, the map at the train station of all the landmarks in the area left the National Palace Museum (the 15th most visited museum in the world according to The Economist) off the map. So I headed towards the hills because in the pictures it appeared that the museum was up in the trees rather than the city.

After walking a few blocks, I really wasn't sure how far it was to get there and asked a group of a couple English speaking people where it was... after much debate they decided that it was 2 hours by car from where I was, and that I was "better off to go back to the hotel".

That wasn't quite good enough for me and after walking another block I stumbled upon a bus that had National Palace Museum written on it. Two stops and maybe ten minutes later I was on the steps of the museum.

The exhibits were actually pretty cool. It was interesting to see just how old Chinese culture really is. It was fascinating to see just how far ahead they were for so many years. We, as Americans, tend to think that we're the most advanced society in the world. This may be true, but if it is, it hasn't been for long.

On to the important part though. If the National Palace Museum is the "Smithsonian of Taiwan", the Jadeite Cabbage would be the Hope Diamond. I stood in line for at least 30 minutes to see it, and boy was it something. I have never before in my life seen a stone so accurately carved into something resembling food.

In all reality, sure, the craftsmanship is nice, but I sure didn't get it. The enthusiasm for seeing this was beyond me. However the "Meat Shaped Stone" is a whole different level of stones carved to look like food... Amazing.

On the way back I decided to hoof it rather than ride the bus, and it was a good idea as I came across Chiang Kai-Shek's Shilin "Official Residence". The residence was closed for repair, but the grounds were interesting. There were the obvious places, different rose gardens, Chinese gardens, and niceties of various kinds.

Cooler was when I decided to get off the beaten path and take some stairs up and around the the hill overlooking the entrance to the residence. There were no signs up here, and no markers around. I don't think it's the part of the residence that the Taiwanese government likes to promote. Up on top of the hill were snipers nests pointed right towards the entrance just out of sight from the memorial to Kai-Shek's mother.

Coolest of all was what I saw on the hike down another route. At the bottom of the hill, in between a concrete wall and an outcropping of rock was a narrow entrance, it was peculiar looking so I checked behind it and found a gated tunnel that pointed directly towards the main residence. I'd bet my shoes that it was an escape tunnel in the event that the Communists invaded.

There were no signs, and no markings to indicate this, but with two snipers nests overlooking the exit to the tunnel, and a concrete barricade between it and the road, it all just fit.

Cool stuff.

Once I got done with that, I hopped back on the train and headed to Danshui just in time to see sunset.

Are you trying to add automatic hashtag and username hot linking in your PHP twitter app?

I just tried to do this with my amdavidson.me lifestreaming site. It's just two nested regular expressions. If there's some problem with nested preg_replace functions, or if any regular expression geniuses have better ideas, feel free to comment.

But if not, here's a little code for you, should make things super easy. It assumes your tweet variable is $tweet, replace with whatever you'd need.

echo preg_replace('/\#([a-zA-Z0-9_]{1,15})?/', 
  "<a href=\"http://hashtags.org/tag/$1\">#$1</a>", 
  preg_replace('/\@([a-zA-Z0-9_]{1,15})?/', 
  "<a href=\"http://twitter.com/$1\">@$1</a>", 
  $tweet));

Are you seeing errors for content length in your Apache Bench tests of your webserver?

I had a hell of a time wondering what was going wrong with my webserver under load and finally found the answer here.

Turns out that Apache Bench takes the first pulled request and compares the length to all subsequent requests. Makes sense for a purely static page, but when you have a random image cropping up, you're sure to see at least a couple bits difference in length.

So if you're serving straight, hand coded HTML, enjoy the feeling of knowing that you're getting the same length content each and every time... but if you're like the rest of us (and anyone who would actually be using Apache Bench) feel free to rage that there's no command line switch to turn off that silly notification.

Minimalism Revisited

posted on 2009-05-04 - amd.im/WPRG

Well, this site just got more tweaking today to make the theme feel a bit more "andr3w". I'm pretty comfortable with it now, it will certainly still change, but I don't think it will be all that much.

The theme that I based my theme on is called Minimalism and it was done by Christian Geneahr. In turn it was based on the classic Kubrick, a theme so widely used and appreciated, I would call it the "Pappy" of all Wordpress themes.

With Kubrick's fine lineage, Christian was able to make quite a nice minimalist theme. It just needed a couple more refinements for me to feel totally comfortable with it and now that my changes are somewhat stable, it's time for me to do my GPL duty.

So, without further adieu: Minimalism-Revisited.

My spam count has exploded in the last few days, so I made a decision to adjust my filtering a little more.

Previously, all messages that got more than 5 points in SpamAssassin tests were flagged and sent to my .Spam folder. This got to be a bit of an issue as I still check there to make sure that no emails are miscategorized... Call me crazy, but I'm a bit anal when it comes to that stuff. (I once missed an interview because of Gmail's filters, but that's a story for another day).

For the last few days, I've been reviewing the spam counts for both the more cleverly hidden spam and the less-than-clever spam. I've come to realize that while the odds are low that any real emails will get marked as spam if they do they'll definitely get a score less than 10. So to combat the large amount of spam that's now coming through, maildrop will halt delivery on any emails with a score higher than 10.

Here's what I put in my .mailfilter file for courier-maildrop:

if ( /^X-Spam-Level: \*\*\*\*\*\*\*\*\*.*$/ )
{
exit
}

if ( /X-Spam-Flag/ )
{
to "$DEFAULT.Spam"
}

This way, anything that gets more than won't even be delivered, and all other emails that get a spam flag (greater than 5 points) get sent to spam, then the rest of my filters are processed.

Tested the email with the GTUBE and with a normal message and it seems to work, but we'll see if I wake up in the morning and all my email has been dumped in the trash can.

Lifestreaming via Sweetcron

posted on 2009-04-20 - amd.im/eJK2

Had a Tumblr setup for a while at amdavidson.me but I already have a webserver and didn't like dealing with another host.

So I searched around a bit and Sweetcron came up as a viable alternative for an aggregator for all my internet activities. It's a pretty cool little app, very lightweight and seems to be pretty extensible, if I get around to it.

Anyways, check it out, it has a good summary of all the useless stuff that I do on the internet, all three of the blogs, my twitter account, my delicious bookmarks, and my flickr pictures. One stop shopping.

So the Sweetcron documentation isn't altogether clear on what you should put in cron for it to update automatically, rather than slowing down a user every 30 minutes.

It's fairly intuitive, but for those missing this logical step, do the following.

Change the setting in the admin panel from psuedo-cron to true-cron, and take note of the URL.

Then put the following in your crontab file (easily accessed with crontab -e on a debian machine):

*/5 * * * * curl http://your/true-cron/url

You can change the 5 to be the number of minutes between updates that you want, and you'll definitely want to change the URL to the one listed in your Sweetcron's admin page.

Changes to Flight Plan

posted on 2009-04-14 - amd.im/dREs

Had a surprise change to my flight plan when leaving Shenzhen airport on China Eastern Airlines.

I got to the airport early, as I usually do... I don't know about the rest of you, but I'm not one of those that likes to run to the gate at the last minute. I prefer to take my time, find a little WiFi and relax before my flight.

Well today was not going to be one of those days.

I was sitting in a cafe above my gate relaxing a bit and checking some email, when, on a whim, I checked my ticket to verify the gate info and flight number. To my astonishment, the flight numbers didn't match, and worse, the departure time listed on my ticket was a full hour earlier than the flight I was booked on, and I was already 30 minutes late.

Fortunately for me, the flight that I had been changed to was running about 40 minutes late, so I still made it.

It bewilders me why a gate agent would make a change to my itinerary such as this without notifying me of the change so that I could adjust and plan ahead? Especially because the flight was already boarding by the time I got through security and got to the gate. Had I spent any more time just idly walking around I would have never made it.

Thanks trying to help me out with a bump to an earlier itinerary gate agent man, but tell me next time.

Site Redesign

posted on 2009-04-13 - amd.im/KzQK

Changed up the site a little. More to come, wanna try my hand at making the typography interesting.

I just thought the old design was a little over done, so thanks to the awesome theming capability of Wordpress... Here's a new one.

Thought Processes

posted on 2009-04-13 - amd.im/8Mka

I have no idea what goes through the head of some people in China. They have thought processes that are totally unfamiliar to me, and I'm not sure I'll ever be able to understand what causes them to do the things they do.

Here goes a story to elaborate on this point...

I spent most of the day in my hotel room yesterday. No particular place to go, so I caught up on some stuff I wanted to get done on the net and video chatted with Naomi.

Well right before I expected Naomi to get home, the housekeeping guy showed up and asked me to clean the room, after realizing he didn't understand "No" I threw out the little Chinese with a "Bu Yao" ("No Want") and he got the picture and scrammed.

Later on I headed out to Hua Qiang Bei, the local electronics district, and left the do not disturb sign unlit hoping that when I got back they'd clean up a bit when they come through to do the turn down service.

I returned to realize that this was not the case. The room looked exactly as I had left it, or so I thought.

I had no indication that there was anything amiss until the next morning when I went to hop in the shower and realized that my towel was missing. I'm certain that I did not remove the towel, and searched the room quite extensively to locate any other towels... Settling for a hand towel as my only recourse I proceeded to hop in the shower, only to realize that in addition to my towel, they had taken all my little bottles of shampoo and soap from the shower. There was definitely enough in there for another round or two of bathing so I have no idea why they would have taken it.

What confuses me more, is if you're only going to take the towel and shampoo bottles, why even bother coming in the, admittedly messy, room? I suppose they didn't want to clean up the rest of the room because I had already refused service that day, but why take the towel and shampoo bottles and not replace them?

I may never understand.

Bad HTML

posted on 2009-04-09 - amd.im/QLxK

Sorry to any visitors affected by the malformed site that cropped up due to my last post...

Old habits die hard, and I write too many of my posts in HTML only to have a missing quotation mark leave my page poorly rendered. I need to rely on the (fairly) excellent built in wordpress wysiwyg editor. At least until I write a proper, custom blog engine for this page...

The affected post has been fixed and you can now go about your business.

Switch...

That's all I have to say. Passenger/mod_rails is so much faster and more competent at serving my RoR code than my hacked together mongrel/nginx scheme that I had before.

My ram usage spikes much more when visitors hit the site, but never starts swapping. The increased ram usage is more than worth it for the HUGELY increased speed that I'm seeing by the dynamic mongrel management.

Even better, when the visitors leave (as often happens), the ram usage settles down to the same place it did with my nginx and mongrel combo.

Enjoy the increased speed and stability AMDavidson.com visitors.

Engaged

posted on 2009-04-01 - amd.im/q3MS

Well... It's finally happened.

Naomi and I got engaged.

Last week, while vacation in Maui, I popped the question. It went really well.

We were hiking in a bamboo grove, off the side of the Hana Highway and found a waterfall that just seemed like the perfect spot. Fortunately, I was prepared, and had a pretty little diamond ring in my pocket.

The pictures are posted on Flickr.

Gem Issues with Passenger

posted on 2009-03-31 - amd.im/c3fH

I was ignorantly happily letting my gems be pulled in automatically on my previous server using Nginx + Mongrel_Cluster and this seemed to pose no problems.

BUT! when I switched to a new host, I went with an Apache + Passenger (mod_rails) setup and my servers would start but would just offer "Error 500".

I checked the logs and it seemed that it wasn't loading RedCloth so I added the following to my environment.rb file and it all worked fine!

In config/environment.rb:

require 'rubygems'
require 'redcloth'

Here are some highlights for configuring Postfix to use Courier-Maildrop for local delivery.

This allows some advantages over just having postfix deliver, because you can do server-side filtering of spam and mailing list messages to de-clutter your inbox.

All these notes are based on configuring the setup on Ubuntu 8.10 (Intrepid Ibex) with Debian Lenny's courier-maildrop

The following are snippets from my configuration files, highlighting the changes that I had to make, from an already existing mail server. If these look unfamiliar, or you need more assistance setting up the basic framework of a Postfix + Courier-IMAP mail server, start here.

/etc/courier/maildroprc:

EXTENSION="$1"
RECIPIENT=tolower("$2")
USER="$3"
HOST="$4"
SENDER="$5"
DEFAULT="/home/vmail/$HOST/$USER/."

/etc/postfix/main.cf:

virtual_transport = maildrop
maildrop_destination_recipient_limit = 1

/etc/postfix/master.cf:

maildrop unix   -       n       n       -       -       pipe
flags=ODRhu user=vmail argv=/usr/bin/maildrop -w 90 -d ${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop}

So if you have a working mail server: make these changes, sudo /etc/init.d/postfix restart, and then get to work writing your .mailfilters!

Ubuntu 8.10's courier-maildrop is not compiled against courier-authlib and so cannot read from many of the supported authentication schemes that authlib can support.

Fortunately, Debian Lenny's can. So if you're having trouble you can try and install the package from that distribution, YMMV.

To save you the effort of going out and locating it, I'll attach a version of it here. Use it at your own risk, but it's working for me.

courier-maildrop_0600-2_amd64

Migrating an Email Server

posted on 2009-03-21 - amd.im/mFMA

Here are the steps that I went through to migrate my Postfix/Courier server from Slicehost to Mosso.

  1. Check current DNS MX records for applicable domains. I had mine set to all go through a central A record (my mail server) so it was easy.
  2. Set MX records to expire quickly (I think the minimum is 60 minutes). This can take 24 hours to propogate, so do this early, and then you'll have time to do the rest of the processing.
  3. Configure Postfix/Courier/IMAP as desired on new server. There are a lot of howtos on this, and some hints on this site, so I won't go over how to do this here.
  4. Test server to ensure that email can go in and out and that any spam filtering or other processes are operating well.
  5. I use MySQL for managing users and forwardings, so I dumped and locked my existing database, and copied that to the new database.
  6. Rsync maildirs over from the old server to the new server. This can take a while, depending on server speed and bandwidth.
  7. Ensure that Postfix and Courier are up and running on the new server.
  8. Change central DNS record to point to new server IP address.
  9. Stop Postfix and Courier on old server. This could lead to a couple of bounced emails, but in all likelihood the sending email servers will retry and find their way to the new server.
  10. Watch closely.

There should be very little loss of email, connectivity, or data using this path.

If anyone has any better suggestions, let me know.

If you are having issues getting an SSL connection to Courier IMAP. Check your certificate files.

In /etc/courier/imapd-ssl:

TLS_CERTFILE=/etc/ssl/private/certificate.pem

Courier is expecting a PEM file for TLS_CERTFILE with your certificate and private key. Do not use just your certificate.

Also, if you require intermediate certificates to complete the trust chain, you can include them in this file.

MAKE SURE that you have proper permissions on this file to the security of your private key.

Here is the process I took to install Spamassassin as a daemon working with Postfix to process incoming mail.

I'll also be trying to reduce the memory footprint while still getting acceptable performance. Mind you, this is being implemented on a low volume server, so these settings may not be applicable to a production server with lots of users.

First, let's do some prep work on the command line:

$ sudo aptitude install spamassassin spamc
$ sudo groupadd -u 5001 spamd
$ sudo useradd -u 5001 -g spamd -s /sbin/nologin -d /var/lib/spamassassin spamd
$ sudo mkdir /var/lib/spamassassin
$ sudo chown spamd:spamd /var/lib/spamassassin

Now edit /etc/default/spamassassin and change the lines below

ENABLED=1
SAHOME="/var/lib/spamassassin"
OPTIONS="--create-prefs --max-children 2 --username spamd -H ${SAHOME}"

Edit /etc/spamassassin/local.cf

ENABLED=1
rewrite_header Subject **SPAM _SCORE_**
required_score 5.0
use_bayes 1
bayes_auto_learn 1
use_dcc 0
use_pyzor 0
use_razor2 0

Now edit /etc/postfix/master.cf and change it to look like this:

# /etc/postfix/master.cf
26   inet  n - - - - smtpd
   -o content_filter=spamassassin

# Add this segment to end of file:

# Spamassassin processing filter
spamassassin unix - n n - - pipe
   user=spamd argv=/usr/bin/spamc -e
   /usr/sbin/sendmail -oi -f ${sender} ${recipient}

Now reboot some stuff

$ sudo /etc/init.d/spamassassin restart
$ sudo postfix reload

Now test by sending email to yourself. If you view the full headers it should now have X-SPAM headers in it.

If you send an email with "XJSC4JDBQADN1.NSBN32IDNENGTUBE-STANDARD-ANTI-UBE-TEST-EMAILC.34X" in the body of the email, it is guaranteed to be flagged as SPAM, and is a great way to test your spam filter.

If you need postfix to listen on multiple ports (like I do) add lines like the following (replace numbers with whatever ports you desire):

In /etc/postfix/master.cf:

25        inet  n       -       -       -       -       smtpd
26        inet  n       -       -       -       -       smtpd

Make sure to open the ports in iptables as well.

Men and Ladies

posted on 2009-03-10 - amd.im/Q3Q4

Saw a couple of amusing signs for the men's and women's rooms in Chiangsu yesterday.

Identity Theft?

posted on 2009-03-10 - amd.im/vFj5

So... here's a story.

I get an email from ebay.co.uk about a person trying to register amdavidson1985 on ebay.co.uk with the email address am.davidson@gmail.com...

I knew that gmail ignores periods in email addresses so was not surprised that this went to me... but it made me curious...

Then someone tries to reset my gmail password and fortunately, my alternate email address was set to my current email so I got notified.

This made me get a bit worried... maybe someone is trying to get away with a little identity theft.

So I go to change my passwords... still all secure.

I then went back to re read all the emails... and notice that it is addressed both to amdavidson1985 and to someone's name.

So I hit up a little Facebook and find a person by the name listed in the ebay email in "West Midlands" which sounded like a Britishy place to me...

I shoot a message and a reply comes back about 10 mins later that she was registering a new ebay account with her married name, and claims that she mistyped her email address which she has been meaning to update from her maiden name to her married name... still a little fishy, but altogether a bit understandable.

The internet makes it a real small world. In less than an hour, I got notices from American companies that someone in England was trying to use my email address, and I was able to track them down from a hotel room in Shanghai.

Bottles

posted on 2009-03-09 - amd.im/ySkG

Took a picture of some bottles in a restaurant in Shenzhen the other day.

I tried out a new processing technique on the pic, more of an effort to force myself to play with curves than anything else.

BMW X5 Knock-off

posted on 2009-02-13 - amd.im/X3ku

Saw a BYD CEO cruising in Shenzhen with fake BMW X5 badges.

Those crazy Chinese car knock-offs...

Moonset over Shenzhen

posted on 2009-02-11 - amd.im/T4Ol

Shot a picture of the moon setting over Shenzhen this morning... Smoggy, smoggy morning...

I bought a Gorillapod knock-off and remote shutter release over the weekend, and when I saw the pretty color of the moon over a sky scraper this morning, I had a use for it.

I've never shot in so much haze before, so the photo turned out different that I had hoped it would, but I still thought I'd post something up.

photogriffy updated to v0.2

posted on 2009-02-10 - amd.im/pEw5

photogriffy.net was upgraged to v0.2, this is a pretty major update. I've changed the backend to be based entirely on the Flickr API. I was able to crank it all out with rails and the flickraw gem over the course of a few hours. There are still a lot of features I want to add and a bunch of formatting to do, but the site works as it stands. Rails truly is an amazing prototyping framework.

This is part of a larger update to the way I post my photos to the web. It's getting a bit scattered with some photos posted to AMDavidson.com, some to AMDavidson.me, some to Flickr, and even a few to Twitpic with very little planning or organization.

So, I'm now working towards putting everything on Flickr and then basing my other websites on that content so the content is unified between the sites and doesn't require bouncing around the web to places unknown to see it all.

Archimede Pilot Timelapse

posted on 2009-02-08 - amd.im/nJVP

I was bored in my hotel room in Shenzhen so I did a time lapse video of my watch. It came out kinda interesting, so I'm posting it here. The panning is kinda neat, but in all honesty... it was an artifact of me not using a tripod and not using mirror lockup to prevent camera vibrations... My 40D just kinda shook itself along, but it makes it a bit more interesting. The video is hosted on Vimeo, and if you click here you can see the video in HD.

Archimede Pilot T

posted on 2009-02-04 - amd.im/EdTd

Here is a shot of my new birthday present!

It's pretty sweet... Check it out!

An Archimede Pilot T watch... Automatic, Titanium, German, Obscure, Awesome, not much else I could ask for.

Thanks Naomi!

I use git for all my projects... I love the ability to commit changes when I'm on an airplane or stuck somewhere without internet access. However, I still like to be able to push my git project to a remote server for backup and accessibility, and I'm not going to pay for github. Don't get me wrong, github is fine for public projects and collaborative development, but for my personal development stuff, it's an unnecessary expense.

Well, I always forget how to setup a remote master so that I can push and pull and keep a backup on a remote server. Here are my quick notes... for a detailed explanation see Tim Lucas's tutorial.

On server:

mkdir /srv/git/whatever
git init /srv/git/whatever

On local machine:

git remote add origin ssh://host/srv/git/whatever
git push origin master

And you're all set!

Rice Thief

posted on 2009-01-29 - amd.im/qllH

I caught Addy stealing some rice on camera during Joy's birthday dinner last weekend.

mysql Gem + MacPorts MySQL

posted on 2009-01-25 - amd.im/AKfu

I always forget this... so this is as much a note for me as anything else.

Especially because I'm basically just lifting this info from here.

sudo gem install mysql -- \
--with-mysql-include=/opt/local/include/mysql5 \
--with-mysql-lib=/opt/local/lib/mysql5 \
--with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config

Despite what the linked website says, it appears that this command works on leopard just fine... no need for any changes.

LOL

posted on 2009-01-23 - amd.im/mzDU

Just a funny pic that I took over the weekend when I was chasing Adelaide around.

Wordpress Tweaks

posted on 2009-01-22 - amd.im/e3vy

Well, I spent an hour or two last night uploading a couple of plugins and playing with the CSS on the site. It's amazing what you can do with just [wordpress.org] and a couple of hours.

The theme is (heavily) based on Oulipo by Mignolo. Maybe someday I'll do my own custom theme, but for now, this'll do; I'd rather be working on my other sites.

Wordpress

posted on 2009-01-21 - amd.im/oTZU

Switched this blog from Mephisto to Wordpress, not a big migration yet, as there were only three posts to move.

Nothing against Mephisto, but I'd like to focus my efforts on my other site, and use Wordpress for this because it works well, and has a ton of plugin support to get the functionality that I want.

Froggy

posted on 2009-01-20 - amd.im/HlLO

I took the day off on MLK day and Naomi and I headed up to SF for something to do.

After driving around quite a bit with no luck finding parking, we nabbed a great spot in Golden Gate Park and headed to the California Academy of Sciences museum.

As we were leaving the rain forest exhibit, Naomi noticed a cool little frog sitting on the glass, and it was interesting how he tucked his feet underneath himself. I had never noticed or realized that frogs sit like that.

Not the most photographically rewarding photo, but an interesting shot more because of the content.

If you cannot install the nokogiri gem on ubuntu (required or recommended) for Mephisto.

You have to install two other libraries first that may or may not already be installed on your computer:

sudo apt-get install libxml2-dev libxslt1-dev

Simply installing libxml-ruby or libxml1 won't satisfy the requirements.

Thanks to hightechsorcery.com for the info.

If you have recently upgraded rails and your cron jobs for acts_as_xapian are failing with the error undefined method `cache_template_loading=' check out this rails commit.

You may have a deprecated method and need to remove the following from your config/environments/production.rb:

config.action_view.cache_template_loading            = true

andr3w.net

posted on 2009-01-18 - amd.im/yMye

Welcome to andr3w.net.

This site has a very simple purpose, in my free time I code my personal site, but that site is becoming more and more of a photoblog and less and less web development content seems relevant there (although I have always kept it to a minimum).

andr3w.net will be my second home on the web with information about my current effort with rails, (x)html, css, js, and whatever else I'm tinkering with at the time.

Check back soon for a restyling from the default Mephisto style and more content as free time allows.

Taipei 101 New Years

posted on 2009-01-15 - amd.im/9pf6

I've been driving back from the vendor for the last few days seeing Taipei 101 all lit up for the new year.

It seemed like something interesting to take a picture of and I've been meaning to get out there and do it, but haven't gotten the chance... So here's a snap from the window of my cab on the way back.

The interesting thing to note in the pic is that "2009" is written on the building. The official year in Taiwan is 98 (98 years since the start of the Republic of China).

When first coming to Taiwan, this actually was quite confusin... A random batch of six numbers often starting in 97 didn't stand out as a date to me.

Why they chose to put up 2009 on 101 is beyond me.

Old Posts Added

posted on 2009-01-13 - amd.im/TjbT

Thanks to Archive.org's Wayback Machine I found the earliest blog posts from this website that had been lost in time.

It was kinda funny seeing the site and remembering how hard it was to make, and how simple it looks now... You can see it here. Don't laugh.

Anyways the posts I added are on that page, and are now on here at:

Plum Wine

posted on 2009-01-12 - amd.im/1qny

I had some time off on Sunday, and had a concept for an album of images around Taipei.

So I went around and hit a couple areas of town that I thought would work for the images. After I got to the second site, things changed a bit and I started working on a pretty different album.

I'm trying out a few new things in this album. I don't usually head out with an album idea in mind, but I liked it, so I might try it more often.

I also don't usually process images like it, I'm trying out a new over-processed, black and white look. I don't think I'm going to use it all the time, but I kinda like it and might play with it more in the future.

Anyways, check em out: Plum Wine.

Light Trails

posted on 2009-01-11 - amd.im/Evbg

Got a little bored in my hotel room last night.

Took some shots of the light trails of the cars from my window.

It's not perfect, but I thought it was kinda neat. I had a bit of a time trying to take it as I had no tripod and this photo was a 30 second long exposure. I had to stack up nearly everything in my room to try and get a decent camera angle.

I had another idea for an album as well, and got the chance to take some pics today. I hope to have a new album together in a couple of days.

about

amdavidson.com is a simple blog run by Andrew Davidson, a manufacturing engineer with a blogging habit. He sometimes posts 140 character tidbits, shares photos, and saves links. You can also see posts dating back to 2005.

Search