All posts by Ala' Ibrahim

My Name is Ala'a, I'm a Jordanian citizen, and I live there too. I'm a Senior Web Developer in a very known company,I have hobbies, other than coding :P , like most of the people, I'm a Bassist, which means I play Bass Guitar, also I admire walking, it's my ultimate hobby. If you want to know more about me you can take a look at my Blog.

Ftp using curl

This post just a reminder for me, as every time I need it, I look through the manual for options, to send a file through FTP using the command curl


$ curl ftp://server/Path/To/Destenation -T FileToUpload -u username:password
 

I just keep forgetting it, hope it would help someone else 🙂

Call me Mr. Professional

Well, yes, sometimes I don’t act in the best way I can, but sometimes I think people don’t know what does the term Professional means. Well, almost everyday I get a call from someone, who has a job for me, either a free lance or a position in some company (and I don’t know where the hell do they get my phone number, is it published somewhere I don’t know about), and I make it very clear that I’m not interested, and of course if I didn’t answer, they try again and again and again. Usually these phone calls ends with a request that if I know someone who is interested to let them know, and actually I do that. One of these guys, had a project, and I made it very clear that I’m not interested, but he kept bugging me trying to convince me, and of course he made that request, and actually I gave his contact to another 2 guys. He kept calling me asking about contacts and stuff, and for almost 2 weeks, I kept ignoring him, until today, he left me a message on my voicemail, telling me how much unprofessional I am for not returning his calls and ignoring him. Well I don’t know, maybe I’m wrong, but isn’t it your job to look for the people you want, aren’t you the one who is in need for them, not me, and do you think you “Mr. Professional” that it’s professional to let people who made it clear to that they are not interested, by wasting their time trying to make them do your job. I don’t know, but what does this sentence means, “I AM NOT INTERESTED”, cause if it means any other thing than it sounds, maybe I should change it, use another wording or something.

Kazak Ya Watan – كازك يا وطن

Shoo Hal Ayam will be playing live on Radio Al Balad 92.4 with Yousef Ghishan talking sarcastic sketches about poverty corruption,…, and the raise of prices.
you can also listen to the show on
www.ammannet.net

شوهالآيام سوف تقدم عرضا على راديو البلد٩٢.٤ مع يوسف غيشان، يتخلل العرض سكيتشات ساخرة عن غلاء الأسعار والفساد. يمكن الإستماع للعرض على الموقع الآتي

www.ammannet.net

if the site didn’t work with you, you can open the direct streaming url to your audio player (http://wma.str3am.com/ammannet)

Saturday 1st, March @ 20:00 (18:00 GMT).

Enjoy.

Good Old sscanf

Working in PHP, all this time, and the big uses you find in regex, and all the string processing we need to, could make us forget our old friend that can easily solve a problem.
sscanf, do you remember it, well, for quite some time I didn’t, until I saw it in a random code I found online, so this post is a reminder that this function exists.
An example, if we have a date, lets say coming from a Mysql DB, (ofcourse you can use strtotime, but sometimes it has it’s limitations) and you want to get the year, month, day, hour, minutes, and seconds, and you have it in a string, you can parse it with some splits, but 1 call of sscanf can do the job.

<?php
$date = ‘2007-05-18 22:15:03’;
sscanf($date,‘%d-%d-%d %d:%d:%d’,$y,$m,$d,$h,$i,$s);
var_dump($y,$m,$d,$h,$i,$s);

and thats all.