Blog

Sorting two dimensional array like query result by sub array's key in PHP

Blog
PHP

PHP offers dozens of functions for sorting arrays, but unfortualey non of this functions support sorting by sub-key's value out of the box. It's very useful when you want to sort the result of a query by an specific column.

Sample :

3
Your rating: None Average: 3 (3 votes)

How to mirror/sync a remote ftp folder with a local folder

Blog
Linux
Sys Administration

lftp is one of the best utilities currently avaiable for working with ftp servers.

2.53846
Your rating: None Average: 2.5 (13 votes)

How to find Linux bash script path (Self Path)

Blog
Linux
Sys Administration

Writing smart programs using bash script is not easy, there are many issues along the way and one of them is what i'm going to describe here.

Sometimes it's require for bash scripts to know their location, for example when they are part of a package and there are other require files (on the same location) for them to run properly, and it's also not possible to change the path to where they're located simply because they also need the current directory.

1.75
Your rating: None Average: 1.8 (4 votes)

Drupal's Acquia Marina Theme patched version!

Blog
Drupal

In Drupal it's possible to overwrite and extend a theme using sub-themes! So i usually create a custom theme for my site as a sub-Theme of a base theme and try to put all the site specific stuff to that theme instead of the base theme, although it's tricky! and sometimes i have to spend hours finding a workaround for not completely implemented sub themming features but i think it worth it.

2.142855
Your rating: None Average: 2.1 (7 votes)

Get the latest Linux Kernel news in the simplest way

Blog
Linux

Linux Kernel is the heart of the opensource movement, because it allows users to have a complete open source operating system. With every release it brings lots of cool new features to the Linux community. Although it's very important piece of software, propely the more important the any other software in open source community it's unknown to many users. The are two reasons for this.

1.19277
Your rating: None Average: 1.2 (83 votes)

PHP's forward compatible version compare

Blog
PHP
Programming

Sometimes the code is forward compatible, for example when it's compatible with all future PHP5 releases, put PHP's version_compare function does not support this (Perhaps because they know that they always break compatibility with every minor release!!!). This function supports .x, for the above example it's : 5.x

It's also shared here

0
Your rating: None

Unix like smart recursive file/folder copy function for PHP

Blog
PHP

PHP's file system manipulation functions are not as complete as they should be specially when it comes to manging recursive folders. For addressing part of this issue i decided to write a smart function which can handle recursive file/folder copy easily.

As you may have noticed there are feature that i didn't have time to implement , so if you have time to extend this function please notify me as well :). It's also shared here

1.92857
Your rating: None Average: 1.9 (28 votes)

Alpha support for PHP's imagecopymerge function

Blog
PHP
Programming

I've just checked PHP's issue tracker and a core developer says that this function (imagecopymerge) was never meant to support alpha channel! and they refused to commit the provided patch! so ridicules Anyway i tried rodrigo's workaround and it worked quite well, thanks rodrigo for sharing it. I came up with another idea which is much faster than his solution, (it may need a little bit more memory)

3.75
Your rating: None Average: 3.8 (4 votes)

My favorite quote in "I AM Legend" (The Movie)

Blog

He had this idea. It was kind of a virologist idea. He believed that you could cure racism and hate... literally cure it, by injecting music and love into people's lives. When he was scheduled to perform at a peace rally, a gunman came to his house and shot him down. Two days later he walked out on that stage and sang.

1.038095
Your rating: None Average: 1 (105 votes)

"Ergonomic Computing" research project updated and also renamed to "Ergonomic Office"

Blog

What's new in this revision :

Content is now categorized and new information about ergonomic chairs and a special section for programmers added.

See for yourself : Ergonomic Office

0
Your rating: None