Archive

Archive for the ‘Useful stuff’ Category

Capturing frames of ASX / MMS stream with MPlayer

January 20th, 2010 No comments

This will allow you to capture a single frame from a ASX / ASF / MMS stream. Be aware if the ASX contains more than 1 file, you will get more than 1 screen capture. Also remember to use the playlist option for ASX streams

mplayer -playlist http://xxxxx -ss 1 -frames 1 -vo jpeg

When building mplayer you will need libjpeg – do mplayer -vo help to list available output options.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
Categories: Linux Tags:

Count number of open files in LINUX

December 9th, 2009 No comments

lsof | wc -l

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
Categories: Linux Tags:

Make phone call with Iphone API

November 30th, 2009 No comments

NSURL *phoneNumberURL = [NSURL URLWithString:@"tel:8005551234"];
[[UIApplication sharedApplication] openURL:phoneNumberURL];

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
Categories: XCode / C Tags:

URL escaping in Javascript

November 16th, 2009 No comments

Though normally you can use the escape function for this, note to full URL encode an actual URL, use encodeURIComponent instead … saves a lot of headaches when deailing with ajax ….

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
Categories: Javascript Tags:

Get useragent in JSP file

October 28th, 2009 No comments

request.getHeader("user-agent");

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
Categories: Java, Uncategorized Tags: