/index.xml

updating osx for egypt's dst changes

as people in egypt know, dst was cancelled in egypt:

“…Egypt’s interim cabinet decided on Wednesday to cancel daylight saving time after a poll posted on its website showed the majority of Egyptians would approve the cancellation.” (via almasryalyoum).

so, what do us apple users do until apple releases a fix?  @vodafoneegypt suggested that people switch to the Harare time zone.  not my cup of tea.  thinking about manually changing your time?  bad idea if you have a twitter client.

so how do you properly fix it?  here’s a set of instructions that i adopted (based off of this post from argentina and this post from new zealand) to properly solve the problem in egypt.

updating osx

as people who have dealt with timezones before know, the timezones are updated via the zoneinfo database.  you can see more information on the database on wikipedia.

1.  download the latest tzdata file from here (currently, this links to 2011 version g, updated as of 4/25/2011, however, check here to see if there is a newer one).

2.  run the following commands:

mkdir a
cd a
tar xzf ../tzdata2011g.tar.gz
sudo zic africa

by the way, just for fun, open the africa file and search for egypt - you’ll notice all the different times egypt’s timezone rules changed :)  anyhow, at this point, your command line (terminal) time should be correct - verify it by typing date.  you’ll notice, however, that your system clock is still wrong.  let’s fix it…

3.  so the time in osx is not just affected by updating the zoneinfo database - you also need to update the icu database so that it also uses the latest zoneinfo database. ** if you have xcode and want to build manually**, download icu from apple (i am using 400.40, but you can check here if there’s a later one).  otherwise, jump to step 4b.

4a.  if you have xcode, run the following commands:

tar xzf ICU-400.40.tar.gz
cd ICU-400.40
cd icuSources/tools/tzcode
# ./icuSources/tools/tzcode/readme.txt tells us that placing a tzdata
# file in the tzcode directory will compile with that zoneinfo database

# copy the tzdata file from step 1 here
cp ~/Downloads/tzdata2011g.tar.gz .
cd ../..

# compile
./runConfigureICU MacOSX --with-data-packaging=archive
gnumake
# if you want, backup your current icu file first
cp /usr/share/icu/icudt40l.dat ~

# replace the data file only
sudo install -o root -g wheel -m 0644 -Sp data/out/icudt40l.dat /usr/share/icu/icudt40l.dat

4b.  if you don’t have xcode, you can download my icudt40l.dat file from here and install it by doing:

bunzip2 icudt40l.2001g.bz2
mv icudt40l.2001g icudt40l.dat
sudo install -o root -g wheel -m 0644 -Sp icudt40l.dat /usr/share/icu/icudt40l.dat

reboot your system and you should be good to go!

ios?

although technically speaking, the same steps for osx apply, the icu file is a different version (icu46l.dat) - i built icu4c-4.6.1 and pushed the dat file to my iphone, but unfortunately, it didn’t fix the problem.  unfortunately, i don’t have solution for this one yet :(

java developer?

if you are a java developer, you’ll notice that java’s time is also wrong…  this is because java also has its own timezone database that needs updating.  although, sun oracle provides a tool for fixing this, it is only up to 2011e (rather than 2011g) as of the time of this post.

you can verify that the time is wrong by running a program like this:

import java.util.Date;
import java.util.Calendar;
import java.util.TimeZone;
import java.util.GregorianCalendar;

public class Test {
 public static void main(String[] args){
 Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("Africa/Cairo"));
 cal.setTimeInMillis(new Date().getTime());
 System.out.format("%1$tT (%1$tB %1$td %1$tY)", cal);
 }
}

sure enough, one hour off.   when the package is updated for the 2011g changes, you’ll download the latest version, extract it, and then run:

sudo java -Djava.vendor="Sun Microsystems Inc." -jar tzupdater.jar -v -u

if you were to do this now, you’d update to 2011e, which still doesn’t include the fix.

quran android 1.2

in case you haven’t seen it, check out version 1.2 of quran android (released on december 23rd).  you can see screenshots and a more detailed change log on hussein’s blog.

more features and improvements are in the pipeline.  feel free to check out the code on github and let us know if you have any suggestions, thoughts, or contributions!

so i left the country...

uh… yeah.

so egypt (like many other countries apparently) requires military service from it’s citizens.  as a dual citizen, you are exempt from egyptian military service.  i won’t get into details of how to prove this and get your military pardon, but let’s just say that it’s a fairly long winded and arduous process (which until now, i am still unable to complete).

there was some uncertainty as to what would happen if i stayed longer than 6 months - some people said, “you need to get your passport restamped (or leave the country) if you are planning on staying longer than 6 months.”  others said, “you don’t need to do anything.”  i almost followed the latter, until someone advised me to go check just in case, otherwise you could have problems later on.  so i went to the passport office in alexandria.

the lady said, “as long as you’re here less than 6 months, there is no problem.  once you are here for 6 months, you need to give us your id card and your military status.”  i said, “but i am having trouble getting my military status sorted out, what happens if i can’t bring these papers?”  she said, “then we won’t let you leave.”

i was like, “seriously?”  but i guess it matches up with something a friend had mentioned to me, so i could believe it.  i imagined that, given that situation, i could call the embassy and say, “they won’t let me leave,” but i also have to remember that theoretically, i entered the country as an egyptian, so they could say, “we can’t help you.”

to save myself the unnecessary hassle, i booked a flight and left…  i guess i’ll have to do this every 6 months until i get these papers sorted out…

searching the quran on ios

just for fun, here’s an ios universal version of the quran search application.

screenshots:

  • ipad:  1 (shown above) and 2.

  • iphone: 1 and 2.

you can find the source code here (update: added a link to a tar download and removed the code from github since i am not really maintaining this - june 26th, 2011).

searching the quran on android

just for fun, i hacked together a simple prototype of quran search on android. in reality, it’s more close to the autocomplete transliteration demo that i did some time back. for now, it’s only transliteration search, but later on, it can be expanded to search other languages. ultimately, it should probably be integrated into quran android.

you can find the source here.  (update: added a link to a tar download and removed the code from github since i am not really maintaining this - june 26th, 2011).

اللغة العربية في عصرنا الحديث - الجزء الثاني

here’s the second edition of the list. see if you can translate these to english, and look out for the answers to this list and the first edition of the list soon insha’Allah!

  • tareeq al bawaba - طريق البوابة

  • 3al-lem el dekka - علم الدكة

  • bedoon welaya - بدون ولاية

  • merta7 3al akher - مرتاح على الأخر

  • 3asifat al mokh - عاصفة المخ

  • o2af ganb - قف جانب

  • no2tet kasr - نقطة كسر

  • lematha al nesba al thahabeya - لماذا النسبة الذهبية

  • noskha fa7meya 3amya2 - نسخة فحمية عمياء

  • nas ba7eb - نص بحب

  • elbes sa3b - إلبس صعب

  • belyard etisalat - باليرد إتصالات

  • al khat al mayet - الخط الميت

  • shoghl berwaz - شغل برواز

  • seyaset naql al kalam al majnoon - سياسة نقل الكلام المجنون

  • el sa3b al sahl - الصعب السهل

  • ahlan ya tareeq - أهلاً يا طريق

  • wedn al-mu7ar-rik - ودن المحرك

  • ton na3na3 we7esh - طن نعنع وحش

  • 3ala el debanna - على الذبابة

  • etefa2 regala - اتفا رجالا

  • anessa wa2fa ta7t - انسة واقفة تحت

  • 3amood be 6aboor - عمود بطبور

  • innahu thahaba bondo2 - إنه ذهب بندق

a taxi driver and du3a2

i got in a taxi to go a short distance a few days ago. while driving, the man said to me:

you know, today, something strange happened. i just dropped off my nephew to the airport where he’s traveling to qatar. i am subscribed to a “du3a a day by sms” service by etisalat, and i got the du3a while driving him to the airport. so i told him, “read me the du3a,” since i was driving. he read the du3a (which said something along the lines of “astawda3 Allah” (or put as a trust with Allah) my self, my family, my deeds, and so on).  the taxi driver continued, “i was shocked - the timing was incredible! it’s as if Allah had that message come today just for him specifically!”

