Archive for the ‘Projects’ Category

Kohana 3 RHEL/CentOS RPMs

Friday, May 28th, 2010

As I have not found any available, here is my build for Kohana – the PHP development framework – for RHEL 5 based operating systems.

You can find Kohana RPM for the current stable release 3.0.5 here, and the source RPM is available here in case you want to rebuild it yourself (and you might, details follow). New releases to correspond with new releases from Kohana will be updated there as needed.

This package is built on a CentOS 5.4 machine, with pretty much default settings.

(more…)

Script day – randomly rotate GNOME desktop backgrounds

Tuesday, July 1st, 2008

I kind of collect desktop wallpapers – I have a lot of those, several thousands(1). It is a bit ridiculous as I mostly use maximized windows all the time so if not for the fact that in work I live on the console and I have a transparent terminal, I would rarely see my desktop wallpaper.

That being said, with a wallpaper collection, you want a software to manage it and cycle your desktop through the wallpapers. KDE has this function built it – just go to configure your wallpaper and select a directory of wallpapers, choose whether you want to cycle through the images sequentially or randomly, the delay and your done.

Not so in GNOME – simplicity for simplicity’s sake (more…)


  1. mostly anime and video games fan made as well as promotional walls, a lot of hobby photographs – mine and other people’s, and a few more professionally made art []

Script day – read configuration files

Wednesday, April 23rd, 2008

This is not really a script – more of a snippet. I don’t have a lot of spare time these days, so I can justify posting a snippet and calling it “script day” 😉 .

A lot of unix configuration files use the # sign to add comments to configuration files, and a lot of software comes with very well documented files – i.e. has lots of comments. So much that if you just want a quick glimpse at the configuration that is active (not commented out) its very difficult to wade through all the documentation.

Here’s a simple grep that will filter out all the junk and leave you with just the active configuration settings:

egrep -v '^(#|\s*$)' <config file>

and on the standard output you’d get only lines that are not commented out or empty.

Do note that some configuration files can also use ; as a comment character, but modifying the grep to support this is trivial.

Script day – find Java jar files that contain a Java class

Monday, November 12th, 2007

From time to time I need to work with a Java program or library that requires some import which I’m not familiar with. Its often very easy to just copy the fully qualified class name and search for it on Google which usually helps identify the product that contains this class.

But if you know that you have this class on your system somewhere, and you are just not sure which jar file you need to add to your project for it to compile – this script will come in handy:

(more…)

Script day – simple log graphing toolּ

Wednesday, November 7th, 2007

I wrote similar versions of this script over the years to analyze all kinds of logs, but here’s one for posterity:

This script is useful if you have a log for which you want to analyze load over time – transactions per second or whatnot (the version below does this for Apache httpd logs, but it can be easily modified to analyze anything). For apache (and most other HTTP servers) there are many readily available log analysis software packages that do a much better job then what one can do in a simple script, but you might not have such software pre-configured or it can’t filter what you need or you just want to analyze something else – in which case this script will come in handy.

The script receives time stamped log events – each event on a line – and collects the temporal information for each line. Then it will dump a simple vertical graph (i.e. time is on the Y axis) of load over time in the resolution that you want. Its output looks something like this:

Oct 30 14:40:00 2007 |#############                                    | 3.8 x/sec
Oct 30 14:50:00 2007 |##########################################       | 6.3 x/sec
Oct 30 15:00:00 2007 |###########################################      | 6.5 x/sec
Oct 30 15:10:00 2007 |#############################################    | 6.6 x/sec
Oct 30 15:20:00 2007 |###############################                  | 5.4 x/sec


(more…)

Script day – manually find a thumbnail for a video

Friday, November 2nd, 2007

In a vain effort to fuel my blog with some content ( 😉 ) I’ll try to get into the habit of posting some throw-away scripts I’m writing for my personal use (at work and at home). Hopefully some people would find them interesting, or maybe – god forbid – useful.

Today we have a script that will help you pick out a nice thumbnail for a movie file – this is useful when setting up movie galleries and stuff. Of course it can be done automatically (most gallery software that support video files has automatic thumbnail extraction) but they rarely choose the best shot. The script here below would extract 100 frames from the first 30 seconds of a movie file and display them using an image browser. The script would also open a file browser window – the user will then pick the desired thumbnail image and drop it into the file browser, and then close the image browser. The script would then complete the process by naming the selected thumbnail image to be the same name as the original movie (with a different extension of course).

(more…)

הפעלת חלונות XP תחת מכונה וירטואלית בלינוקס

Tuesday, August 21st, 2007

החל מגרסה 2.6.20 של גרעין מערכת ההפעלה לינוקס, נוספה יכולת למערכת ההפעלה המאפשרת להריץ מכונה וירטואלית(1) על גבי מערכת ההפעלה עצמה, ללא תוכנה חיצונית. אם יש ברשותכם מחשב המריץ גרסה עדכנית של מערכת הפעלה מבוססת לינוקס, הנה רשימת הצעדים כדי להפעיל את חלונות בתוך מכונה וירטואלית, בלי לכבות את הלינוקס ובלי צורך בתוכנה נוספת (כמו VMWare או VirtualBox), בעזרת KVM : Kernel Virtual Machine.

(more…)


  1. תוכנה המדמה מחשב נוסף []

דרושה: ספריה

Sunday, July 31st, 2005

קראתי את הפוסט האחרון של xslf באתר שלה (ברוכה השבה לארצנו) ודבר אחד עורר בי תהיה – היא מדברת שם על שני ספרים שקראה, ומקשרת אותם לעמוד המתאים באמזון – כמו שכולם עושים.

דבר שלחלוטין לא ברור לי. (more…)


Spam prevention powered by Akismet