Archive

Archive for November, 2005

come again?

November 27th, 2005 ahmedre No comments

a long time ago, when i still used to use xmms, there was this nice plugin called Repeat It! that let you say, “repeat this song between this and this times forever.”

i found myself missing that feature today… unfortunately, i don’t have xmms installed and don’t want it installed because i now like the gtk2 based mp3 players, like beep for example.

but because beep is being rewritten as bmpx, i figure rather than porting the plugin, i can just write a much simpler command line version based on the existing plugin that works with beep.

note however that this is really bad… it does very little error checking, and the sleep solution isn’t really the best solution… but its a pretty good solution for my limited uses :)

and in 25 lines, here it is:

#include <stdio.h>
#include <signal.h>
#include <bmp/beepctrl.h>

void got_signal(int x){
	printf("Exiting!\n"); exit(1);
}

int main(int argc, char** argv){
   int startpos, endpos;
   if (!xmms_remote_is_running(0))
      return (0*printf("\033[1mbmp is not running.\033[0m\n"))-1;

   if (argc != 3)
      return (0*printf("usage: %s start end\n", argv[0]));

   startpos = atoi(argv[1]);
   endpos = atoi(argv[2]);

   signal(SIGINT, got_signal);
   if (!xmms_remote_is_playing(0)){ xmms_remote_play(0); }

   while (1){
      xmms_remote_jump_to_time(0, startpos * 1000);
      sleep(endpos - startpos);
   }
}

to compile it, just do:

gcc `beep-config --cflags --libs` loopsegment.c -o loop

then just run beep, load up the file you want to play, and run the script passing in start and end seconds.

Categories: code, technology Tags: , ,

del.icio.us

November 21st, 2005 ahmedre No comments

mmm, delicious! this thing is pretty cool, i wish i’d known about it before…

Categories: technology Tags:

random stuff

November 15th, 2005 ahmedre 1 comment

my desktop is sorta dying… everytime i reboot, it kinda sits there doing nothing, and i often have to shut it off and turn it on for it to work (sometimes more than once). when it does decide to come on, i often get a message about “dram timing is loose” – not sure if this means my ram is going bad or if my board is going bad… either way, its not good news.

i can now browse the net on my palm using bluetooth… not exactly sure why this is really helpful, but its pretty neat just to be able to do it. i found a pretty nice guide on the gentoo forums.

i gave bloglines a try today… it seems pretty neat, but for some reason, it doesn’t seem to me that it truly sticks to its promise of checking the site hourly. either way its kinda neat.

Categories: random, technology Tags: , ,

php doesn’t take “ﻻ” for an answer?

November 14th, 2005 ahmedre 1 comment

peace…
one interesting observation i came along is the treatment of “ﻻ” (which you get by pressing b on a qwerty keyboard) in php… for whatever reason, if someone enters it into a form for example and you try to get the value of the first character of the string, you get 0. oddly enough, this works fine for any other arabic characters typed in. any ideas on why this would happen?

no one has still fixed the bugzilla bug i reported a while back about arabic shaping… looks like i might have to grit my teeth and do it if i really want it done :)

Categories: code Tags: ,

!عربى

November 8th, 2005 ahmedre 2 comments

لقد عزمت النية ان اتعلم كتابه العربيه على الكمبيوتر إن شاء الله.

Categories: random Tags:

eid mubarak, a ‘WHAT’ prayer service!?, etc

November 2nd, 2005 ahmedre No comments

eid mubarak to all… eid mubarak :) big arguments, like every year, about when eid is, when we can and when we can’t have eid, some people want others to fast 31 days because they think its impossible for the moon to be seen today… but anyhow, i looked online at a lunar calendar and it says that the new moon is tonite, which makes eid tomorrow, so whatever man… that’s what my masjid is doing, that’s what a lot of people are doing, and al7amdulillah, that’s what i am doing. its not worth such a big fight, argument, and controversy as far as i am concerned.

anyhow, so our masjid, islamic society of central jersey rented out the new jersey convention and exposition center for eid prayers. very interestingly enough, no the convention center’s site, there’s a “events calendar…” — i took a screenshot of the calendar because this will go away tomorrow… (if its showing up small, click the image for the full size picture).

imagine that… “pakistani prayer service” – mind you, this masjid is mostly arabs too… i wonder if they won’t let me in because i am egyptian… Allahu a3lam.

Categories: islam, random Tags: ,