Welcome to my site, where I share my thoughts on Open Source software, Computer Science, and various bits from my life and the web.

Feel free to navigate through blog posts, or explore sidebar links. The site's RSS feed is also available.

Enjoy your stay!

Checklist for Securing PHP Configuration

The Apache/PHP/MySQL stack is immensely popular for web application development. Its components are powerful, versatile and Free. Unfortunately however, PHP comes with a default configuration that is not suitable for production mode, and may cause developers to use insecure techniques during the development phase. Inside is a check list of settings that are intended to harden the default PHP installation.

Read more


Tags:
Submitted by Ayman on Thu, 2006/10/05 - 11:18pm.

Update On Drag/Drop Portal Interface for Drupal

A couple of weeks ago I posted an article on creating a drag/drop portal interface with Drupal and Script.aculo.us. Many comments were interested in a jQuery port for Drupal 5.0, and Mark recommended building such a module on top of the brilliant Panels module. I finally had time to continue working on this, so I created an initial drag/drop module built on top of jQuery and Panels. It's far from complete (doesn't save user settings for example), but it's step in the right direction. I also posted an issue to Panels' tracker, pinging merlinofchaos (author of panels), so let's take the discussion there.

I really am looking forward to polishing this module, as I believe it'll be a timely addition to Drupal's arsenal of modules, now that jQuery is part of Core and Drupal 5.0 is around the corner.