he then asked me to listen to a clip of a story from a sheikh on his phone. the sheikh mentions a man whose wife was pregnant and he had to go and travel. the wife didn’t want him to go and tried to insist that he stay and not go. “how can you leave me while i am pregnant,” she asked? so he put his hand on her stomach and said, “oh Allah, astawde3ak ma fee batniha” - that “oh Allah, i leave as a trust with you whatever is in her stomach.”

so he left. he came back after he was done with his travels and found young kids (from his family or relatives or what not) telling him that, “your wife has passed away.” so he said, “inna lillahi wa inna ilayhi raji3oon.”

they then told him that they found something strange - that every night, some sort of smoke would come out from the place that they buried this lady. so he went there and dug up the grave, and found his wife sitting in the grave with his son alive and between her feet.

sub7anAllah… as the taxi driver added, had the man made the same du3a and added the mother in the du3a as well, he would have come back and found his wife as well.

another near death experience

i almost died yesterday… again…  sub7anAllah.  it was around 1am and i was really tired and sleepy… i was trying to cross the street from the maw2af to get to the other side and find something to ride home.  i guess i really wasn’t paying attention and was thinking instead about “what will i take home,” and weighing my options as to what transportation is best to take.  i crossed half the street and saw cars coming, but didn’t register that they were flying… so i started crossing the road nonchalantly (mind you, this is a highway-type road) without paying much attention.

suddenly i hear screeching brakes and i look and i see a mini-truck (one of those that carries a particular type of good for a supermarket, etc) coming straight at me and scrambling to come to a halt… a second later, i realize that it’s going to hit me and he’s trying to stop to avoid hitting me.  i don’t know what happened, but i guess i stepped back two steps just in time to avoid getting hit.

i finished crossing the street and some people on the other side are like, “mesh tekhalee balak ya sheikh, hatdaya3 nafsak keda!”

sub7anAllah…  Allah saved me, al7amdulillah.  death can come at anytime…  the problem is that i often forget this.  may Allah grant us 7osn al-khatema - ameen.

free taxi rides

i stopped a taxi that had just picked up some people and was going the same direction i wanted to go in.  he asked the others if he could drop me off on his way to their destination.  because i was in a rush, i said, “if not, if you may please just drop me off at the end of the street on your way.”

so i got on, and he shook my hand and said “taqabal Allah mina wa minkum” - i was like, “uhh… thanks, jazakAllah khair”  (this wasn’t after a salah time, i wasn’t coming out of a masjid, and it wasn’t the end of ramadan, so i was just surprised)…

anyway, i made it to the end of the street.  i had a 5 LE note and 1.25 LE worth of change.  i valued the travel at 2LE, so i gave him the 5 and asked him for change.  he said, “i don’t have change.”  i said, “okay, take it and forget it” - he refused and put the money in my hand and clenched my hand and said “you’re making me hold up traffic, go!”  i insisted but to no avail…  in reterospect, i should have given him the 1.25, but i forgot that i had it at the time, and it wasn’t exactly fair either.  i felt bad, and so i made du3a that Allah gives him more rizq on that day than he ever made in a single day before - i hope it happened insha’Allah :)

that would be the second time i got a free taxi ride.  the first time, i was walking to jum3a at masjid al fat7, and a brother in a taxi stopped me and said, “are you going for jum3ah at masjid al fat7?” - and i said, “yes” - and he said, “come” - he also refused to take money, saying “i stopped you, you didn’t stop me” :p

transportation mania

today (well, yesterday actually) - was quite a busy day!  within 24 hours, i rode 4 different types of masharee3 (minivans), a bus, a train, an underground train, and a handful of taxis.

some of these minivans are crazy - imagine that when a minivan stops, 20 people run towards it, all trying to get on.  time passes and another one comes by and the process repeats.  it’s quite possible that you may end up standing inside the minivan, or even end up riding while hanging on to the door.

i’d like to add that google maps and gps definitely come in handy at times!