what on earth, etisalat?

July 19th, 2010 ahmedre No comments
#!/bin/sh
APP_NAME="Etisalat_3.5G_USB_Modem"
APP_PATH="/Applications/Mobile Partner.app"

sudo chmod -R a+rwx "$APP_PATH"

chmod -R a+rw "/usr/local/"

the above code snippet is from the first few lines of one of the etisalat 3g usb modem’s postinstall script on osx – seriously, why chmod -R a+rw "/usr/local/"? no one uses /usr/local except etisalat?

the modem is a huawei e1550 hsdpa usb stick.

Categories: code Tags:

what do you name your computers?

June 27th, 2010 ahmedre 1 comment

my machines typically have had some sort of video game related (and specifically, rpg related) names.

some names i’ve used in the past:

  • meribia – a town from the lunar rpgs
  • weltall – a “gear” name from xenogears
  • termina – a city from chrono cross
  • zanarkand – a city from ffx
  • dalmasca – a city name from ffxii
  • lab32 – a location from chrono trigger

the machine names in bold are in-use as of this post’s writing.  some of these were actually named for a reason – termina was named because it’s a linux box (ie a linux termina-l), for example, and zanarkand was named because it was a far away city (and the laptop traveled far away from home).  interestingly enough, zanarkand actually refers to “zanarkand ruins,” a place left in ruins in ffx.  by mere coincidence, this happened to also become the fate of that laptop.

i’ve typically named servers by city names (ie makkah, madinah, aqsa), but have now started using names related to the domain name(s) hosted on that machine.

oh, and any printer i have gets named hydralisk, after the famous zerg creatures from starcraft.

Categories: random, technology Tags:

setting up a blackberry dev environment under linux

June 24th, 2010 ahmedre 6 comments

i recently had to look at the blackberry sdk for something. to my disappointment, the blackberry sdk is only available for windows – no linux or mac versions in site. my first attempt was to run a windows vm under virtualbox, but that brought my system to a screeching halt.

so i started doing some research (see sources at the bottom of the post) and found an easier way.  i did this all under ubuntu linux (lucid).

