January 2012
7 posts
I Heart Chaos: Fun with math: Dividing one by... →
iheartchaos:
There’s all sorts of magic to be had with numbers, and many mathematicians have made entire careers in finding these little tricks that are mostly useless, but fun anyway. Unfortunately, a lot of calculators are going to truncate the results of this trick, but if you manage to get a hold of…
3 tags
Never to be caught out again...
Posting this here so as to reinforce my memory, so I never miss this again.
LINQ errors that make no sense and the build error: “Cannot convert lambda expression to type ‘string’ because it is not a delegate type” = missing “using System.Linq;”
3 tags
First look: Bitcasa Infinite Storage
I just got an invite to Bitcasa today, so I used it to sign up and get my infinite storage and got 10 invites to share (below).
Installed fine on both OSX (beta) and Windows (alpha), although I’d say the Windows installer needs cleaning up a bit, as it launches two separate installers (MS C++ redist and Doken).
To upload your files to Bitcasa, you just right click a folder and select...
2 tags
Adding a minimum length constraint in SQL Server
This might seem fairly obvious, but using Len(ColumnName) can give unexpected results, as it returns the number of characters in a string instead of the number of bytes, i.e. it trims the text before it counts the characters. More details on that here.
To create a minimum length constraint, open up your table, right click Constraints and select New Constraint. Then enter something...
1 tag
Crunch.co.uk referral code
We’ve been using Crunch Accounting for the last 3 months and I think they’re great.
If you use code skweejr9uv when you sign up, you and I will both get £25 in Amazon vouchers.
3 tags
SQL Server 2005 maintenance plan fails and service...
I needed to setup a maintenance plan for a client to backup their databases and remove backups older than 4 weeks. They run SQL Server 2005, so I created the maintenance plan with a Back Up Database Task and a Maintenance Cleanup Task to remove the old backups, which is straightforward enough. When I tried to test it however I got the error: “Unable to start execution of step 1 (reason:...
December 2011
5 posts
4 tags
Creating an 'elite' highly anonymous proxy with...
This is a simple guide on how to setup a Debian VM for use as an ‘elite’ web proxy. There are 3 types of web proxy server and what type they are basically just comes down to which HTTP Headers they include about who you are.
Transparent Proxy
REMOTE_ADDR: Proxy IP address HTTP_VIA: Proxy IP address/hostname and details - e.g. 1.1 proxy1.mydomain.net:3128 (squid/2.7.STABLE9) ...
5 tags
Fixing Tumblr Connection Reset Problems With...
Since I’ve moved this site to Tumblr, Chrome has been giving me ERR_CONNECTION_RESET errors when trying to access it, forcing me to refresh a few times to get it to load. IE and Firefox were also telling me ‘The Connection Was Reset’. I also noticed a query-string being added to the URL, but I didn’t get to the bottom of that. I’ve just moved the DNS for this domain...
6 tags
An easy way to copy your ssh public key to a...
Here is a good little tip to save you some time uploading your public key to a remote host (tested to work on OSX Lion).
ssh-copy-id copies your key up to a remote host (via ssh with your password) and even assigns the correct permission to home, ~/.ssh, and ~/.ssh/authorized_keys directories for you.
For some reason it doesn’t ship with OSX, but you can just copy it from your remote linux...
5 tags
LMIRfsClientNP.dll is not a valid windows image
I had to logon to a client’s computer today to have a look at an issue with some software I’d created. They have LogMeIn on all their computers and I got the error “LMIRfsClientNP.dll is not a valid windows image” when I logged on. I fairly quickly found that this is caused by LogMeIn itself. So I connected to their VPN, then RDP’d in to the problematic PC,...
November 2011
4 posts
6 tags
Black Screen After Updating Battlefield 3
EA released an update today which fixes a problem with black screens at start-up. After it updated however, I started getting black screens when I tried to enter a multi-player game. It took me a while until I found a post on a French blog that explained that if you bought the Russian language version for a lot cheaper like me, the update broke the files we installed to change it to English and...
10 tags
Throttling internet bandwidth in OSX
This is useful for testing the effect of slow connections on mobile apps in the development emulators.
It uses IPFirewall rules to limit connections from your computer to the web (on TCP port 80) to 15KB per second (or any number you choose). Fire up the terminal and enter…
sudo ipfw pipe 1 config bw 15KByte/s
sudo ipfw add 1 pipe 1 src-port 80
Just make sure you remember to remove the...
10 tags
Bassdrive Windows Phone 7 Mango (WP7) App
When I got my Windows 7 Phone a few months ago, I started playing around with a few things to see what it could do and what the SDK was like. A little while later I was listening to Bassdrive and I thought I’d see how quickly I could make an app similar to the iOS version I use on my iPhone. I spent an evening on it at first, a few months ago now and tonight I’ve just got around to...
5 tags
Getting an Alexa Rank programmatically in C#
As part of a project I’m working on, I needed to lookup the Alexa Traffic Rank for a domain programmatically. I found the URL the toolbar uses and wrote function to parse the XML and return the value, which I thought I’d share in case it saves someone else 15 minutes of their life…
private int GetAlexaRank(string domain)
{
var alexaRank = 0;
try
{
var url =...
October 2011
9 posts
7 tags
MJ12bot and blocking web crawlers with IIS 7
Our web servers were recently getting hit pretty hard by web crawler bots that simply ignore your Robots.txt file. We were getting hit especially hard by a bot called MJ12bot, which is supposed to be for a distributed search engine which they say lives in an alpha state at search.majestic12.co.uk (at the time of writing that is down). It seems they get people to run their SETI@Home like software...
5 tags
Free Agent
I’ve been using Free Agent for about 3 weeks now and it’s changed a lot of things about the way I work for the better. I can see why everyone waxes lyrical about it. If you are a sole trader, freelancer or limited company, it basically rocks. I have been using Billings for the last 2 years and while it’s great for doing invoicing, that’s basically all it does. It also...
6 tags
Redirecting www.* subdomain to the root domain in...
Having your site available on www.yourdomain.com and yourdomain.com isn’t good for your SEO as it splits the domain authority. You can use the Google Webmaster Tools to specify which domain Google should use, but you should also redirect on the site itself. You can do this in your web.config directly, but IIS has a module to do it for you. Redirecting from a sub-domain in IIS 7 is really...
4 tags
3 tags
5 tags
HttpWebRequest causes...
When using HttpWebRequest asynchronously in a Windows Phone 7 app, the console in Visual Studio was outputting:
A first chance exception of type 'System.NotSupportedException' occurred in System.Windows.dll
The fix was basically adding AllowReadStreamBuffering = true to the HttpWebRequest object. For example:
var request = HttpWebRequest.CreateHttp(feed.Url);
request.AllowReadStreamBuffering =...
Goodbye Delicious
Well, I’ve been trying to give the new Delicious.com site a go since Yahoo! sold them to AVOS, but frankly, it’s shit…
It’s slow, there is no auto-complete on the tags (why would they get rid of that simple but vital feature?), but the straw that broke the camels back was finding out that clicking the Chrome extension button it saves the link regardless of if you press...
7 tags
Making BackgroundAudioPlayer on Windows Phone 7...
Starting with the Microsoft example code for the Background Audio Player, it was less than obvious how to make it work with a Shoutcast stream. If you go to a Shoutcast stream with using a standard HTTP GET request (i.e. from a web browser), you’ll get a web page, giving some details on the stream. The trick to making it actually stream the audio is adding a slash then a semi-colon followed...
2 tags
September 2011
5 posts
3 tags
Free Spotify invites
I’ve been a paying subscriber of Spotify since it launched here in the UK. I get invites each month and haven’t used any since you stopped needing one to subscribe here in the UK. Anyway, because of this, I’ve ended up with a around 50 invites going spare. I gather they’re still fairly hard to come by in the States.
Here are a few:
dkDpEYfyLLq7RgLH
cZVuZaac6FhAfAEu
bJtUbY5ZMecb9Uqh
...
2 tags
Bassdrive - Drum & Bass Internet Radio
I’ve been listening to Bassdrive.com, which is a Drum & Bass Internet radio station, on and off for a few months, but this week I’ve almost not stopped listening to it. I wanted to write a post about it as I think it’s the most consistently high quality Internet radio station I’ve ever come across. Unlike other stations, which just play recorded sets or an automatic...
6 tags
5 tags
5 tags
iPhone Football News from Kick News →