Posts

Showing posts from March, 2012

Expanding a string

Image
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:  https://github.com/trizen/go-learning/blob/master/abs_string.go Perl:  https://github.com/trizen/perl-scripts/blob/master/Text/abs_string.pl Sidef:  https://github.com/trizen/sidef/blob/master/scripts/absolute_string.sf Sidef:  https://github.com/trizen/sidef-scripts/blob/master/Text/shell_string_expand.sf

GD::Simple

Image
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 :  https://goo.gl/photos/6n1KzxZNxW6tTsxe8 Scripts :  https://github.com/trizen/perl-scripts/tree/master/GD

YouTube Viewer

Image
# 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: