PHP date() function usage and examples

by Nazly on Saturday, 19th June 2010 12:56:55

I have been coding PHP like for almost 10 years. The date() function in PHP is a widely used function in most of my apps. The application or website I’m developing will require to associate with a date at some point. When displaying a date/time it requires to be displayed in a particular format. This will be different from one app to another. So remembering each format character is quite difficult even thought I have 10 years of experience on my back. So each an every time I head to the PHP: date() Manual to find out the format character. I have had cheat sheet wallpapers as my desktop wallpaper but I still felt the PHP Manual served me better. But finally I decided to build my own reference with commonly used character combinations with their respective output to make my life much easier (not that it was difficult before) so that other PHP developers will benefit out of this as well.

Read the rest of this entry »

WordPress 3.0 “Thelonious” released

by Nazly on Friday, 18th June 2010 11:18:07

It’s the moment that most of the WordPress enthusiasts were waiting for. The release of WordPress 3.0 bring lots of new features and updates that makes WordPress a powerful CMS to build complex and powerful websites.

Arm your vuvuzelas: WordPress 3.0, the thirteenth major release of WordPress and the culmination of half a year of work by 218 contributors, is now available for download (or upgrade within your dashboard). Major new features in this release include a sexy new default theme called Twenty Ten. Read the rest of this entry »

Refresh Colombo

by Nazly on Tuesday, 15th June 2010 15:11:44

refresh-colombo-header

A bunch of tech enthusiasts have got together in organizing a meetup for the techy/geeky crowd in Colombo. It was organized in quick time and is scheduled to take place this Thursday. Its totally an informal meetup where we get to share our ideas. Most of the sessions will be much similar to a Lightning Talk. Though few topics have been chosen already, anyone will be welcome to do a lightning talk related to technology. The event is open to public and entrance is free. But your RSVP on the FB event page will help the organizers to get a head count as the seating is limited. So do drop in to meet individuals who think and act like you ;-)

Read the rest of this entry »

It’s that time I start playing football

by Nazly on Tuesday, 25th May 2010 17:58:37

It’s that time once in four years I start playing football instead of cricket. Football has never been my game, but when the Football World Cup fever gets to me, my feet auto-magically starts kicking the ball around the park. The 2010 FIFA World Cup starts on the 11th June which is like couple of weeks away. The heat has got on to all the football fans already. Even the people who have less interest in football have felt the heat after listening to the version of  “Wavin’ Flag” (The Celebration Mix) by K’Naan which has become quite a hit these days . Let it be on radio stations or even in the ring tones of mobile phones, you will hear it where ever you go. The funny thing is its not the official song, but it has reached the people and fans alike since this year’s World Cup will be played in South Africa and this version of Wavin’ Flag inspires the celebrations familiar to Africa.

Read the rest of this entry »

Eoin Morgan: Mastering the Reverse Sweep

by Nazly on Thursday, 6th May 2010 11:22:54

During the 90′s when One-Day cricket was at its peak different batsmen tried to be innovative to score runs with each an  every possible opportunity. The reverse sweep was one of them. While I cannot recall who really innovated this stroke, during the 90′s and early 2000 Damien Martyn, Jonty Rhodes and Andy Flower are few batsmen who come to my mind who mastered this stroke to score some quick runs. When Twenty20′s became popular in the late 2000, a few more innovative shots were tried by the batsmen. Kevin Pietersen’s switch hit became quite popular as a modified reverse sweep. Reverse sweeping Murali for a six using his switch hit during a Test match was the biggest moment for Pietersen. Couple sixes he smashed with his switch hit against Scott Styris in an ODI was the best I have seen him play that shot. But now the Irish-born Englishman, Eoin Morgan is mastering the art of reverse sweeping with his unique style of batting.

Read the rest of this entry »

Stats: most runs at each batting position

by Nazly on Tuesday, 27th April 2010 23:28:09

Came across an interesting question on the Ask Steven column which immediately caught my attention while reading through Cricinfo.com

The question: “Can you give the list of the people with most runs at each batting position in Tests and ODIs?”

And the answer for that question was..

Read the rest of this entry »

Batch resize/rotate photos in Nautilus

by Nazly on Saturday, 17th April 2010 23:35:08

It came as quite a surprise when I figured out that Nautilus, the file manager for the GNOME desktop actually had an extension to resize/rotate photos. I don’t do much post editing after taking photos. If any editing is required, I would normally edit it using an image editor depending on the requirement. But in most cases it doesn’t require me to resize the photos since I upload the originals to my Flickr gallery. But I wanted to upload some photos I took today to Facebook. I didn’t want to upload the originals since it had a higher resolution and the file sizes were bigger. I wanted to resize all the photos in a batch. I had a PHP script that uses GD library for this particular task which I wrote long time back. I have also used Image Magick which works like magic for operations like this. My task was simple and all it required was to resize all the photos in one go and the Nautilus Image Converter just did that with ease.

Read the rest of this entry »

Tweets via SMS: Now active for Sri Lanka

by Nazly on Friday, 2nd April 2010 14:40:41

Its official and its big. Now we can receive Tweets via SMS from the people we are following on Twitter. When you go to your Settings / Mobile page on Twitter, now you will see Sri Lanka as a country, thanks to Dialog. If you look closely there are only a few more countries has this feature enabled. Further more, posting an update to Twitter via SMS gets a boost as well. Now you don’t need to send your Tweets to the Twitter long code which is similar to sending a message to an International number which in cost wise is expensive. Now you can send your updates to the Twitter short code from your Dialog mobile which will be charged same as sending a SMS to a local number. There won’t be any charges for receiving updates via SMS. Twitter on your Mobile page has all the info about how you can activate this feature on your Dialog mobile. If you used to update Twitter via SMS using the Long Code/International number, you won’t need to do much of the changes mentioned in that page.

Read the rest of this entry »

lkgeeks.org back with new looks & ideas

by Nazly on Wednesday, 31st March 2010 14:05:53

logo

When I planned to revamp lkgeeks.org some where around the end of last year, I wanted to make it happen within a month. But things got bit dragged and new ideas came in and now I have almost taken it to the next level. The website has been re-launched. You can check the site out at www.lkgeeks.org. There is a dedicated Twitter account and a Facebook fan page to connect all the Sri Lankan geeks. A new Twitter List has been created, so the Twitter Feed on lkgeeks.org will be based on this list.

Read the rest of this entry »

Boom Boom McCullum

by Nazly on Thursday, 4th March 2010 14:38:17

I have been looking around for the highlights of Brendon McCullum’s hundred against Australia in the 2nd T20 match in the current ongoing series and have finally found it. When I watched the highlights of this match, I was stunned to see his shot selection against the Aussie pace attack. I was amazed by the number scoops he played over the keepers head against the likes of Shaun Tait who almost bowled the “fastest ball ever” in the recent series against Pakistan. The scoops came mostly in the latter part of McCullum’s innings and the two sixes he scored off the scoops after reaching the century were the best picks.

Read the rest of this entry »