Showing posts from March, 2012

Expanding a string

The problem: We have a string like this: my $ str = 'perl-{file-{which,basedir,copy-recursive},pathtools,path-class}' ; ... and we need to expand it into: ( 'perl-file-which' , 'perl-file-basedir' , 'perl-file-copy-recursive' , 'perl-pathtools' , 'perl-path-class' , ) Solutions: One-line solution:  split q{ } , qx(echo $string) ; Go: Perl: Sidef: Sidef:


GD::Simple is a simple interface to the GD  library, which is an open source code library used in dynamic creation of images by programmers. If you like math, this library will bring a lot of fun in your life. :) Images : Scripts :

YouTube Viewer

# GTK YouTube Viewer This application came to life in 12 September 2010 as my first GTK2/Glade learning project. gtk-youtube-viewer Its scope is to search and play YouTube videos in a native player.  It comes with various search options; it can search for videos, playlists and/or channels. The videos are streamed directly in a selected video player at the best resolution (customizable) and with closed-captions (if available). By default, the application supports three video players: MPV (recommended), MPlayer and VLC, but it allows the addition of more players inside the configuration file. For a better experience, the application also comes with built-in authentication support, using the OAuth 2.0 mechanism. After inserting the authentication token, a new tab will appear, named "My panel", which has the following buttons: Subscriptions Favorited videos Liked videos Disliked videos Uploads Playlists Log out For more details (+screenshots), see also: