• t
  • g
  • B
  • Z
  • @
  • e

portfolio & blog of senior web developer, Fahd Murtaza



  • About
  • Portfolio
  • WordPress
  • CV
  • Blog
  • Contact

  • About
  • Portfolio
  • WordPress
  • CV
  • Blog
  • Contact

Vote for change, vote for Pakistan Tehreek-e-Insaf

May 10th, 2013 by Fahd

Never in my life, have I been interested in politics. But today, I feel no shame admitting that I cried like anything while thinking of my country’s future. I know sharing posts on facebook might not bring the change I want, but thats the best I could do while being outside of Pakistan.

Dear countrymen, I humbly request you to vote for change. Vote for the Tsunami which will clean up all corrupt establishments. Vote for the ‘bat’ that strikes all the dirty balls ( pun intended).

پھر نہ کہنا ہمیں خبر نہ ہوئی

Posted in Pakistan

1 Comment

Using magento translation functions in an any external php application

April 15th, 2013 by Fahd

Here is the code for the function which takes the string to be translated and returns the tranlsated string as per current locale settings. It assumes that you have included that mage.php with the correct path require_once(‘/app/Mage.php’); in the same file above the function

 function _et($to_translate){ 
	global $language;
	Mage::app();	
	Mage::getSingleton('core/translate')->setLocale($language)->init('frontend', true);
	$translated = Mage::helper('core')->__($to_translate);
	echo $translated;
}

So far, I have found it to be the best possible way of doing it. The $language variable is a global one in a format like en_US, en_UK or ar_SA etc.

Posted in Magento

2 Comments

Install git-cola using Homebrew

December 26th, 2012 by Fahd

I am a fan of cross platform clients. Git-cola is one of them being a GIT client. Since I recently started using Homebrew on my mac as in my  previous post.  I find it pretty easy how I can install things quickly with Homebrew.

Here is how to install git-cola on Mac

brew install git-cola

Thats all. It takes care of all the dependencies. Just like the Linux terminal. Here is a Terminal Log, of how nicely it worked for me. (more…)

Posted in Web 2.0

Leave a comment

Install Wget with Homebrew on Mac

December 26th, 2012 by Fahd

Wget is a useful command line tool on Linux and with Homebew, you can easily get this GNU utility on Mac. As explained on it website:

GNU Wget is a free software package for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols. It is a non-interactive commandline tool, so it may easily be called from scripts, cron jobs, terminals without X-Windows support, etc.

GNU Wget has many features to make retrieving large files or mirroring entire web or FTP sites easy, including: (more…)

Posted in Web 2.0

Leave a comment

Installing Homebrew on Mac

December 25th, 2012 by Fahd

Homebrew is a LInux like package manager for Mac. Macports and fink are just dead. Homebrew as it says on its website,  installs the stuff you need that Apple didn’t. Homebrew installs packages to their own directory and then symlinks their files into /usr/local. omebrew won’t install files outside its prefix, and you can place a Homebrew installation wherever you like.

Forexample, it made my life quite easy setting up RVM which allowed me to manage my ruby installation easily and also helped me manage different versions of Ruby easily!

Here is how to install Homebrew on Mac. All you need to do is, paste the follwing script at a Terminal prompt.

ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"

(more…)

Posted in Web 2.0

Leave a comment

Two Useful commands for Ubuntu Geek

March 3rd, 2012 by Fahd

How to log in to root if your existing user doesn’t have root access

The command is  sudo -i and here is a sample of how I used it.

architect@athena:~$ sudo -i
[sudo] password for architect:  *****
root@athena:~#

After you run this command, your command prompt should

Load Graphical system log viewer

The command is  gnome-system-log and here is how I actually used it.

architect@athena:~$ gnome-system-log

So it will load the GUI where you can access different system logs.

Please comment if you have similar questions and hit Like if you like it.

Posted in Uncategorized

Leave a comment

Dreamweaver: File Encoding, how to change it

February 27th, 2012 by Fahd

If you work on multilingual sites, the chances are that you will need to change the file encoding for your html or php or whatever language you code in. For me, it was not easy to find it for the very first time. So though about posting it to save your time.

OK here it is. Just open your document and go to

Now click on first option named “Page Properties”  and select the right encoding.

You can use the shortcut command CTRL + J on windows. I will  update about Mac later once I am on it.

Posted in Wordpress

2 Comments

WordPress: SQL query to quickly check your metakey values for all posts

February 25th, 2012 by Fahd

The title says it all. I basically wanted the SQL query to quickly check the metakey values for a certain metakey associated with the posts in my wordpress installation. Please note that the database table for the meta key information is called  `wp_postmeta` where ‘wp_’ is the prefix for tables.

So here is the SQL without further a do

SELECT *
FROM `wp_postmeta`
WHERE `meta_key` = 'you_meta_key'

Just replace ‘you_meta_key’ with your own meta key name.

Posted in Wordpress

Leave a comment

PHP: Removing last instance of a character within text using Regex

August 28th, 2011 by Fahd

I recently encountered a situation where I needed to remove the last instance of the character ‘|’ in the menu that was being dynamically generated. So I came up with the following code

<?
$menu = 'I AM |NOT| A BAD |BOY|';
$menu = preg_replace('/[|]([^|]*$)/', '$2', $menu);
echo $menu."\n";
?>

The output would be

I AM |NOT| A BAD |BOY

And that removes the last instance of a character (in this case a pipe sign, i.e ‘|’ ). Hope that helps others.

Posted in PHP

3 Comments

My blog now available for iPhone

April 24th, 2011 by Fahd

It was the default PC and Mac browser view a few days before and I have been thinking, what if I could make it so there is a clean and fast theme for iPhone which increases usability on iPhone. I am still working on making the YouTube videos work with iPhone 3Gs and above but my blog and portfolio is now available for iPhone.

Now the blog visitors on Apple iPhone / iPod touch, Google Android, Blackberry Storm and Torch, Palm Pre and other touch-based smartphones should be able to see it cutomised for these devices.

Here is a comparison of how my blog used to look like before on iPhone and how clean it looks now :)

Update: Pictures coming soon. Will also upload pics from iPad 2 viewing experience.

Posted in Uncategorized

Leave a comment

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • ...
  • 34
  • »
  • Get Posts tagged with

    2008 About Fahd Murtaza Art and Artists Articles beautiful Blogging Blogging Engines cat Databases Entertainment fahd Fahd Murtaza Famous Quotes Flickr flower Flowers funny General google islamabad light lovely macro mansehra markaz murtaza News Open Source Pakistan Pakistani Photographers People Photography PHP PHP Tips picture of the day Plugins Songs Tutorials video Videos Web Development Web Development Software Wordpress You Tube youtube
Fahd Murtaza, Web Developer, Programmer, Wordpress Expert
U
This is portfolio & blog of senior web developer Fahd Murtaza, who has 9 years experience in: website development, WordPress, drupal, CMS and CRM application development with passion of making web better; one site at a time.


@
Mobile +968 93 678 199
email info@fahdmurtaza.com
Google Talk: fahdim@gmail.com
Skype fahd.murtaza
Location Muscat, Oman.


_
Developed using my beloved, love of my life, WordPress, built on the responsive, grid based, mobile optimised, Foundation Framework, and a modified Foundation theme. More Info →


Follow Fahd: Twitter / Google+ / Instagram / Facebook / Dribbble / Tumblr / Posterous/ flickr /
Copyright © 2006-2013 Fahd Murtaza

Skip to toolbar
    • WordPress.org
    • Documentation
    • Support Forums
    • Feedback
Log Out