10th anniversary of Polish Wikipedia
Last weekend, as a long-standing Polish Wikipedian, I went to Poznań to celebrate the 10th anniversary of Polish Wikipedia.
The event started on Friday, September 23th and went on until Monday, September 26th, the actual date of establishing Polish Wikipedia. During that time, I’ve met old friends, colleagues, and newcomers to our project. The event took place in Multikino cinema in Shopping, Arts and Business Center “Stary Browar” (lit. “Old Brewery”), a place dating back to 1844, when Ambrosius Hugger, a Wirtembergian brewer, came to Poznań to start his brewery there.
Author: Radomil. License: CC-BY-SA
Almost 200 people came to celebrate with us and to participate in talks and presentations, making it the biggest Wikipedia meet-up in Poland so far. As usual, there were also guests from other countries: we were visited by Wikipedians from Germany, Czech, Belarus, Philippines, Hungary, Ukraine and Russia. On Friday we spent time on getting together, drinking beer and organizing our stay in hostels.
The actual event started on Saturday with a discussion between founders of Polish Wikipedia, Paweł Jochym and Krzysztof Jasiutowicz, who told us about the beginnings of Polish Wikipedia and how they imagine its future. What’s worth noting this is also the first time these founders actually met each other. Before now they only collaborated on the encyclopedia online, and we’ve never seen them together during one conference. Other speakers included: Jan Wróbel (a contributor to a weekly newsmagazine Wprost), Piotr Marcinkowski (vicepresident of Library of University of Poznań), Sylwia Ufnalska (translator and science journalist), Jarosław Lipszyc (president of Modern Poland Foundation) and Edwin Bendyk (famous editor, blogger and journalist).
We also had a chance to see a documentary Truth in Numbers? Everything, According to Wikipedia, which explores the history and cultural implications of the online user-editable encyclopedia Wikipedia. The film attempts to answer the question of whether all kinds of individuals or just experts should be tasked with editing an encyclopedia.
Apart from that, there was a surprise made by Wikimedia Polska Association for all editors: a video with congratulations on the anniversary from famous Polish people:
Congratulations for our work were given from: Polish president Bronisław Komorowski, professor Jerzy Bralczyk, Bartłomiej Chaciński, Ilona Łepkowska, Marek Niedźwiecki, Krzysztof Skowroński, Mariusz Szczygieł and Ewa Wachowicz. President Komorowski encouraged to edit Wikipedia and share the knowledge, Mariusz Szczygieł and Marek Niedźwiecki admitted Wikipedia helps them in their work, and professor Bralczyk expressed his pride in Polish Wikipedia being one of the biggest language version of this encyclopedia.
Author: Polimerek. License: CC-BY-SA 3.0
And thus, the event concluded on Sunday, with a group photo of all the attendees, after which all of us started going home, tired, but happy after seeing each other again, hoping we can make the best of this great project, to which we contributed over past decade. And that is what I wish to Polish Wikipedia for this and next decades to come! Let’s make the best encyclopedia ever!
Photos from the event are available on various free licenses on Wikimedia Commons in [[Category:10th birthday of Polish Wikipedia]]
Railcamp Poland after some time
In April, we, in cooperation with few Rails community companies, have organized the first edition of Railscamp Poland. Railscamp Poland took place in Wisła, the same Wisła where Adam Małysz, a legendary former ski jumper, is from. We are very happy how the event turned out, and that many people spoke well about the organization of it.
So, right now, when I look back at the event, what do I see?
I see happy people, getting together, in one case, to have a good time while doing what they like! And all the time we did just that. There was a bit of coding, but mostly we had fun playing Guitar Hero, singing, playing Urban Terror.
Some quick (and not entirely accurate) facts about Railscamp Poland:
During the event, people:
- drank 20 liters of vodka,
- drank 40 liters of Club Mate,
- eaten 50 kilograms of pizzas,
- eaten 120 sausages,
- got 250 euro from a deposit for returned beer bottles,
- wrote daily 4000 lines of code (including 2600 while drinking), which test coverage is at 100%
Again, big thanks to these guys for making this possible:
The photos from the event are available on Flickr and Ipernity.
How to clone a repository into another repository from a specific point
While working on our project I had to create a repository clone up until a specific commit. So, I began researching and after trial and error, I finally made it. Therefore, I thought I will share what I’ve done with the community, as copying a git repository is not the easiest task.
Below you will find git commands I used to do so, and below the code, quick explanation of the steps
First you have to initialize new git repository, then add both remote repositories:
- the one you want copy into as origin
- the one you want to copy from as to-clone
Then you have to fetch and checkout to-clone master (or whichever branch you want to clone). By now you should be in a “detached HEAD” state. At this point you can do to the repository whatever you want, including discarding commits, reverting, commiting new changes, etc. You can also use external tools like tig.
So, before we do that, let’s reset to the commit we want to copy the repository to. In my case, I wanted to do git reset --hard 83d81abc... The parameter --hard was necessary to remove commits made after this commit, so I could copy the repository without experimental commits made afterwards.
After you’re done, use git checkout -b master to save the changes you’ve done under new branch master and now you’re ready to push the changes to the new remote repository you want to copy to.
git push origin master makes it’s first appearance here, and now you’re set. The repository to-clone has been copied at specific point to origin. Hope that little tutorial will help somebody in the future!
Introducing simple Facebook Share gem
I really love how JavaScript can help you integrate social media into your application. But using the same code over, and over again is just annoying. Therefore, when I was working on inserting a Facebook share button here and there into our app, I thought, why do I have to repeat everything over and over? So, after a day of hacking, I came up with a simple gem facebook_share. This gem will insert any JavaScript needed for Facebook share buttons to work.
How does it work?
Well, that’s rather simple. After the gem is installed (gem install facebook_share), add this snippet to your ApplicationHelper, and you’re almost ready to go.
Then create file config/initializers/facebook_share.rb with the content below (later versions will automate this process, too). Remember that every parameter here is optional, also that you can include more parameters.
After you type your Facebook application ID, you’re ready to go!
Is it that easy?
Yes, it’s that easy. If you want to share current page, all you have to do is:
But how do I customize it?
What if you have more items I want to share? Or the default selector doesn’t work for your application. Maybe you want to use Dojo? Everything is customizable. For example, you can customize your default settings with facebook_share.rb initializer, and then override these settings while calling helper methods. I will show you couple of examples and showcase most of public methods in the gem.
If you edited your config initializer, at most of the times you won’t need to pass any parameters to the helper functions, but for the sake of the examples, let’s say you’re running both Dojo and jQuery in your project, you have several Facebook applications you want to use, etc.
Example 1: Different selector
will produce:
Example 2: But I already have my JS part!
Probably you already have your Facebook app initialized in your layout and put the #fb-root div tag in there.
will produce:
You can easily switch which JavaScript snippets you want to use.
Example 3: Can I initialize any Facebook application?
Yes, you can. Albeit this gem being mostly for sharing links on Facebook, it can also be used to ease initialization of a Facebook app. For example, it you feed your facebook_share initializer like so:
You can simply do:
in your application layout to get:
Notice how locale‘s value of pl was transformed into pl_PL to meet Facebook expectations, and how only relevant values are included in the Facebook initialization script. Watch out for wrong locales, though, and do not use :locale => "en", as it will produce en_EN, and Facebook will not recognize this code as a proper language.
Example 4: I want my share link to show a different title!
Sometimes you might want to put a more relevant title about what you want people to share on Facebook. Not a problem, every method accepts the same set of parameters (which, by default are configured in facebook_share.rb initializer), and within these parameters you can define any FB.ui parameters, and they will be passed on to that function.
Example 5: But I don’t use jQuery/Dojo!
Again, not a problem, if you have configured your facebook_share initializer, that’s how you can do it:
That’s all, folks
I wrote this gem to help us all with the tedious task of copy/pasting the same Facebook JS code over and over again. I hope some people will find it useful.
In the meantime, install it, play with it, grab source code on github, fork it and code it up!






