Archive

Archive for the ‘islam’ Category

salam, android!

January 22nd, 2010 ahmedre 2 comments

after the nexus one came out, i became a little more interested in android. while i had written a simple ’salam world’ app some time ago, i figure it would be nice to delve a little deeper and try to write something remotely useful.

so without further adieu, introducing a (very simple) quran for android:

source code on github

for the most part, android is fairly fun and easy to develop for. however, one of the most frustrating parts is the extremely limited memory for apps. since apps can’t be on the sd card (due to some security issues), you are limited to the very small amount of memory on the device. consequently, in order to display the images for the quran in this app, i have to require the user to download the images to their sd card (or do it for them over the web).

note – try it at your own risk, i only tested it on the emulator…

Categories: code, islam Tags: , ,

a little rhyme about makkah

December 15th, 2009 ahmedre 1 comment

mok and i were chatting about makkah on im and we brought back a very old habit of ours from the days of highschool and college – rhyming about any and everything. so without further adieu, here’s a snippet from our im conversation:

omer: makkah makkah, i love u like i love my motha
you are a city like which there is no otha
above u the angels do hover
me: in you i am a little more pious
i drop my prejudice and all my bias
the times of salah set my pace, before the adhan to the haram i’d race
omer: as i see the nur coming off them hujjaj’s face
me: first floor, second floor, or even third
watching the tawaf made by humans and birds
omer and i: seein people doing tawaf around the clock
all types of people – doctors, engineers, nerds and jocks
omer: and as the clock, goes tick and the tock
u listening to the rhyme by mok and ak

by the way, you can see a few of the pictures i took at the haram here.

Categories: islam Tags:

quran jetpack script

November 16th, 2009 ahmedre 1 comment

so i had a little bit of time before i depart on my journey for hajj, so i wanted to play around with the firefox jetpack extension a little bit. so without further adieu, this post is here to introduce a simple quran plugin for jetpack :)

what is it
this is a quran script for jetpack, a plugin for firefox which allows customizing the browser just through javascript.

when you are typing in a textarea (in wordpress, gmail, google talk, etc), if you highlight any text in the format of sura:ayah (ex 1:1) and right click on it, you will be given a menu that allows you to replace that with the actual verse (in arabic, transliteration, or translation).

this is very nifty for taking notes, chatting, sending emails, etc.

how does it look like?
here is a screenshot:
quran jetpack script screenshot

known issues
- sometimes, the server appears to take long to reply so it doesn’t return and you are forced to try again.
- the plugin doesn’t work on google docs and other sites that overwrite right click functionality.
- the plugin also doesn’t seem to be working on gmail when rich formatting is on.

how to install it
- install jetpack for firefox.
- go to this page. on the top right corner of the webpage, you will find a button that says, “Install…”. click it.
- scroll to the very bottom, click the “auto-update this feature” checkbox, and then click on “i know what i am doing, install it!”

source code
the source is also available as on github in this gist.

changelog
november 16th, 2009
- fixed a bug in which the appended (sura:ayah) to the text was put at the end of the textarea rather than right after the ayah.
- added a little favicon for the menu.

quran jetpack script screenshot

Categories: code, islam Tags: , ,

thoughts before hajj

November 14th, 2009 ahmedre 2 comments

so i was sitting on a plane in san francisco awaiting the departure of my flight to atlanta, from where i will insha’Allah be leaving for hajj. the captain mentioned something about a leak that they have to fix, so i figured, “why not write a blog post on my phone in the meanwhile?” (the plane took off and i realized i had more stuff to add and edit, so the in-airplane mobile blogging commenced on land and in the air).

anyhow, i wanted to write the pieces of advice and gems given to me by my shuyookh, elders, family and friends who have already went to hajj.

hajj – themes and similitudes
when i went to ummrah before, i have always been told how i7ram makes all people equal – you could be the richest of people or the poorest of people, you could be from america, china, or burkina faso, but ultimately, it didn’t matter – you were wearing the same simple non-embellished two pieces of cloth while doing your ummrah (or hajj).

however, the parallel i recently learned is that between hajj and the day of judgment. there is a plethora of people (millions), all moving towards the same place, each to themselves and not worrying about those around them. the rich and the poor, the arab and the non-arab, the powerful and the weak, the healthy and the sick all gather from all parts of the land for this journey. on this day, all are dressed in i7ram – similar to the burial shrouding one is wrapped in – and as though all are just being resurrected and walking towards “ard al ma7shar” to await reckoning – may Allah make that day easy upon us!

it is thus not surprising that surat al hajj would start with these verses (22:1-2).

hajj tips
0. first and foremost, the importance of time during hajj. so many people advised me, “don’t waste your time, maximize your time of worship.” others told me, “american crowds go to hajj in luxury, with constant buffets of the best of foods and so on – so eat minimally, especially from once you go to makkah until after the day of 3arafah!” (to stay light and avoid down time). another common advice was “watch who your company is on the trip and beware of bad company!” another tip was “lose the watch, you don’t need it!”

1. almost everyone advised “do not get angry!” i was told “forget logical reasoning, don’t resist or try to convince anyone of anything, you don’t want to lose your hajj.” i was also told “everyone will be on edge there, you will be pushed, shoved, and tested a lot there, so stay on your toes and whatever you do, don’t lose your cool!” may Allah make it easy! i think ayah 2:197 is very relevant.

2. the most important request people always make is for du3a2 – du3a2, du3a2, and more du3a2 – du3a2 for ones family, friends, shuyookh, those who have rights upon us, those who passed away before us, the ummah, and for ourselves – du3a2 for this world and for the next. may Allah make it easy and accept!

3. writing the waseya (islamic will) before leaving – this action in and of itself reminds a person that death can come at anytime, and thus reminds us of the importance of being prepared. may Allah grant us حسن الخاتمه – ameen.

4. on a related note, calling family, friends, and people with whom you may have had trouble in the past to ask them for forgiveness highlights the importance of brotherhood, good character, and making sure one is on good terms with all people.

hajj – aspirations/what to aim for
0. first and foremost, that Allah accepts it and makes it a hajj mabroor – this is absolutely critical, because without this, the trip would arguably be wasted.

speaking of mabroor, brother Ihab gave an awesome khutbah on hajj, in which he cited a hadith in which the Prophet (saw) said that there is no other reward for a hajj mabroor except for jannah. the sa7aba asked the Prophet (saw), “wa ma biruhu?” – and what causes a hajj to be mabroor? and he (saw) answered with “it3am alta3am” (feeding food) and “ifsha2 al salam” (spreading salam).

[note - i had forgotten the second item and found it in this blog post].

1. that Allah returns one home completely free of sin, and helps one to improve upon themselves and to become a better person (and ultimately, to grant them حسن الخاتمه and jannah).

2. that Allah accepts one’s du3a2s while there.

3. that Allah allows hajj to be a positive turning point in one’s life.

ayat/verses

credits
may Allah reward sheikh Mohamed, brother Ihab, and all of those who gave me hajj training, advice and shared their experiences with me in any way, shape, or form (the names are too many to mention here and i would undoubtedly forget someone, so i will suffice by saying, “may Allah reward you all”).

and finally…
some last (and mostly unrelated notes):

  • this is most probably the longest piece i have ever written on my phone (and on a plane). for the record, writing long articles on an iphone is a painful experience!
  • that having been said, while i plan on taking my iphone with me, i am hoping not to use it – otherwise, knowing me, i’ll get distracted and start live blogging my hajj – (“i am now at mina! check out this picture/video!” – and, of course, “i am now on 3arafah! send your du3a2 requests via twitter before maghrib and i will pray for you!”)
  • and yes, in case you are wondering, i felt strongly obliged to start my lists at 0.
Categories: islam Tags:

quran plugin updated for ubiquity 0.5

August 10th, 2009 ahmedre 6 comments

i’ve done a quick port of the quran ubiquity plugin to work under the new version of ubiquity (0.5). as you may know, ubiquity 0.5 and beyond use a new parser (parser 2) that isn’t compatible with the old parser (parser 1 for 0.1.x versions of ubiquity).

you can get it here. make sure to select “automatically update this feed” so that you get any updates i may get around to making.

this version is pretty much identical to the older one, except that now, you can use “get-ayah,” “get ayah,” or “ayah” to get an ayah, and “search-quran” or “search quran” to do a search. i hope to support some of the new stuff from the pre-alpha version of the quran api soon insha’Allah (other translations, etc).

Categories: code, islam Tags: , ,

introducing waqt.org

July 10th, 2009 ahmedre 7 comments

today, i took the arabeyes php extension of itl, the yahoo geocoding api, and the geonames api and put together waqt.org.

it’s a fairly minimalistic prayertimes site. the code is available on github. note that the calculation method is currently hardcoded to use the isna method, but this is fairly easy to change.

Categories: code, islam Tags:

amazing quran marketing

June 2nd, 2009 ahmedre No comments

about two years ago, i posted about sheikh mohamed’s amazing fajr marketing tshirt. today, i am posting about the latest tshirt in the collection – read, understand, and practice quran.

read and practice quran

sheikh is currently in egypt visiting his family and will go and make 3umrah insha’Allah… the bay area really isn’t the same without him. may Allah accept from them and grant him and his family the very best and bring them back safely – ameen.

Categories: islam Tags: ,

quran ubiquity plugin

May 19th, 2009 ahmedre No comments

updated and released the first version of the quran ubiquity plugin! you can go here to install it.

essentially, it contains two commands -
1. search-quran – takes a parameter of what to search for and will show the results that match that particular query. hitting enter will bring up the search results page.
2. get-ayah – takes a parameter of which ayah (ex 2:2) and an optional parameter of the language/translation you want the ayah in (in english – muhsin khan, for example – note that ubiquity will provide suggestions for these). hitting enter will insert the text into the selection space.

this is uber-useful for muslims imho :p perhaps i will try to provide a screencast later on that shows how to use this for those who are still afraid to try it :)

*update* – rather than make my own screencast, i’ve decided to record a set of audio instructions on how to use it.

by the way – if you haven’t used ubiquity before, i highly recommend that you watch this video first. it explains what ubiquity is and gives you an idea of what it is useful for. to put it quite simply, ubiquity is amazing. it’s an indispensable tool for your firefox. watch the video :)

and here is the audio tutorial on the quran plugin for ubiquity.

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

enjoy!

Categories: code, islam Tags: , , ,

reading quran on the iphone

March 8th, 2009 ahmedre 8 comments

a long time ago, when i got my iphone, i realized that it would be nice to be able to read the quran on my phone. what i wanted was a way to read the arabic text on the phone (page by page, not ayah by ayah). anyhow, i’ll outline the solutions i’ve found here along with my preferred solution and how to set it up.

options

  • quran applications in the app store – there are a few in the app store, but only one version of iQuran is free. it shows you the text (ayah by ayah, however), has translations, and audio.
  • images – copy a set of 604 images to your iphone, with each image representing one page of the Quran. then, when you want to read Quran, you load up the photo viewer and read the pages there. you can find these images in many places. here is one example. this is the best solution for reading the Quran in Arabic if you don’t want to jailbreak your phone.
  • pdfs – in my opinion, the best way to read quran on the iphone (if you have a good pdf viewer). you don’t have to hassle with syncing images, nor do you have to deal with 604 files on your phone that you must go through in order to read Quran. also, pdfs tend to be of higher quality than images. this is the solution i recommend if you have or are willing to jailbreak your phone.

since the first solution is straight forward and instructions for the second solution are available on the link above, i will here outline instructions on how to use pdfs.

