Posted in Uncategorized on January 3rd, 2012 No Comments »
Two tips I gave recently to a colleague just setting out with Disqus. Q. How do I make Disqus comments visible to Google? A. Use the Javascript code snippet Disqus provide as this fetches the comments asynchronously. On your server implement a background task to fetch and cache recent comments from Disqus using the Disqus [...]
Posted in Uncategorized on October 28th, 2011 No Comments »
I need this with alarming frequency, so here it is. Accessing a remote FTP site through a proxy. ftp://remoteuser%40remotehost:remotepassword@proxyhost/folder
Posted in Uncategorized on January 14th, 2011 No Comments »
UPDATED: 7/Feb/2011 with comments from Simon Smith. I’ve seen a few examples of people trying to mimic the Google Instant search with their own solution. Most of these have just made them “instant” searches by changing $("#searchButton").click(function(){ …perform actual search… }); to $("#searchButton").keyup(function(){ …perform actual search… }); My gripe is that Instant doesn’t need to [...]
Posted in Uncategorized on December 20th, 2010 No Comments »
Just been parsing logfiles from our site generated by Akamai with analog. We use COMBINED log format on the Akamai help page, but the default COMBINED log format from analog wasn’t able to parse. Based on info from the analog log format help page the following worked. LOGFORMAT (%s – - [%d/%M/%Y:%h:%n:%j %j] “%j %r [...]
Posted in Uncategorized on July 23rd, 2010 No Comments »
Recently I was asked to investigate a site which wasn’t performing as well as expected. The initial reaction was to look at the code – perhaps our NHibernate mappings were eagerly fetching too much data, perhaps we’re not caching enough, etc. Then I stopped and remembered the database. I found that the table structure and [...]
Posted in Uncategorized on June 2nd, 2010 No Comments »
public static class FileSizeExtensions { [DllImport("Shlwapi.dll", CharSet = CharSet.Auto)] public static extern long StrFormatByteSize(long fileSize, [MarshalAs(UnmanagedType.LPTStr)] StringBuilder buffer, int bufferSize); public static string DisplayAsByteSize(this long filesize) { StringBuilder sbBuffer = new StringBuilder(20); StrFormatByteSize(filesize, sbBuffer, 20); return sbBuffer.ToString(); } }
Posted in Uncategorized on April 26th, 2010 2 Comments »
In 2008 I started running with the BBC Running Club after the squash club at work closed. Late 2009 I found I had a place in the London Marathon, and the training started. Up until that point i’d been measuring my distance in kilometres, my maximum weekly distance was 12km and my longest single run [...]
Posted in Uncategorized on March 2nd, 2010 No Comments »
Like a lot of people i’ve pondered the ‘killer app’ over a pint, but these days i’m coming to the conclusion that everything has been invented, duplicated, and cloned to death. So rather than inventing new apps, i’ve been pondering the idea of making the apps become location – or familiarity – sensitive. Combine this [...]
Posted in Uncategorized on November 2nd, 2009 No Comments »
Or, how to convert a jagged result set into a CSV from within MS SQL server (2005+): CREATE FUNCTION dbo.GetKeywordList(@VideoModuleID uniqueidentifier) RETURNS VARCHAR(Max) AS BEGIN DECLARE @csv VARCHAR(MAX) SELECT @csv = COALESCE(@csv + ‘, ‘, ”) + Term FROM keyword k INNER JOIN VideoModuleKeyword vmk ON k.id = vmk.keywordid W HERE vmk.videomoduleid=@VideoModuleID RETURN @csv END [...]
Posted in Uncategorized on February 27th, 2008 No Comments »
The recent ‘Take 2′ Apple TV update has saved the small square box under my telly from EBay. 1080p output, rental HD movies, and now streaming internet radio have given it a real lease of life. Now I realise that it’s meant to be just a media extender, but as it’s just a Mac under [...]