Archive for the 'Free time' category

One hundred kilometers

published on September 06, 2012.

One hundred and two kilometers, and three hundred-ish meters, to be precise. I just got home from my latest “run", and that is the total number of kilometers I made (and tracked) on my longboard since I got it back in July. Maybe it doesn’t sound like much, but if someone would have told me 2-3 months ago, that I would do this much physical activity and actually like it and enjoy it, I would probably tell it’s just crazy talk. Me, getting up my arse from the chair and doing something outside? No way, dude.

Yes way, dude!

Getting into this longboarding thing is the bestest thing that happened to me in a while. Appart from it being healthy, making me feel awesome after a nice long ride, it also helps me clear my mind after a long day in the office. It’s just me, the board and the road. And it’s super fun! No, really, it is! You should try it. If you don’t trust me, ask Swizec, he’ll tell you the same.

The board itself is great, although the bearings are making some strange noise so I’ll probably change them soon. I’ll need to buy knee and elbow pads too, because this past weekend I had a nice little fall resulting in scratches and general pain on most of my body, so just to be prepared for the next time I decide to go downhilling. Lucky I had my helmet and sliding gloves on. Always wear a helmet. Always.

Now, onwards to the next milestone - one thousand kilometers. Until then,

Happy hackin’ and happy ridin’!

Tags: longboard, longboarding, fun.
Categories: Blablabla, Free time.

Ljubljana, Slovenia

published on July 23, 2012.

Last week I was on a vacation for a couple of weeks, and decided to spend a couple of days in Slovenia’s capital, Ljubljana. The fact that Swizec was on his way home with a car then (he’s from Ljubljana, mind you), made the decision easy. Thus, on the 18th of July, I woke up early in the morning, and by 7AM was off on the road for the trip.

The highway to Ljubljana was rather empty and it took us some 5-ish hours to get there from Belgrade. Swizec is a rather good driver, if we omit the fact that he almost drove through the Slovenian customs without stopping. Luckily, no cavity searches were conducted on us as the result of this little… bug.

I first checked in the Hostel Celica (hostelcelica.com), which is an old army prison redone as a hostel. It is located some 5 minutes from the bus and train stations and is surounded by “Metelkova”. Metelkova constists from a couple of streets with houses and warehouses completely reworked to be of service to the Ljubljanian youth and alternative/underground scene, full of cool graffiti and young people. At least that’s how I saw it. I planned to take pictures of all the graffiti, but somehow forgot about it. It would also probably taken me an entire day, there’s just so many of them! Anyway, the hostel is nice (this was my first stay in a hostel), it’s 28 euros per night and you get free wifi and breakfast. They have rooms with 2, 3, or 4 beds, but the beds are kinda small, even for me (I’m 180cm tall), but don’t forget it’s an old prison after all! The people working there are nice and ready to help, so I can’t say anything but praises about the place.

Later on we went to pick up Ponywithhiccups, went to grab some tasty dinner and enjoyed the view of Ljubljana from Nebotičnik’s 12th floor. The day ended with some drinks at the Green Rabbit - pri Zelenem Zajcu - and pancakes at some place where they mixed up our orders but got tasty nomz after all.

On the second day I got up early and got some time to walk around Ljubljana alone, like a real tourist, with a map in my hand, taking random pictures and just going around. The downtown of the city is rather small, so I was done with the sightseeing in about 60 minutes, so I went to Bikofe to wait for Swizec and to have some tea. When he finally! showed up, we had more tea and went to do the most important thing in these 3 days - to buy me a longboard! And so we did. I even managed to get me a nice 30% discount which saved me some 60 euros on the board, the helmet and the gloves. Awesome!

The day continued with a nice lunch and more tea, so we have enough strength for our next task - climbing up Ljubljanski Grad, which is an old castle overseeing the entire city and much of the region. Went through some museums, longboarded in the castle yard and climbed the tower. From up there, Neboticnik looked like a dwarf.

Once we climbed down, and after we had dinner, we ran into dude_dh and went to chill by the river. After that we joined up with the guys and girls longboarding at Kongrejsc, the main square in Ljubljana. The people were nice and friendly once again, sharing tips with me how to stay alive on the longboard, how to brake properly and how to control and/or avoid the speed wobbles. The night ended with me just cruising back to the hostel.

