School is over, got a job. 
July 21st, 2008Category: My Life, Work1 Comment
Officially, today is my first day at my new job. I started work in UBS A.G. - Investment Bank in the IT Equities department. We spent most of the day, today, listening to various presentations and speeches. I am saying officially, because I started last Monday as I had to go trough a pre-week financial and accounting training. I now live in Stamford, CT and my new place is not bad, it only lacks an AC, but not for long.
Because I work in a bank now, I will have to be careful what I write here and I have to put some disclaimers here and there that all you read here is my personal opinion and does not reflect that of my employer… the general stuff. However that will happen some other day because it is late now and I have to get up at 7am tomorrow.
We got ourselves inline skates 
June 19th, 2008Category: My LifeNo Comments

Both Dary and I love to skate, but the skates we have in Bulgaria are quite old and beaten up, at least mine are, so we decided to get ourselves new ones. Hers are Rollerblade Spiritblade III - 2008 (left on the picture), mine are K2 Moto - 2007 (right on the picture). I gave mine quite a run the other day in the park. Also I did try them here on the street. Dary only tried hers here, but not as much as I did.
Perl script for sending mail trough Gmail 
June 19th, 2008Category: My LifeNo Comments
Nothing fancy, just a few prompts and use of Net::SMTP::SSL and Authen::SASL
#!/usr/bin/perl -w# Send email from Gmail# Will not work on windows, because of the echo# for the password. Just uncomment the two# system lines and should be fine.# Will wait for EOF (Ctrl+D) for the msg body.# by GTuse Net::SMTP::SSL;my $smtp;my $username = 'youremail@gmail.com';my $password;my @lines;my $msg = "";my $to;my $subject;$smtp = Net::SMTP::SSL->new('smtp.gmail.com', Port => 465, Debug=>1) || die "Cannot connect to server" ;system('stty -echo');print "Enter password:";$password = <STDIN>;chomp $password;system('stty echo');$smtp->auth($username, $password) || die "Authentication failed";print "\nTo:";$to = <STDIN>;chomp $to;print "Enter subject:";$subject = <STDIN>;chomp $subject;print "Enter message:\n";@lines = <>;foreach $line (@lines){$msg = $msg.$line;}$smtp->mail($username."\n");$smtp->to($to."\n");$smtp->data();$smtp->datasend("From: ". $username."\n");$smtp->datasend("To: ".$to."\n");$smtp->datasend("Subject: ".$subject."\n");$smtp->datasend("\n");$smtp->datasend($msg."\n");$smtp->dataend();$smtp->quit;- Свалете този код/download this code: gmailsmtp.pl
Archival of video podcasts 
June 18th, 2008Category: My LifeNo Comments
I’ve picked a few video podcasts that I like to watch. But because there is a lot of info there, quite some time ago I decided to start archiving them and make them accessible from everywhere I have internet. That involved a simple web page and converting every episode to flash to avoid codec problems. The best part is, that all of them have some type of rss feeds and make it easy to get the url to the video file, a description and some other useful info. So I sat down and wrote the following script:
#!/usr/bin/perl -w# This script gets the latest Systm Podcast feed.# It will check if the episode is downloaded and if not,# it will download it, generate a .flv video, look for the# $flag entry in index.html and will insert html code for# the downloaded episode.## Requires: ffmpeg, flvtool2, mencode and convert (IM)### by Georgi Todorov##use strict;use XML::RSS;use LWP::Simple;use Date::Format;use Date::Parse;my $duration;my $image;my $url2parse;my $title;my $url;my $desc;my $ep=0;my $fname;my $class;my $line;my $i=0;my $date;my @asdf;my @splitted;my $extension;my $enc;# Create new instance of XML::RSSmy $rss = new XML::RSS;# Get the URL, assign it to url2parse, and then parse the RSS content$url2parse = get("http://revision3.com/systm/feed/quicktime-high-definition");#print $url2parse;$rss->parse($url2parse);# Print the channel items#print $rss->as_string;open OLDINDEX, "<index.html";open NEWINDEX, ">newindex.html";my $flag = "<!--start-->";while ( $line = <OLDINDEX>){chomp($line);if ($line eq $flag){print NEWINDEX $line."\n";$i = 1;}if ($i == 0){print NEWINDEX $line."\n";}else{foreach my $item (@{$rss->{'items'}}) {next unless defined($item->{'title'}) && defined($item->{'enclosure'});$date = time2str("%A, %B %o, %Y", str2time($item->{'pubDate'}));$date =~s/ +/ /gi;$url = $item->{'enclosure'}->{'url'};@asdf = split(/\//, $url);$ep = $asdf[$#asdf-1];$ep =~s/^0*//;$title = "Episode ". $ep;@splitted = split(/\./, $url);$extension = $splitted[$#splitted];if ( $ep%2 == 0 ){$class = "left";}else{$class = "right";}$fname = "Systm Episode ".$ep." (".$date.")";$desc = $item->{'description'};print "-------- Working on $title --------\n";print "Looking for $fname.$extension ...";if (-e "$fname.m4v"){print "found. Skipping.\n";}elsif (-e "$fname.flv"){print "found. Skipping.\n";}else{print "not found. Downloading:\n";system ("wget $url -O \"$fname.$extension\"");print "Generating a Thumbnail and Encoding:\n";system ("ffmpeg -y -i \"$fname.$extension\" -f image2 -ss 100 -vframes 1 -an out.jpg");system ("convert out.jpg -resize x100 -quality 95 \"images/$fname.jpg\"");system ("rm out.jpg");system ("./encode2 \"$fname.$extension\" \"$fname.flv\"");system ("flvtool2 -UP \"$fname.flv\"");$duration = `/usr/bin/ffmpeg -i \"$fname.flv\" 2>&1|grep Duration|cut -d \":\" -f 3,4|cut -d \",\" -f 1`;print NEWINDEX "<div class=\"$class\">\n";print NEWINDEX "\t<div class=\"imglt\">\n";print NEWINDEX "\t\t<img src=\"images/$fname.jpg\" alt=\"$fname\" /><br />\n";print NEWINDEX "\t\t<a href='javascript:flowPlayerOpenFullScreen(\"$fname.flv\")' class=\"download_button\" >Play</a>\n";print NEWINDEX "\t\t<a href=\"$fname.mov\" class=\"download_button\" >Download</a>\n";print NEWINDEX "\t</div>\n";print NEWINDEX "\t<b>$title ($date)</b<br />\n";print NEWINDEX "\t<b>Length:</b> $duration\n";print NEWINDEX "\t<p>$desc</p>\n";print NEWINDEX "</div>\n";if ($class eq "right"){print NEWINDEX "<div class=\"clear\">\n";print NEWINDEX "\t <br />\n\t \n";print NEWINDEX"</div>\n";}}print "-------- DONE --------\n";}$i = 0;}}close OLDINDEX;close NEWINDEX;system("mv index.html oldindex.html&&mv newindex.html index.html");- Свалете този код/download this code: updatepodcast.pl
It works pretty good for now. encode2 just contains the looooong mencoder command for encoding to flv:
mencoder "$1" -o "$2" -of lavf -ovc lavc -oac lavc \-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames \-lavcopts vcodec=flv:vbitrate=800:autoaspect:mbd=2:\mv0:trell:v4mv:cbp:last_pred=3:predia=2:dia=2:precmp=2:\cmp=2:subcmp=2:preme=2:turbo:acodec=mp3:abitrate=56 \-srate 22050 -af lavcresample=22050- Свалете този код/download this code: encode_to_flv
We completed the puzzle 
June 16th, 2008Category: My LifeNo Comments
Around January this year, while we were in one of the big stores here, we found ourselves next to the puzzle isle. So we decided to get a puzzle for ourselves. Of course, typical for us, we wanted the most complicated one. For 10 bucks we ended up getting The Chase by John Hyde with size around 27×20 inches with 1000pcs. We started solving it before the semester and we did the majority of it. However the semester started and we couldn’t finish it. Two days ago, we remembered about it and decided to finish it. We put it on the table and about 4 hours later we had it done. We had the most difficult part left - the one with all the black pieces, where only the shape of the piece was our guide for solving as they were all black. Here is how it looks:

Some more videos 
June 15th, 2008Category: My LifeNo Comments
The videos for the graduation ceremony (no sound at the beginning) and the other footage that we shot while my guests were here are ready:
Graduation
Guests in May
I graduated 
June 9th, 2008Category: My Life2 Comments

It’s not much but it is a start… A few weeks ago was the ceremony. To be honest, I don’t feel like I have a better degree than people without college education. I will definitely have to continue. The cool thing was that all my family came to see me and we had a great time. Here are some pictures. We also went fishing and we caught 18 stripped bass and 3 blue fish. Here are the pictures and the video.
First publication 
May 8th, 2008Category: My Life1 Comment
Well, I was just informed that my first publication in a scientific peer-reviewed journal has been accepted. The name of the journal is Journal of Applied Crystallography of the International Union of Crystallography. The title is VCIF2: Extended CIF Validation Software and my coauthor is Prof. Herbert J. Bernstein.
Various 
May 8th, 2008Category: My LifeNo Comments
Exactly one week from today is the last day of my last semester at Dowling. They say I will be graduating after that. The situation is pretty calm. I do not have tons of papers and finals to think about. I have only one paper for Const. of Personal Identity and a take home final for the same class, a small project for Design with Computer II, and a final for Intro to Spreadsheets and VBA. For the POCSR, I have a working project - iDiet. No big deal. I plan to finish everything by the end of this week, so that I am free next week.
Wordpress 2.5 maybe has holes 
April 10th, 2008Category: My Life2 Comments
I updated my wordpress to 2.5 recently. Yesterday I was surprised by a bunch of iframes in every single wordpress file. Dang! I think there isn’t a patch for that yet and I added a small piece of code to record my POST variable so I have more info next time it happens, if it happens. Until then, I can only run my perl one-liner in the directories:
клик
edit: it could have happen trough Coppermine. I don’t know. The funny thing is that I found this post:click
Georgi’s Blog is proudly powered by
WordPress
Постове (RSS)
and Коментари (RSS).

21 queries. 0.607 seconds.

