skip main navigation skip all navigation top
 

Code - Latest posts

 

UK Government's response to IE6 petition

A few months ago I was one of more than 6,000 people to sign a petition that asked the UK Government to encourage departments to upgrade from IE6 to better browsers.

Unfortunately, the response was as expected. Unlike other EU countries that have discouraged the use of IE6, the Government felt it necessary to fall in line with the infinite number of lazy IT departments around the company that feel that the time spending upgrading IE6 to be expensive and unnecessary.

[ read more... ]

Posted Posted by Chaz 1st August 2010 @ 20:13pm - comments 0 comments - permalink permalink

Installing PHPUnit with Terminal on OS X Snow Leopard

This article will be posted twice, this version is for version of PHP included with Snow Leopard. The next version will cover MAMP.

I've struggled with this 3 times now (twice on a Mac and once on a PC) and it's time I documented what worked for me!

With MAMP installed, I launched Terminal and typed in:

sudo pear channel-discover pear.phpunit.de



then

sudo pear channel-discover pear.symfony-project.com



and then

sudo pear install phpunit/PHPUnit



Posted Posted by Chaz 5th May 2010 @ 15:46pm - comments 0 comments - permalink permalink

gCount, a Google Code counter

As part of the Nike+PHP project, I wanted to display the download count for the project. Mainly as a badge of pride, but also as a tool I can use to gauge the popularity of the project.

Google don't offer anything like this on their own site, let alone as a widget, so I launched gCount this week.

Entering your Google Code project name will return a total download count and some JavaScript you can pop onto your website that will display the same count.

I'll post updates to [http://twitter.com/cchana]twitter[/url] if I make any enhancements and maybe even promote projects using the service!

Posted Posted by Chaz 1st April 2010 @ 08:41am - comments 0 comments - permalink permalink

Nike+PHP's new home

While the code itself still sits over on Google Code, Nike+PHP's support site now has a new look!

I've moved it onto a Wordpress platform which makes administration and updating the site easier.

Posted Posted by Chaz 11th March 2010 @ 10:10am - comments 0 comments - permalink permalink

Nike+PHP progress and branding

Version 1 or Nike+PHP has been out for a while and earlier this month I released v1.2.1.

The code has been downloaded over 100 times and I'm extremely proud of that fact! I would love to see how people are using the code, so please add to the Examples page on the wiki.

I also changed the branding for the project a little bit, but need time to work on the site, something I might do in March. The site is a little bright, something I wanted it to be, but I'll be toning it down a bit in the next refresh.

The old logo was dark, plain and, well, just boring!

image

The new one is lighter, has a bit of depth and contains the Nike logo (hope I don't get into any trouble for that!).

image

Posted Posted by Chaz 19th February 2010 @ 16:55pm - comments 0 comments - permalink permalink

Blurred text in CSS

It's possible to make text looked blurred using just CSS3. See the examples below, just hover over the first bit of text to see the possibility of using blurred text as a hover state.

Some blurred text

Some blurred text



Above, you can see some examples of blurred text in browsers that support CSS3

The trick is to change the colour of the element and either apply the text-shadow or box-shadow properties through CSS. Using the :hover pseudo-class you can create a blurred/unblurred effect

Example:


HTML:

<h1 class="blurred">Blurred text</h1>



CSS:

h1.blurred {
	color: #FFF;
}
h1.blurred:hover {
	cursor: pointer;
	color: #666!important;
	text-shadow: 0 0 5px #444;
}



The colours need to be selected carefully, as the shadows are often a bit lighter than the foreground text colour. Shadow size also plays a role. 5px seems to be effective, but 10px can wash the colour out.

To apply the effect to a block element, you'll need to use the box-shadow property instead of the text-shadow property, but otherwise it's the the same.

For more effects, you could apply opacity to make the text a little see through and see how that works out!

If you find this useful, please check out my portfolio site.

Posted Posted by Chaz 22nd December 2009 @ 15:41pm - comments 0 comments - permalink permalink

Nike+PHP a PHP class for Nike+

So I am a lover of Nike+ and have had a Nike+ stat widget on the side of my blog for quite a while now. The project can be found at http://nikeplusphp.org.

It came to my attention that the method used wasn't the easiest and certainly wasn't up to date. Looks like something changed on Nike's end and that has broken the API I was using.

Looking around for an alternative, I was inspired to build my own class and am now firmly at version 0.7 with it. I've created a small website for the project where you can grab the code and there's some documentation to help you get started.

The project is called Nike+PHP and all you need is a Nike+ account, PHP5 and SimpleXML installed.

[ read more... ]

Posted Posted by Chaz 5th October 2009 @ 09:08am - comments 0 comments - permalink permalink

PHP - deleting cookies

I had an issue where I couldn't delete cookies today. Turns out, adding the path works.

<?php
setcookie('name', 'value', time()+3600);
?>



The above would set a cookie for one hour into the future.

<?php
setcookie('name', 'value', time()-3600);
?>



The above should set a cookie for one hour into the past, making it expire and effectively deleting it. Today, this wasn't the case, but adding a path did the trick.

<?php
setcookie('name', 'value', time()+3600, '/');
?>



The above sets it for an hour and for the whole domain. Adding the '/' to both the setting and expiring did the trick!


Posted Posted by Chaz 25th August 2009 @ 11:19am - comments 0 comments - permalink permalink

Photos from FOWD

I've been uploading some photos throughout the day here at FOWD. Take a look at the slideshow below, or check out my Flickr set.



As we speak only photos I could Bluetooth to my phone have been added, will upload some more from my More photos added from my minimo later!

Posted Posted by Chaz 30th April 2009 @ 16:11pm - comments 0 comments - permalink permalink

FOWD 2009, I'm going and I can't wait! :)

Tomorrow is the Future Of Web Design conference and I really can't wait to go!

There are a few topics I'll be really interested in and I am looking forward to learning lots more about the industry and where things are headed.

I'm still debating, but I think I'll be taking my laptop. All I'll be doing is taking notes, but I'll have my iPod and hopefully there'll be wifi so I'll be able to check in on emails too!

Posted Posted by Chaz 29th April 2009 @ 20:02pm - comments 0 comments - permalink permalink

Charanjit Chana BSc

My very own blog that covers a wide range of topics. I'm a web developer by day, and by night, behind the projects Nike+PHP and receeve.it

Search

Categories

Tags

See all tags

Social networks

Nike+

Links

Advertisements