1.  install wine (sudo apt-get install wine)
2.  get winetricks from here (see http://wiki.winehq.org/winetricks for details).
3.  chmod +x winetricks; ./winetricks gdiplus; ./winetricks msxml3
4.  download and install the jdk for windows from sun (oracle?) under wine.
5.  update your windows path to contain the directory of the sdk – do this by editing ~/.wine/system.reg and searching for PATH= and appending your path to it.
6.  ensure that java works under wine (ie run wine javac and see if it works – if it doesn’t, try doing a wine cmd followed by a path to see what the path is at the moment).
7.  download the 32 bit eclipse for windows – unzip it and move it to ~/.wine/drive_c.
8.   install the blackberry sdk (wine BlackBerry_JDE_PluginFull_1.1.2.201004161203-16.exe).
9.  mkdir /opt/rim; cp -r ~/.wine/drive_c/eclipse/plugins/net.rim.ejde.componentpack5.0.0_5.0.0.25/components /opt/rim/sdk
10.  download the sun java wireless toolkit for linux and install it in /opt/rim/WTK2.5.2
11.  finally, set up a /opt/rim/tools directory and add the following files in there (make sure to chmod +x them):

build.sh:

#!/bin/bash

SDK=/opt/rim/sdk
PREVERIFY=/opt/rim/WTK2.5.2/bin

PATH=$PATH:$PREVERIFY java -jar $SDK/bin/rapc.jar \
   import=$SDK/lib/net_rim_api.jar \
   codename=$1 \
   $1.rapc \
   *.java

9550.sh

#!/bin/bash
cd "`dirname $0`"
/usr/bin/wine /opt/rim/sdk/simulator/fledge.exe /app=/opt/rim/sdk/simulator/Jvm.dll /handheld=9550 /session=9550 /app-param=DisableRegistration /app-param=JvmAlxConfigFile:9550.xml /data-port=0x4d44 /data-port=0x4d4e /pin=0x2100000A

and that’s it! now let’s compile a sample app, say the helloworld sample (from /opt/rim/sdk/samples/com/rim/samples/device/helloworlddemo/). to do this, copy the helloworlddemo folder somewhere and add a HelloWorldDemo.rapc file in that folder that looks like this:

MIDlet-Name: HelloWorldDemo
MIDlet-Version: 0.9
MIDlet-Vendor: Research In Motion Ltd.
MIDlet-Jar-URL: HelloWorldDemo.jar
MIDlet-Jar-Size: 0
MicroEdition-Profile: MIDP-2.0
MicroEdition-Configuration: CLDC-1.1
MIDlet-1: Hello World Demo,img/helloworld_jde.png,
RIM-MIDlet-Flags-1: 0

now you can compile it by running /opt/rim/tools/build.sh HelloWorldDemo – if all is well, you should see a HelloWorldDemo.cod file.

then run 9550.sh, which should launch the simulator. you can choose to install the cod file from the menu.

btw, if you want to use other emulators, run wine fledge.exe /help under /opt/rim/sdk/simulator and you’ll find what valid parameters there are for the device type. then edit 9550.sh and change it to your device type.

one other note – another way to compile applications involves using the blackberry ant tools. i haven’t tried this yet, however.

sources
- Eclipse + JDE + Linux – a working environment
- How to use BlackBerry Device with Linux
- BlackBerry Development on Mac OS X

Categories: code Tags: ,

عسل وطحينة

June 13th, 2010 ahmedre No comments

i wanted to write about my experiences in egypt, and so i started a new blog (i decided not to write those posts here because they’re not highly technical or programming related (or geeky)). you can find it at masr.whatstheplot.com.

Categories: website Tags:

desktop screenshot for february 2010

February 25th, 2010 ahmedre No comments


here’s a screenshot of my linux box taken on february 25th, 2010. click the image above for the full sized view. linux desktop running openbox, a bunch of transparent urxvt terminals, cairo clock, and trayer (with banshee, pidgin, transmission, pino, dropbox, guake, and tomboy running).

i recently finished watching the old star trek movies, hence the star trek influenced desktop. and, of course, here’s the problem with teleportation.

Categories: technology Tags:

google buzz – friend or follow

February 10th, 2010 ahmedre No comments

i like the site for twitter, ‘friendorfollow,’ which tells me who i am following and isn’t following me back, who are following me and i am not following back, and so on. given that i got access to google buzz today, i decided to write a little script to help me determine the breakdown of my friends (specifically, who i am following and isn’t following me back, since the rest of the information is easy to read off of the website anyway).

this script will tell you who your friends are (lol, i wish), who your fans are, and who you are following but isn’t following you back. unfortunately, there’s a manual step involved (getting the server response with your friends and followers). there’s really no point in trying to automate this right now, because soon enough, i expect that one of the google apis will expose this functionality.

download it from github here.

Categories: code Tags: ,

so sick of farmville…

February 10th, 2010 ahmedre 4 comments

wanted to take a short break, so i decided to take out 20 minutes and write a silly song about farmville (it’s a rip off of ne yo’s “so sick” song). note that the lyrics (and thus the mp3) are in pre-alpha (and are not likely to see any future revisions).

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.

lyrics:

gotta change the favorites i have,
for the new design in store,
cuz right now i really can’t,
take it any more,
and i know it makes no sense,
cuz my farm is nice fo’ sure,
but i can’t wait for gas anymore.

it’s ridiculous…
it’s been weeks, i’ve been playing and i can’t get over it,
and my time’s worth more than this,
enough is enough,
no more sitting around, clicking around,
i am so tired of farmin’ up, to get ahead of you,

and i am so sick of farmville,
hear me loud and clear,
so done with planting, flowers and corn ears,
and i am so sick of farmville, and the much clickin’ fo sho’
so why won’t this game leave me alone?

got nice equipment on board,
a tractor and seeder,
too bad they’re as useless as,
a plastic weed eater,
i am so sick of running out of gas,
and clicking every square,
and how every click must be multiplied by three…

that’s the reason that i am so sick of farmville,
hear me loud and clear,
so done with planting, flowers and corn ears,
and i am so sick of farmville, and the much clickin’ fo sho’
so why won’t this game leave me alone?

said i am so sick of farmville,
hear me loud and clear,
so done with playing a game, makes me bored to tears,
and i am so sick of farmville, unless i find a bot,
so why won’t this game leave me alone?
why won’t this game leave me alone…

Categories: random Tags: ,

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, the app must download the data to the user’s sd card.

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

Categories: code, islam Tags: , ,

so long, yahoo!

January 13th, 2010 ahmedre 5 comments

on july 19th, 2006, i posted my first blog post from california. i moved there to start a new job at yahoo! ~3.5 years later, it was time to go, and so at this point, i am officially a non-Yahoo!

what’s next? i don’t know yet, but i am both excited and optimistic about the future. insha’Allah khair. maybe it’s not a bad time to give a startup a shot…

Categories: work 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: