technology

SPAM, a measure of success

I've had to move alexstanhope.com from a Math Captcha to an image one as unfortunately this site started getting SPAM'd. It seems that those pseky robots can do rudimentary mathematics, but I'm hoping they can't yet read wobbly text! On the plus side some great (real) comments coming through too thank you.

Dropping MYSQL tables that contain FOREIGN KEYS

I was patching CiviCRM earlier on when I needed to flash the existing database with a new snapshot. The snapshot SQL performs a progressive sweep of the database, using sequential:


DROP IF EXISTS <table name>
CREATE...
INSERT...

The problem is that some tables contain explicit FOREIGN KEY references to others. When the referred to tables are dropped before the referring tables, that violates the foreign key constraint.

The solution is to ignore the constraints during the drop operation using:


SET FOREIGN_KEY_CHECKS = 0;

Executing multiple programs with one single windows shortcut

An alternative title might be "How to write a simple batch file to make Google Calendar Sync run at the same time as Outlook".

Create a text file (.txt). Use this syntax:

@ECHO OFF
rem Outlook
cd "C:\Program Files\Microsoft Office\Office12"
start "" "C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE" /recycle
rem Google Outlook sync
cd "C:\Program Files\Google\Google Calendar Sync"
start "" "C:\Program Files\Google\Google Calendar Sync\GoogleCalendarSync.exe"
EXIT

svn+ssh, secure version control

I have a Mac Mini which I keep connected to the Internet. In this world of DoS attacks and port sniffing, exposing ports to the Internet at large is risky. Yesterday I turned off HTTP (80), which was being used to allow access to mod_dav_svn, and migrated my systems to SVN over SSH. This has the advantage of only requiring the server machine to expose SSH (22).

The setup was quite involved.

Creating panoramic images in Adobe Photoshop CS3

  1. Open the images as separate layers into one single canvas using File -< Scripts -< Load files into stack.
  2. Select then align the layers using Edit -> Auto-align layers. This process takes a while but it's pretty effective in yielding a rough canvas of overlapping warped images.
  3. There are often a few frames which Photoshop couldn't align. I'm currently trying to find a way to resolve this particular problem.
  4. Finally Select Edit -> Auto-Blend to produce the final image.

How to embed a really simple Flickr slideshow in a Drupal blog

Really simple process:
  • Upload photos to Flick
  • View photoset
  • Click 'Slideshow' in top right hand corner
  • In slideshow view, click 'Share'
  • Cut/copy 'embed' code
  • Paste into Drupal node
  • Select Input Format 'Full HTML', or whitelist the necessary object tags for one of your existing formats
Here's a demo of what it looks like: A wander around Austin, Texas

Good reason to call jQuery.width() and not jQuery.css('width')

I've been experimenting with Chrys Bader's AutoGrow plugin for jQuery. Great stuff and I used the principal (dummy div to read textarea's height) in Free Range Feedback.

I found a minor bug relating to the use of .css('width') instead of .width(). I filed a bug report if you'd like a more detailed explanation of why to use the latter over the former.

Automated 'solutions' are changing the social media landscape

When it becomes possible to automatically build a Twitter profile with 100,000 followers, is the value of the medium compromised?

I would suggest no, but perhaps we will stop putting sway in the number of followers a person has and instead assess them by the quality of their tweets. The instant you introduce a metric to measure the impact of anything, be it a web page's importance (PageRank) or a Twitter's relevance (Followers), people will subvert the system to their advantage.

More troubles with NOD32 AV4

I haven't had a great experience of NOD32 with Windows 7. This antivirus software performed great Windows XP, meeting all my expectations (lightweight, fast, inexpensive, updated frequently and kept me virus free).

This week I've been getting Security Exceptions in Firefox and Dropbox hasn't been able to connect to its server. The cause? NOD32 protecting SSL channels (e.g. HTTPS). In the end I went to 'Advanced settings' and disabled:

  • Enable Antivirus and antispyware protection
  • Enable Anti-Stealth technology
  • Enable Self-Protection

Media Player Classic Home Cinema (MPC-HC) built from source on Windows 7

I've just checked out (using SVN) and built the latest source of Media Player Classic Home Cinema using Visual Studio 2008. The instructions were good, but I had to make a few modifications.

I followed instructions at:
http://sourceforge.net/apps/trac/mpc-hc/wiki/How_to_compile_the_MPC

Except
Part A.3
Didn't explicitly install ATL update. I suspect it was covered in Windows Update (by 30/12/2009).

Part B
Installed in-a-box version of MinGW from:


Alex Stanhope is a Technology consultant to the UK Creative Industries and Venture Catalyst. This is my personal website.
Bristol | Lightenna | ManKind Project | goodkarma
All material copyright (c) 2006-2010 | Website by Lightenna, featuring N.Design's GlossyBlue theme.
Syndicate content