Click to search Andy Jarrett.co.uk RSS feed

Loading Twitter

My desktop

After reading forgetfoo.com recent post he reminded me that it is always pretty cool to check out other peoples desktop and see their setup/apps they are using (check out the Homesite logo in forgetfoo.com's screen grab!). Anyway heres mine, whats yours like?

My current desktop

Comments Comments (1) | Print Print | Send Send | 1234 Views

Pure CSS3 post it note

I've been ill the last couple of days which meant I couldn't really focus on anything too heavy. So with being awake half the night I thought I should just play around CSS3 and it didn't take long till I came up with a pure CSS3 Post-it note made with no images. The only extra library I have used in this demo is Google Fonts for the script text. Code after the note:

Back soon!


view plain print about
1<link href=' http://fonts.googleapis.com/css?family=Reenie+Beanie' rel='stylesheet' type='text/css'>
2<style>
3p.postit a{
4    color: black;
5    font-family: 'Reenie Beanie', arial, serif;
6    font-size:50px;
7    text-decoration:none;
8    text-shadow: 3px 3px 3px #AAA; }
9
10p.postit {
11    margin:100px auto;
12    text-align:center;
13    width:750px; }
14
15p.postit{
16    border:1px solid yellow;
17    height:300px;
18    line-height:300px;
19    width:400px;
20    background-color: rgba(60, 132, 198, 0.8);
21    background-image: -webkit-gradient(linear, 0% 0%, 0% 90%, from(#FFFAAE), to(#FFF057));
22    background-image: -moz-linear-gradient(#FFFAAE 0%, #FFF057 90%);
23    border-top-color: #FFF057;
24    border-right-color: #FFF057;
25    border-bottom-color: #FFF057;
26    border-left-color: #FFF057;
27    -webkit-box-shadow: #AAA 0px 10px 16px;
28    -moz-box-shadow: #AAA 0px 10px 16px; /* FF 3.5+ */}
29</style>
30<p class="postit">
31<a href="http://www.andyjarrett.com/blog" title="Andy Jarretts Blog">Back soon!</a>
32</p>

Quick discaimer - I have no ideas which browsers this works in. All I can tell you is that it looks good in Chrome and Safari!

Comments Comments (3) | Print Print | Send Send | 2106 Views

Blocking recent comment spam

There are a ton of ways to stop spam on blogs. This is my dirty (and not pretty) solution that I am adding to stop the recent wave of crap that is getting through the front end checks.

The long term plan is to put a back-end on this but for now here is v.00001

view plain print about
1<!--- Seperate with a pipe "|" as this is a regex list --->
2<cfset commentBlacklist = "coachoutletmall|wowgold" />
3<!---
4All the fields that we are going to check.
5Don't really need to check the email field as its not displayed.
6--->

7<cfset checkFields =trim(form.name) & trim(form.email) & trim(form.website) & trim(form.comments) />
8<!--- reFind to check the fields as they are past the other rules i.e. captcha --->
9<cfif reFindNoCase("#commentBlacklist#", checkFields, 1) >
10<cfoutput>Sorry deadbeat, I don't allow comment spam. If you feel you were wrongly blacklisted
11<a href="http://www.andyjarrett.com/blog/page.cfm/Contact-Me">Contact Me</a>
12</cfoutput>
13<cfabort>
14</cfif>

n.b. If you are on BlogCFC then this is for addcomment.cfm

Comments Comments (8) | Print Print | Send Send | 2270 Views

Don't sell me 500mb/month limit and tell me its good

O2 are putting in a low, 500mb a month (thats around 16mb a day, don't forget that!), limit for mobile data and their excuse reason is:

"We don't think it's fair that the many should subsidise the behaviour of the few, and we think that we have a responsility to our customers to address this kind of imbalance." ... "97% of our smartphone customers currently use less than 500MB of data every month"

To me that actually says "3% of our users are causing such a strain on our network everyone needs to pay the price"

You can argue that some people might only use 200mb/month and thats fine, but thats what they are using today! As core functionality like "facetime" (which Nokia and a lot of other phones had before it was "new") and HD video become the norm this is going to go up, quickly!

Lets put 16mb per day in to context. Using typical examples from O2 this is how it breaks down:

Usage per day!
YouTube video (4.5 mins) 2 videos
Music track download low quality) 1.6 trakcs! If you use spotify premium or last.fm. BOOM!
Basic web page (100KB) 166. Facebook before you login is 86 KB
Rich web page (300KB) 50. My twitter.com page is 246KB so that is 50 page refreshes

When you look at these figure and think, "I won't look at 166 basic web pages a day" just remember you need to include all the other apps which are also using your bandwidth like emails and push services. Start going in to a app like Dropbox and pulling up that PDF then thats your daily limit gone quite quickly.

I'm not just saying "give me unlimited". I'm not stupid. "Network resources are finite. You can't offer infinite consumption of finite resources". All I am saying is find out why these 3% are using 1Gb a month (or more) and see what needs to change there. It might be as simple as the 3% are jailbreaking their phones to tether to their machines. In which case they are breaking the TOC so dump them.

I don't know the right answer here, but 500mb is the wrong one! Before we commit to anything as users we need to know some basic information:

  1. over the last 12 month have I even come close to the 500mb limit?
  2. can i put a restriction in place to physically stop me from going over the limit?
  3. how well (and accurately) will this be reported to me? (And don't say by text message as that uses the precious, buckling, network that we are trying to protect)? *there is sarcasm in there*

Update: Once you hit your limit your data speed will slow down. You will not be charged more. Which is nice!

Comments Comments (3) | Print Print | Send Send | 2106 Views

Multiple Skype accounts

This isn't really a Skype or Mac specific solution but a general *nix way of running two instances of one program. You will need another account on your machine so if you haven't got one create that now. I haven't played around with the permissions on the second user to see what works but I am assuming they would need admin rights (open to feedback on that).

From the terminal:
view plain print about
1$ sudo su - [your other username]
2$ /Applications/Skype.app/Contents/MacOS/Skype

This should launch a second Skype app but remember you are logged in as them! This mean for example that if you download a file it will go in to that users Download folder NOT yours! Of course if you are doing this regulary enough you could wrap it up in a shell script to make life easier

Comments Comments (0) | Print Print | Send Send | 1865 Views

Why no one feels bad for the music industry

Posted on Twitter by RobRohan This image pretty much sums up how much influence the entertainment industry(corporations) have over legal systems.

What is important here is that both highlighted stories are about compensation for loss but somehow uploading a music single is the worse act over death of a person in an air accident. If organisations like RIAA took the money and time they spend on suing people and getting government legislations through on innovative ways of getting the music out to people then everyone would benefit ... surely

Comments Comments (6) | Print Print | Send Send | 1106 Views

The squirrel has left the building

Neil Middleton has turned off his ColdFusion/Flex/Flash feed aggregator, Feed-Squirrel which has been up and running for near 4 years.

You can read all the details in his post, I just wanted to help pass on the news for the community.

Don't forget to turn off your automated ping'ing if you were aggregated by the site

Comments Comments (0) | Print Print | Send Send | 1349 Views

Changing BlogCFC's comment approval

One little thing thats bugged me with BlogCFC with moderated comments is the need to go from List > View Comment < back to list to approve. Silly I know but still ... So I've added the following on the comment.cfm page in the admin section

view plain print about
1<input type="button" name="approve" value="Approve" onclick="location.href='#application.rooturl#/admin/moderate.cfm?approve=#comment.id#'" />

All this does is add the button "Approve" to the view comment page to smooth out the flow of the process

Comments Comments (3) | Print Print | Send Send | 1425 Views

Changing the jQuery location for BlogCFC

Another title for this post could be adding a property to BlogCFC. Basically I wanted to leverage Googles ajax API rather than use a local version of the jQuery library. There are a couple of reason for this such as distributed CDN delivery, better caching on the users machine etc, actually you might want to read this post to understand why you would want to do this at all.

Back to adding a property.

  1. We're going to edit the blog.ini.cfm (settings) file in org/camden/blog and add the following
    view plain print about
    1#jQueryLocation=http://{Your Blog URL}/includes/jquery.min.js
    2jqueryLocation=https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
    The first line is there for redundancy incase you need to test something locally or you are on a closed system with no web access. The second line is what we are insterested in for this post and points to Googles Ajax Library
  2. In Blog.cfc in org/camden/blog add the following to (around) line 101. It should be obvious where its going
    view plain print about
    1<cfset instance.jquerylocation = variables.utils.configParam(variables.cfgFile, arguments.name, "jquerylocation")>
  3. Finally in your Layout.cfm under tags/ change:
    view plain print about
    1<script type="text/javascript" src="#application.rooturl#/includes/jquery.min.js"></script>

    to the following

    view plain print about
    1<script type="text/javascript" src="#application.blog.getProperty("jquerylocation")#"></script>

At this point we are pretty much done in terms of getting done what we set out to do. The following bit of code adds the new setting to the admin pages so we can edit this in the future. What I explain next will add the jQuery location field to the settings.cfm in admin/

  1. Around line 91 the variable "keylist" is set. Add to the end "jqueryLocation"
  2. Find in the form where the "blogurl" is set and underneath add the following
    view plain print about
    1<tr>
    2<td align="right">jQuery Location:</td>
    3<td><input type="text" name="jqueryLocation" value="#form.jqueryLocation#" class="txtField" maxlength="255"></td>
    4</tr>
  3. The final part is the validation rule. All I am doing is checking the value given is a valid URL. You could expand on this but for my purposes this will do just fine. Look for <cfif structKeyExists(form, "save")> which is the start of the validation, go down a few lines and among the other rules add
    view plain print about
    1<cfif NOT reFind("https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?", form.jqueryLocation)>
    2<cfset arrayAppend(errors, "Your jQuery location must be a valid URL.")>
    3</cfif>
Thats it, you're done now. Going to your settings and updating them will remove the commented out line we added in point one earlier but with a method to easily edit the location this shouldn't be a problem now

Comments Comments (0) | Print Print | Send Send | 1493 Views

Ive gone from Wordpress back to BlogCFC. Woohoo!

Around last May 2009 I moved my blog away from CF to Wordpress (PHP), the main reason was for the bloggin tools i.e. iPhone app etc, plus the skinning was easy as dropping a folder on your server. Well over the holiday break I've moved back to BlogCFC. Theres are a few reasons which I thought were worth putting a blog post together:

  1. I was never happy with Wordpress. Thats not to say its not a great blogging software/platform but I had a few issues with plugins and skins which meant either digging into rights management or even editing PHP(UCK!). The reason for moving to Wordpress after-all was because I didn't want to think about maintaining my blogs code.
    Yes the iphone app was good to have but I didn't use it as much as I thought I would and it wasn't as good as I imagined it being, so this ended up being a mute point anyway.
  2. Next I thought why even host my own blog and I looked around at the likes of Posterous which I know of some CF devs have moved over too. It seemed a neat blogging tool again, email your posts in etc, but then I didn't like handy over all of my data to a third party plus what if they vanished over night or simply the data got corrupted.
So here I am back on BlogCFC again. Skinning the blog myself and hacking away with it and already got some idea's which I want to submit to the project which has got me excited about blogging again. Having a CF blog means that I have somewhere to test code and ideas. Plus if I want the features I see in other tools it gives me a way to give back to the community.

Comments Comments (5) | Print Print | Send Send | 924 Views

Im on twitter

This isn't new news to anyone but I thought I should still mention it.

I was catching up on an old CFHour() podcast while driving on my commute to the office and back today when one of the Q&A sessions asked whether a ColdFusion'er should blog (they should!). It did make me think about myself and why I don't blog as much recently.

I've been blogging in some form or another for some years now but over the last couple of years my posts have dwindled. Not because I have lost interest, since Railo went open source I now host my own server, but because I've been busy with my main work either doing development which is trivial or stuff that's has been blogged about elsewhere. That is not to say I don't come across new issues & fixes but when I do I'm on Twitter talking about them nowadays.

I do plan to pick up the blogging as I have quite a few little sidelines projects which I hope to bring up at some point but till then make sure follow me at www.twitter.com/andyj

Comments Comments (0) | Print Print | Send Send | 279 Views

Detect when a cat is on your keyboard

Daisy, my 16 week old kitten has a tendency to jump and sit on my keyboard often shutting down programs, renaming files & folders to say the least. After googling a solution I found Cat Nip

a program which, while running, detects “cat-like typing” and locks the keyboard, usually in under a half second. Optionally, CatNip will fade your desktop and display a warning message to your cat (which is of dubious value, since if your cat can read, your cat can probably type, too).

There are mixed reports about whether Cat Nip works on Leopard, but for me so-far-so-good

Comments Comments (2) | Print Print | Send Send | 412 Views

Moved to Wordpress

I've been looking at Wordpress for sometime and figured why not take the jump. There's a couple of reason for the move but mainly its the amount of tools, plug-ins, code etc out there for you.

So give me a while to settle in and everything should be back to normal :)

Comments Comments (5) | Print Print | Send Send | 225 Views

My blog has moved

Please update your bookmarks and feeds for my site.

I now have a Mango Blog at:

http://www.andyjarrett.com/blog

Feed URL: http://feeds.feedburner.com/andyjarrett

Comments Comments (0) | Print Print | Send Send | 1261 Views

my 1001 post

This morning I was randomly checking my blog stats which I haven't done for ages and found out my previous post was my 1000th!!! So with that I thought I should publish a few more stats for those interested, because I didn't even realise that this had been running for nearly 6 years!

Total Number of Entries: 1000 (1001 including this one)
First Entry: 09/28/03
Last Entry: 04/21/09
You have been blogging for: 2031 days
Total Comments: 786
Total Views: 1680372
Average Views Per Entry: 1680.37

Comments Comments (3) | Print Print | Send Send | 883 Views

This charming scene may look harmless

The charming scene may look harmless

Follow The Pirate Bay on trial tags, #spectrial to learn more.

Comments Comments (0) | Print Print | Send Send | 1288 Views

AddThis button added to my BlogCFC code

I've modified my BlogCFC code a little today. Instead of having the usual Digg/Delicious bookmark links I've swapped them for a Add This button add this which is apparently the #1 bookmarking and sharing button on the Internet.

You need to sign up for a free account but this is only to allow tracking and stats that you view.

When you create your button there is no need to really change the code as its picks up the page URL. But if you want to specify an alternate URL because you want to have the button multiple times on one page then you need to use the addthis_url and addthis_title variables (e.g. addthis_url='http://www.andyjarrett.com/andy/blog/alternate-page.html';).

Below is the code I'm using for BlogCFC. All I've done is removed the Digg and Delicious links in the index.cfm template and replaced it with with the following:

view plain print about
1<!-- AddThis Button BEGIN -->
2<script type="text/javascript">
3    addthis_pub = 'andyj';
4    addthis_url = '#application.blog.makeLink(id)#';
5    addthis_title = '#application.blog.getProperty("blogTitle")#:#title#';
6</script>
7<a href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/button1-addthis.gif" width="125" height="16" border="0" alt="" /></a><script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script>
8<!-- AddThis Button END -->

Comments Comments (1) | Print Print | Send Send | 3001 Views

Codeweavers offer there software for free (today only)

Codeweavers gave President Bush a challenge to meet at least one of several goals before he left office. One of these goals was to lower gas prices in the Twin Cities below $2.79 a gallon. Since this has now happened (though I doubt Bush had anything really to do with it, it was more Opex) they are offering their software for free, today (28th October).

At the time of writing this though Slashdot and Digg seems to of brought codeweavers.com, but thats not stopping them. You can still register your email address for a free serial and fully unlocked builds of CrossOver Mac Pro, CrossOver Games Mac, CrossOver Linux Pro, and CrossOver Games Linux are available as well.

Found via (Slashdot)

Comments Comments (0) | Print Print | Send Send | 1681 Views

UK file sharers getting clamped down on

If you don't know already the UK is taking its orders from the music industry in terms to clamp down on file-sharers. The big six, BT, Virgin, Orange, Tiscali, BSkyB and Carphone Warehouse have all signed up for the proposed "three-strikes" system. In short, after a couple of letters you're going to be in trouble.

Up to now UK ISP's have had the stance of we supply the network we don't care what our users do, we're not the police. Part of this comes from the Human Rights law that we sit under that provides a degree of privacy in our communications.

But what bothers me the most with this is that the pressure is actually coming via the Government, and its them whom are actually telling the ISP's what to do. Now if its illegal, its illegal I get it. But shouldn't the Government be putting more energy into getting ISP to track terror chatter, child porn, sales of drugs etc. I can't see how a multi-billion pound/dollar industry is more of a "serious" issue to them. The music industry needs to stop looking at laws and wasting Government resource and use a little fresh initiative and ideas to prevent the file sharing in the first place.

Read more on this at here and here

Comments Comments (1) | Print Print | Send Send | 1705 Views

Fridays Joke: Teachers and educators

Another week has passed and I still haven't gotten back into the swing of blogging and keeping up-to-date. I've also just realised that I am way behind on the ColdFusion Weekly podcasts, D'oh. But the biggest news I missed out on is the free open source BlueDragon edition. This should change the landscape for ColdFusion, and also giving no-one the excuse of CF being "to expensive". Now if we could start knocking out cheap hosting options like PHP has then CF will have an even stronger future.

Anyway, I suppose you're here for the joke, enjoy!

According to a news report, a certain private school in Washington recently was faced with a unique problem. A number of 12-year-old girls were beginning to use lipstick and would put it on in the bathroom. That was fine, but after they put on their lipstick they would press their lips to the mirror leaving dozens of little lip prints.

[More]

Comments Comments (0) | Print Print | Send Send | 2272 Views

More Entries

BlogCFC by Raymond Camden + Twitter @AndyJ + ColdFusion jobs + Contact Me + Snippets/Downloads + RSS .