first, i need to point something out – you technically don’t need to jailbreak your phone to view the quran pdfs on it – you could download one of the apps in the appstore that views pdfs and use it. however, i’ve tried several of the free ones, and was never satisfied with the speed and performance of any of them. the best pdf viewer i found for the iphone is safari itself. so in order to be able to access these pdfs without a connection, you need to have a webserver running on your phone… and that is why you need to jailbreak your phone :)

preview
here are three screenshots of how it looks like:
menu
quran text
quran text (wide).

instructions

  1. jailbreak your phone. on an older iphone, this is easy (install the newest firmware via itunes, then install and run quickpwn). for the 3g iphone, carefully read the instructions on quickpwn’s website, especially if you want your phone to be unlocked and/or are already using it unlocked.
  2. once the phone is jail broken, run cydia. install openssh. then install lighttpd.
  3. when you’re on a wifi network, go to your phone’s settings (from the main screen), click on wifi, and choose the network that you are currently connected to by pressing the blue arrow – note down the value of the ip address
  4. ssh into your iphone as root – in linux or osx, just open a terminal and run “ssh root@[your phone's ip address]“. on windows, you can do this by downloading putty. the default password is alpine. keep this terminal open for the next step (recommendation – once you’re in, change your password. type passwd and choose something else besides the default. this is for security purposes).
  5. now you can set up lighttpd. download com.http.lighttpd.plist and scp it to /Library/LaunchDaemons (using mac/linux, just do scp com.http.lighttpd.plist root@[iphone's ip]:/Library/LaunchDaemons). on windows, download winscp, log in (user name root, password is ‘alpine’ unless you’ve changed it in the above step), navigate to /Library/LaunchDaemons, and copy the file over). this file is what will set up lighttpd to start every time the phone is started, and to read the lighttpd.conf from the path below.
  6. download lighttpd.conf and scp it to /etc. this is the configuration file for the webserver.
  7. download the pdfs and web files. unzip them (you’ll get a web directory), and scp this directory to /var/root/Media (so that the files will be in /var/root/Media/web/*). note that if you change this path, you have to edit lighttpd.conf to reflect wherever you put this.
  8. finally, in the terminal you opened in the earlier step, type the following command (this command is what ultimately makes lighttpd start everytime the phone is started):
    launchctl load -w /Library/LaunchDaemons/com.http.lighttpd.plist.

and that’s it… you should be good to go! open up safari and navigate to http://localhost/index.html and enjoy!

known issues

  • when transferring data to and from the phone (via ssh or scp), you want to make sure that you’re on wireless. you may also want to make sure the iphone doesn’t “sleep” so that the connection doesn’t drop.
  • sometimes, when you choose a particular file to read, you get a “cannot connect to server” error – it usually disappears and loads the page before you have a chance to click “ok.”
  • if you turn the iphone off while reading a pdf (or go to the main screen, etc), when you come back to safari, sometimes, the page may appear malformed and not allow you to read. to solve this problem, hit back to go to the index and choose a juz’ to reload it.

suggestions/additions/comments are welcome and appreciated.

update – i’ve been using batoul apps’ quranreader at the recommendation of a friend. it’s $1 in the app store, but well worth it.

Categories: islam, technology Tags: ,

ubiquity rocks!

February 18th, 2009 ahmedre 3 comments

today, i felt like playing some more with ubiquity, which i had installed for a while now but had not played around with sufficiently. i decided to try to write a simple plugin that will search the quran for a particular set of words. to do this, i felt obliged to expose an api for the alpha version of quranicrealm first, which was good because i needed to do it eventually anyway.

and here’s the mandatory screenshot:
ubiquity - quran search preview

it still needs a lot of work… things i still want to do if i get around to it:

  • add a favicon (for the site and for the plugin)
  • more options (ex, “search english,” or “search transliteration,” etc)
  • replace the current text with a link (or translation). this would be useful in im conversations or while writing blog posts.
  • a “get-ayah” command (to say, “get ayah 1 of sura fatiha in arabic,” for example).

anyway, i’ll post up the code when i’ve added some improvements insha’Allah. if you want it before then, post a comment.

Categories: code, islam Tags: , , ,