You may download the module here. It's only meant to demonstrate functionality. It's for Drupal 4.7 (because Panels hasn't been ported to 5.0 yet), and requires Panels module. To use it, try to add a new panel and you will find a new type called "three column with drag-and-drop". I tested it with bluemarine; it may not work with other themes for reasons outlined in the issue I posted.


Tags:
Submitted by Ayman on Mon, 2006/10/02 - 11:32pm.

9 JavaScript Tips You May Not Know

JavaScript is a fully-featured Object-Oriented programming language. On the surface, it shares syntactical similarities with Java and C, but the mentality is quite different. At its core, JavaScript is more similar to functional languages. Inside is a list of JavaScript tips, some offer techniques to simulate features found in C-like languages (such as assertions or static variables). Others are meant to improve performance and explore some of the more obscure parts of the web scripting language.

Read more


Tags:
Submitted by Ayman on Wed, 2006/09/27 - 6:26pm.

Increase Your Linux/Unix Productivity With GNU/Screen

screen is one of my favorite GNU utilities; it provides a quick and easy way to have several open terminals and do multiple things at once. Another cool feature about screen is that it stays running even if the user logs out or disconnects. This enables the user to detach from their session and resume it later. This feature is a life saver when working on a remote machine through SSH. If I was disconnected for some reason, I can easily reconnect and resume my session.

screen is very easy to use. Below is a list of its main commands. Read on, experiment with them, and you will become proficient in screen in minutes. Believe me you will appreciate it.

Read more


Tags:
Submitted by Ayman on Sun, 2006/09/17 - 9:03pm.

A Collection of Vim Tips

Vim is one of the most popular text editors for Linux and Unix systems. Its text-based interface may look intimidating for newcomers, but underneath it there is a wealth of functionality to be learned. Experienced Vim users often feel much more productive using Vim than GUI-based text editors.

Read more


Tags:
Submitted by Ayman on Thu, 2006/09/07 - 7:37pm.

Drag/Drop Portal Interface With Scriptaculous And Drupal

Update: I posted some news on this here.

Ever wondered how to create an interface like Google Personalized Home? In the first section of this article I'll demonstrate how to create a drag/drop portal in a few lines of JavaScript code, using the excellent Prototype and Scriptaculous JavaScript libraries. In the second section, I'll explain how to integrate this code into Drupal as a server backend for storing user settings. You may check the frontend here (tested with Firefox 1.5, IE6, and Opera 8.5), and download a reusable JavaScript Portal class and Drupal module for the backend at the bottom of this post.

Read more


Tags:
Submitted by Ayman on Mon, 2006/09/04 - 12:23am.

The Lost Passphrase

I've just had a fascinating experience that I wanted to share here. For those not familiar with it, GnuPG is a system for digitally signing and encrypting emails and other data. Since I created my GnuPG key pair, I used to sign all my outgoing emails, but unfortunately this caused many troubles to those not familiar with digital signatures. I often received replies from people not able to view my emails in MS Outlook (because it ignores standards), or found random garbage at the beginning/end and thought the message was corrupted (not realizing that the actual message was in between). Until a couple of weeks ago or so when I decided to only sign messages when required, or when the receiving party is familiar with GPG. And it just happened that I didn't have to sign any emails until tonight. I clicked "send" and a window popped up asking me for the key's passphrase (a long password). I sat there for a while trying to remember what my passphrase was. I entered one but it was wrong. I tried a couple more but no luck. Finally, I realized that I forgot my passphrase!

Read more


Tags:
Submitted by Ayman on Fri, 2006/09/01 - 12:40am.

Arabic Firefox 2.0 Beta 2 Available

The Arabic version of Firefox 2.0 Beta 2 is now available. The key features of this release are:

  • Session management: Ever closed a tab by mistake? This features lets you undo and reopen the tab.
  • Phishing protection: The browser warns you about scam attempts and phishing websites.
  • Enhanced search: You will receive query suggestions as you type your search strings, and it's even easier now to install and manage new search engines.
  • And more: Better theme, builtin support for feed readers, ... etc

This is a testing version. If you are willing to help refine the Arabic localization, please download and test. Otherwise, just want for the final release, which should be some time soon.

Download links for the Arabic version:
Windows
Linux
Mac

Enjoy, and thanks to everyone who helped in the translation effort!


Tags:
Submitted by Ayman on Thu, 2006/08/31 - 10:44pm.

MySQL 4.0 to 4.1 Encoding Problem And Solution

Here is a solution for a problem I read about many times in the Drupal forums, but couldn't find any definite answer to: When upgrading or moving a database dump from MySQL 4.0 to 4.1, Unicode data stored by Drupal becomes gibberish. The attached module iterates over all tables in Drupal's database, and converts text columns to UTF-8. The bulk of work is already in Drupal's code (_system_update_utf8), the module simply makes use of it.

To use the module, install and enable it, then navigate to update.php, and select update 1 for the module, then initiate the update process. You may disable the module when done.

Read more


Tags:
Submitted by Ayman on Tue, 2006/08/29 - 5:51pm.

CSS Debugging Bookmarklets

I wrote two CSS debugging bookmarklets to ease the pain of XHTML/CSS development under Internet Explorer. They mimic two commonly used features in the Web Developer extension for Firefox. The first outlines block-level elements, and the second displays ID and class information. Although such functionality already exists in Web Developer and other bookmarklets, I couldn't find anything that is compatible with Internet Explorer and works offline (What I found are bookmarklets rely on including a remote stylesheets).

To test a bookmarklet, simply click its link. To use it, drag and drop the link to your Links/Bookmarks toolbar, and press the resulting button when you want to activate the associated functionality. These bookmarklets are tested with Firefox 1.5, Internet Explorer 6.0, and Opera 8.5. I haven't had the chance yet to test with KHTML/Safari, but I think they should work because the code is standard complaint.

Anyone who's worked with XHTML/CSS for a while knows that Internet Explorer support for standards is lacking to say the least. It has many obscure bugs and compatibility issues. Firefox is my platform of choice for web development because of its compliance with standards and the plethora of development and debugging tools and extensions available (most notably Web Developer and FireBug). Once coding is finished under Firefox, I validate the code and test with other browsers (IE, KHTML/Safari, and Opera). Most of the time the code passes Opera and KHTML without any issues; however, IE often produces problems, and while working around them, I used to wish I had Web Developer's features for IE. Until recently when I wrote those bookmarklets, they took me like 5 minutes to write and test under Firefox, but IE silently failed to produce the desired results until I did another hour of work. I adopted Web Developer styles for outlined elements and ID/class information for consistency. And now I'm sharing them here now hoping that others find them useful as well.


Tags:
Submitted by Ayman on Sat, 2006/08/26 - 12:08am.

Syndicate content

Books

Learning Website Development with Django

Learning Website Development with Django
A beginner's tutorial to building web applications, quickly and cleanly, with the Django application framework.

My first book. Published by Packt Publishing in April 2008.

Icons

Entries Feed

Get Firefox!

Drupal.org

Linux

Gentoo


Creative Commons License

Recent comments