Lukášův bloček http://blog.nuane.com Random photos, thoughts and notes posterous.com Mon, 22 Feb 2010 09:28:00 -0800 One slice is not enough http://blog.nuane.com/one-slice-is-not-enough http://blog.nuane.com/one-slice-is-not-enough

This week, I'm looking after two rats at my workplace. Today, despite being warned against this, we made a mistake of leaving a single slice of bread on the floor for them. Unfortunately, the first one to notice wanted the whole think for himself. This soon caught the attention of the other one (who was hidden somewhere until then and completely out of sight) and a fight was inevitable :-(

two-rats-and-one-slice.avi Watch on Posterous

Needless to say, we won't do this again next time!

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Wed, 20 Jan 2010 14:37:00 -0800 Posterous API for C# (and VB.NET) http://blog.nuane.com/posterous-api-for-c-sharp http://blog.nuane.com/posterous-api-for-c-sharp

Let me introduce my latest creation - Posterapi - a C# wrapper for Posterous API, complete with source code and samples!

Few months ago (see here), I discovered there was most likely no usable and free C# wrappers for Posterous API. So I decided to write one myself. It took me two months, but the first beta has just been released today

Check out Posterapi homepage and sample code for more information, or just download the latest binaries and samples or the source code (MIT-style license). All currently available features except Posterous Twitter API are implemented (let me know if you would like to have that as well).

To publish a new post with 2 photos, a simple code like this can be used:

// Initialize an authenticated posterous session
    PosterousSession session = new PosterousSessio(email, password);

    // Construct a new post and attach two photos
    PosterousNewPost newPost = new PosterousNewPost();
    newPost.Title = "New post!";
    newPost.Body = "This is the body of the new post.";
    newPost.Tags = "posterous, api, photo";
    newPost.Files.Add("photo1.jpg");
    newPost.Files.Add("photo2.png");

    // Publish the post to the primary site (blog)
    PosterousPostInfo postInfo = session.PublishPost(0, newPost);

    // Display some information about the new post
    Console.WriteLine("Published as {0}", postInfo.ShortUri);

There are more samples - even a GUI posting application that is very useful for posting long videos that are not really suitable for e-mail submission.

I have to say that Posterous API doesn't really make it easy to put a nice .NET API on top of it. The available methods seem to be a random selection of its functionality. Some key functionality (at least in my opinion) is missing. Some examples:

  • Even if you know an ID of a single post, you can't easily download it.
  • If you know its post.ly shortcode, you can only download it if it's public - even if you are authenticated.
  • You have to know a Posterous hostname of a site to be able to download its posts. If you only know its custom domain (like lukas.pokorny.eu), there is no way to determine its Posterous hostname (pokorny.posterous.com).
  • Only "basic" authentication is currently available. This is not secure because the password is transferred in near-plaintext.

This means that if you feel that some part of Posterapi is not pretty, it might not necessarily be my fault ;-)
Of course, if you find something you really don't like or if something is not working as expected, please let me know. This is still a beta and I only tested the features I actually need. Report all the bugs here.

If you find this useful, please let me know!

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Mon, 04 Jan 2010 13:49:00 -0800 Foggy wood on New Year's Day http://blog.nuane.com/foggy-wood-on-new-years-day http://blog.nuane.com/foggy-wood-on-new-years-day

Let's hope this year won't be as foggy as its first day!

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Fri, 11 Dec 2009 04:24:00 -0800 Sign of Satan stolen from St. Agnes Home http://blog.nuane.com/sign-of-satan-stolen-from-st-agnes-home http://blog.nuane.com/sign-of-satan-stolen-from-st-agnes-home

The 666 sign, or the number of the Beast, was stolen from a house at Lublaňská street in Prague. To make this even more amusing, the building itself houses "Domov svaté Anežky", or "St. Agnes Home"!

The first photo (with the sign still present) comes from Google Street View, I hope they don't mind.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Sat, 05 Dec 2009 11:43:00 -0800 How do I get post.ly URLs of my posts? http://blog.nuane.com/how-do-i-get-postly-urls-of-my-posts http://blog.nuane.com/how-do-i-get-postly-urls-of-my-posts

I noticed that people who don't use Posterous' autopost functionality are using various third-party URL shortening services when manually linking to their posts. At first I thought that it's quite strange since Posterous has it own post.ly service, but I soon realised that shortened URLs for my existing posts are nowhere to be found.

But then I discovered that each Posterous post does in fact have its own post.ly URL, although it's only available through Posterous API. For example, to get post.ly URLs of my posts, enter http://posterous.com/api/readposts?hostname=pokorny into your browser and - voila! - the post.ly URLs appear. Simply replace my my name with your own hostname to get your posts as well.

Even though this works perfectly, I have found out that it is quite frustrating having to search the whole XML for post.ly URL of older posts. To make it even simpler, I have simply wrote a tiny application that does it for me - the post.ly helper! Now, all I have to do is type in a Posterous hostname and I get the list of my posts with post.ly URLs back.

This is simply too good to keep only for myself, so if you find it useful as well, please let me know.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Thu, 03 Dec 2009 11:00:00 -0800 Galway cathedral http://blog.nuane.com/galway-cathedral http://blog.nuane.com/galway-cathedral

Another set of photos from 2003. The interior of the cathedral in Galway looks like it was rendered by a computer program, but it's real. In the 1960s, Brian Trevaskis called it a monstrosity on TV, which was shocking at the time in Ireland.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Sun, 29 Nov 2009 14:32:13 -0800 Jesus and the breakfast barbecue http://blog.nuane.com/jesus-and-the-breakfast-barbecue http://blog.nuane.com/jesus-and-the-breakfast-barbecue
Jesus

Really, Jesus can do anything, at least in Dublin. Another amusing old photo from our visit to Ireland in 2003.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Sun, 29 Nov 2009 14:29:00 -0800 Howth Junction, the most boring place in Ireland? http://blog.nuane.com/howth-junction-the-most-boring-place-in-irela http://blog.nuane.com/howth-junction-the-most-boring-place-in-irela

Golfing-prohibited

I spent 40 minutes there 6 years ago, waiting for a train and wandering around. There was nothing interesting at all. And nothing to do - even golfing was prohibited! But surprisingly, this place has its own page at Wikipedia now.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Sat, 28 Nov 2009 06:40:00 -0800 How to get rich fast http://blog.nuane.com/how-to-get-rich-fast http://blog.nuane.com/how-to-get-rich-fast

How to get rich fast? If you are living in a country like Vietnam where copyright law is just for fun and you know how to write software, it's rather easy:

  1. Purchase a source code to some commercial software components.
  2. Rename all namespaces, methods, properties, etc.
  3. Throw away the samples and write new ones.
  4. Compile, repackage and sell as your own work!

But what if someone finds a bug or needs to solve some complicated problem? Well, that's very easy to solve:

  1. Generate 10 fake names and get free e-mail accounts for them at Gmail, live.com or Yahoo.
  2. Send the complicated support request to the real vendor using one of these fake identities.
  3. When you get response, pretend you wrote it yourself and send it to your customer. Problem solved!

And to make it even more efficient:

  1. Pretend you are a US-based company. Get a virtual office.
  2. Pretend to have some additional seldom-used features no one really needs.
  3. Search various forums for links to the original vendor's products and add your own to save time.
  4. If someone asks you about the similarity, pretend there is not any or just ignore them.
  5. If you can no longer ignore them, pretend you outsourced all your development and support to China and didn't know about any infringement :-)

Does this sound too far-fetched? It sure does. But it's exactly what a company (?) called ComponentForge or Safabyte did! Check out the website about ComponentForge/Safebyte scam if you are interested in details.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Sat, 14 Nov 2009 10:40:00 -0800 Podivuhodný Ind http://blog.nuane.com/podivuhodny-ind http://blog.nuane.com/podivuhodny-ind

Ind má 12 prstů, 84 centimetrů, 35 let se nemyje, živí se trávou a popíjí benzín. Za ženu si vzal fenu, svatebčany upálil a své dcery posílá orat nahé. Patnáct let trucoval na stromě a upálil se, protože nedostal k večeři maso. Šest let čekal v hrobě na smrt a pak se bezostyšně dostavil na svůj vlasní pohřeb.

Už mnoho let si v novinách všímám podivných historek, jejichž protagonistou je jakýsi Ind. A dějí se mu naprosto neuvěřitelné věci. Nashromáždil jsem už tolik odkazů, že by to vydalo na blog, takže tady je: Podivuhodný Ind! Jakékoliv další příběhy tohoto Inda jsou vítány!

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Tue, 10 Nov 2009 05:01:00 -0800 Oběd s Lik http://blog.nuane.com/obed-s-lik http://blog.nuane.com/obed-s-lik

Je to zvláštní, ale až dnes jsem poprvé viděl někoho modlit se při obědě. Děkuji Lik za nevšední zážitek :-)

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Mon, 09 Nov 2009 14:26:00 -0800 Still not sure which language to use here... http://blog.nuane.com/still-not-sure-which-language-to-use-here http://blog.nuane.com/still-not-sure-which-language-to-use-here

I don't really like the idea of maintaining multiple sites on Posterous, but it is very difficult for me to choose which language to use here. English makes sense for more interesting posts or for links to English websites, while Czech might be more suitable for posts that are actually about me. Apparently, I am not the only one trying to figure this out - Adam seems to be experimenting with two-language posts at the moment, but I'm afraid this would be too time-consuming. We shall see.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Sat, 07 Nov 2009 12:07:00 -0800 Posterous API for C# http://blog.nuane.com/posterous-api-for-c http://blog.nuane.com/posterous-api-for-c

Interestingly, Google searching for Posterous API C# doesn't return anything useful. Just few not-quite-finished code snippets. And no, replacing C# with VB.NET doesn't help either. Does this mean I'll have to write a C# wrapper for Posterous API myself?

Update: My C# Posterous API wrapper is available now!

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Mon, 28 Sep 2009 01:43:00 -0700 I met this nice insect yesterday http://blog.nuane.com/i-met-this-nice-insect-yesterday http://blog.nuane.com/i-met-this-nice-insect-yesterday

Grasshopper

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Fri, 17 Jul 2009 10:52:00 -0700 Just found some edible mushrooms in the wood http://blog.nuane.com/just-found-some-edible-mushrooms-in-the-wood http://blog.nuane.com/just-found-some-edible-mushrooms-in-the-wood

And arranged some of them on a grass lawn for fun - looks obscure :-)

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Sun, 14 Jun 2009 13:10:00 -0700 After 11 years, I have a homepage again http://blog.nuane.com/after-11-years-i-have-a-homepage-again http://blog.nuane.com/after-11-years-i-have-a-homepage-again

It's actually mostly a syndication of content present elsewhere. You can find it at nuane.com.

 

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Sat, 06 Jun 2009 14:00:00 -0700 I just got a Flickr account http://blog.nuane.com/i-just-got-a-flickr-account http://blog.nuane.com/i-just-got-a-flickr-account

And posted some of my photos there.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Mon, 01 Jun 2009 01:42:00 -0700 Paroubek s přateli řeší krizi http://blog.nuane.com/paroubek-s-prateli-resi-krizi http://blog.nuane.com/paroubek-s-prateli-resi-krizi

Paroubek-s-prateli

Rukou společnou a nerozdílnou. Neodolal jsem a taky jsem jim do Reflexu přispěl.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Sun, 10 May 2009 12:00:00 -0700 Westrey photos also online http://blog.nuane.com/westrey-photos-also-online http://blog.nuane.com/westrey-photos-also-online

I've just publisehd my photos photos from Westray. Enjoy the puffins! Hopefully I'll add photos from Rousay and Hoy soon.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný
Sat, 02 May 2009 12:00:00 -0700 My Orkney Photos Online http://blog.nuane.com/orkney-photos http://blog.nuane.com/orkney-photos

The photos from my 2007 and 2008 Orkney visits are online at last - orkneyphotos.com. Or at least a small part of them from the lovely isle of Sanday.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/328287/lukas.png http://posterous.com/users/36umfUu4VZZL Lukáš Pokorný Lukas Lukáš Pokorný