The third day was travel-back-home-day, so I woke up early (again!) and caught the 8:15AM train back to Belgrade. Some 12 hours later I was back home in Novi Sad, ready to pass out in the bed.

All in all, a very fun 3 days, spent with good friends and nice people. Can’t wait for my next trip to Slovenia.

P.S.: Have a look at some pictures.

Happy birthday Hex!

published on June 27, 2012.

I can’t really believe this - but my little company Hex is one year old! I know it sounds cliche, but it really feels like it was last week when I started this… adventure. It’s been one crazy year, that’s for sure.

Worked on some interesting and some very interesting projects. Learned a lot, but there’s still things to learn and skills to improve.

It was a fun ride so far and will continue to work hard as I really do enjoy all of this - with all of it’s ups and downs.

Special thanks goes to Vranac, for his hard work, friendship and mentorship - may we continue to create awesome stuff in the years to come!

Happy hackin’!

Tags: hex, company, about, birthday.
Categories: Blablabla, Free time.

Benchmarking pages behind a login with ab

published on November 09, 2011.

Tonight I decided to relax a bit and what better way of relaxing is there for a geek then to do some bash scripting?! So for fun and no profit I decided to try and benchmark pages with ab, Apache HTTP server benchmarking tool, which are behind a login. Turns out, it’s pretty easy after reading some man pages ;)

ab's help pages gives a few possible leads. We can POST data with the -p option, which would be great if we would like to benchmark the login process itself. But, we want to test the page after the login. So we’ll need the ab’s -C option, which allows for passing cookies in cookie-name=value pairs.

The login process itself is done with curl as it allows us to POST data to a server and store cookies received from the server in a cookie jar. curl writes the cookies in a Netscape cookie file format, whatever that is. Sample line is:

# Netscape HTTP Cookie File
# http://curl.haxx.se/rfc/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.

example.com	FALSE	/	FALSE	0	PHPSESSID	[RANDOM_SESSION_ID]

From this output we’re interested in the [RANDOM_SESSION_ID] cookie value, as the cookie name is simply PHPSESSID and we can just hard-code it. To get the value, we use some obscure *nix magic: grep and cut. grep to grep the line with the PHPSESSID cookie and cut to cut out the 7th column from that line. Easy!

Now that we have the value of the cookie, we just pass it along with ab and done! We’re benchmarking pages behind a login.

The entire script is:

#!/bin/bash

COOKIE_JAR="/tmp/ab-login-cookie-jar"

echo "Logging in..."

curl -c $COOKIE_JAR -d username=user -d password=h4x0r http://example.com/login

echo "Getting the session id..."
PHPSESSID=$(cat $COOKIE_JAR | grep PHPSESSID | cut -f 7)

echo "The session id is:"
echo $PHPSESSID
echo "=================="

ab -n 10 -c 10 -C PHPSESSID=$PHPSESSID http://example.com/loggedin

The script is also on Github here.

Tip: use ab’s -v option to test for HTTP codes and/or redirects to see if you are really on the page you want to be.

Happy hackin’!

PHP User Group, Novi Sad, Serbia

published on March 24, 2011.

For almost a year now, whenever time allows it, I’m working on a side project of creating a community of PHP programmers from around here. One of the first steps was, is, a website called PHPPlaneta about which I wrote back in October. After bringing this website to a relatively steady position, time has come to take another step: creating a PHP User Group! I’m really good at naming things so it is called “PHP User Group Novi Sad”, or pugns for short.

Actually I really don’t know what one has to do to create a user group, but I’ll just improvise along the way. So far, the date, time and the place for the first meeting is set: April 5th, 6PM, in a local coffee shop by the Danube river. A website thingy is also up: pugns, which is currently just a simple HTML page, but things will improve on that front too. The page of pugns is intentionally under a “directory”, because I’d love to host information about other PHP user groups from around here on the phpug.phpplaneta.net (sub)domain. It’d be nice to keep all relevant information under one “roof”.

Sooo… This will be an interesting ride, hope it’ll turn out fine :)

Of course, if anyone has some advice, tips and tricks about organizing user groups please do share them, that would be highly appreciated :)

Tags: meeting, pugns, user group.
Categories: Blablabla, Free time.
Robert Basic

Robert Basic

Software developer making web applications better.

Let's work together!

I would like to help you make your web application better.

Robert Basic © 2008 — 2020
Get the feed