Google Tech Talks

November 12th, 2008

great stuff for us geeks out there

well it’s not just for geeks

you can find there general videos like about the health, nutrition, meditation etc.

I’ve seen Larry Walk talk on Perl 6, some astronomy videos, etc.

highly recommended, check it out here

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • YahooMyWeb

Zeitgeist: Addendum

November 10th, 2008

this is a continuation of the original Zeitgeist movie

now it talks about the bad things of the monetary system and offers an alternative, a resource based system that would benefit everyone

at start it gives some info about how money is made of thin air
then goes on to explain how the globalization works

in the end it finishes with asking us to awake ourselves, see the system we’re in and change it to the better one, resource based

read more about the movie at wikipedia

watch it at the official website for free

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • YahooMyWeb

Linux Install Day

November 6th, 2008

at saturday, I was at this linux install day in Novi sad with friends, had a good geek time :)

it took my mind out of the things I face each day…

if you look really hard you can spot me in the pics ;)

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • YahooMyWeb

Achievo ATK Framework

November 5th, 2008

few days ago I was writing this php/ajax application for a client and then I realized I needed a way to manipulate the tables

some tables were simple but some had two or three relationships

I thought about writing a generic class for the simple tables and doing other tables “by hand”

then I realized… maybe someone else wrote something similar

and I’ve found just that

Achievo ATK framework makes it really simple to create /admin for your client so he can manipulate his tables by himself

but that simplicity comes only after you’ve spent some time getting familiar with it

at first, atk coding seemed cryptic but now I’m into it and it feels natural

atk will make your life easier because once you understand it you can easily manufacture table interfaces

it has support for cascading deletes so you don’t have to worry about orphaned records

one thing I’d like to see is full UTF-8 support

it currently uses iso-8859-1 character set by default (english language)

I got it here

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • YahooMyWeb

Belgrade Dog Show 2008

November 4th, 2008

I was at my first dog show at Sunday trying to figure out how to get into the breeding/show dog business

I came like 90 minutes late so I missed Dogo Argentino’s, German Shepherds and American Staffordshire Terriers

but I got to see other interesting breeds

my favorite breed is Cane Corso because it is strong, mastiff, calm, smart and obedient
and it’s really easy to show him, he will patiently wait for his turn to go to the show ring and you wouldn’t need any help showing him to the referee

but there’s one big problem with Cane Corso… drooling
I mean, a LOT of drooling
which is really bad because it’s such a great breed

I saw this one Cane Corso that was 11 months old, I guess some people from Zagreb own him
he was HUGE
really HUGE!
and he stood from all the other dogs in his age group, all of them were smaller and not his quality

but the problem was, the owners were nervous, since it was both their and the dogs first show
so they made a couple of mistakes handling the dog, trying to switch guides, calling the dog while he was running… that kind of stuff
and they lost :(
I was really pulling for them to win the show

so, I can easily breed Cane Corso and show him but drooling is a big negative

I’ve missed Dogo Argentino show but I got to see the dogs around the show ring and they were impressive in size and demeanor. All of them were calm except for one Dogo that was really aggressive and was caged.
they weren’t drooling which was a big + when you think about Cane Corso
but I somehow have the impression that they are not really smart
sure they’re nice, obedient but I want to see some Dogo obedience, tricks etc.

now let me talk about Rottweilers
I consider rotties my favorite breed right now
they are strong, smart, calm, trainable
they don’t drool much although I guess they drool some but nothing like Cane Corso

but they also tend to overeat (I would fix that ;) ), can show people agression (I would influence that), and they’ve got REALLY strong prey drive
I mean they lock on to something and they are REALLY focused on that
and that’s something I think is misused at the dog shows, or at least this one

rotties had the entire ring, a huge ring, just for themselves for the whole duration of the dog show
what I didn’t like were people clowning themselves with toys so that the dog would stand focused on the toy and the ref could see the dog better
now, the ref didn’t ask those people to goof around
some of them were running outside the ring while the dogs were running in the ring circle, calling the dogs, playing funny sounds from using dog toys etc.
I REALLY didn’t like that

from what I’ve seen, it’s really tough to show a rottie
you need to have someone to occupy dog’s attention while you’re with him in the ring
that means either taking someone with you (wife, friend, cousin) that will loose the day with you or paying someone for the goofing job

Doberman Pinschers were a bit easier to show than rotties but not that easy
you still need to have someone to goof around with dog toys so that the dog would focus on the toys
but the ring is smaller, the dogs are not as aggressive as rotties, and dobbies don’t have such strong drives as rotties
or at least that’s what I saw
dobbies looked impressive with their athletic build and size
they looked great without tail and with cropped ears but I guess it’s cruel to the dogs
but on the other hand, how does a dobbie with a tail and natural ears look like? nothing much? I guess so

rotties have ugly, curled tails but I wouldn’t cut the tail from my rottie
I guess I’d have to if I was in a breeding job because people wan’t them without the tail

I guess I’ll learn more at my next dog show
but from what I hear, next show wouldn’t be until spring :-/

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • YahooMyWeb

Dynamic DNS Iptables Firewall Script

October 9th, 2008

I’m using my computer as a development platform and I usually let people in by editing my firewall active table

but for those with dynamic ip addresses I had to figure out a different solution

so I made a small script in PHP to check for my friends dynamic ip address by looking up his dyndns.org hostname

it checks IP then goes sleeping for 5 minutes

when it detects an ip change it updates firewall by flushing my firends chain and adding a rule to let him access my webserver

this script works in my firewall iptables setup, it could work on yours but you have to be smart and figure that out for yourself, I’m not giving any guaranteess for this, use it as GPL V3 code :)
if you want me to help you set it up, just contact me

here’s the code:

#!/usr/bin/php
<?php
/*
use this code as GPL V3 licence says
Copyright (C) 2008, Miroslav Madzarevic, All Rights Reserved
*/
$old_ip = '';

while (1) {

    sleep (300);

    $host = 'friend.dyndns.org';

    if (!preg_match('/^'.$host.' has address ((?:\d{1,3}\.){3}\d{1,3})$/',
           exec ("/usr/bin/host $host"), $matches)) {
        echo "IP problems\n";
        continue;
    }

    $ip = $matches[1];

    $ip_parts = preg_split ('/\./', $ip, -1, PREG_SPLIT_NO_EMPTY);

    if (count($ip_parts) != 4) {
        echo "wrong ip parts count\n";
        exit;
    }

    $good = array();

    foreach ($ip_parts as $ip_part) {
        $ip_part = (int) $ip_part;
        if ($ip_part < 1 or $ip_part > 254) {
            echo "wrong ip part, $ip_part\n";
            exit;
        }
        $good[] = $ip_part;
    }

    $new_ip = join('.', $good);

    if ($old_ip != $new_ip) {

        `/sbin/iptables -F friend`;

        `/sbin/iptables -A friend -s $new_ip/32 -p tcp -m tcp --dport 80 -j ACCEPT`;

        $old_ip = $new_ip;
    }
}

?>
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • YahooMyWeb

Biometric Passport

October 9th, 2008

if you want to get a passport in Serbia then prepare yourself for problems…

I went yesterday to ask about the papers I need to get them to obtain a passport and it was simple

citizenship and a paper detailing where I was born I got fast and I paid like 15 euros for the taxes
I took a photo of me and paid some for that too

I found out that there are just too many people trying to get a passport these days
in fact there are so many of them that you have to wait A LOT

so the next day, I got up at 7am and was at the police at 8am
when I got there I was number 31 in line
that means 31 people showed up before 8am, some as early as 6am were outside the locked building, waiting to get listed ;)

the list was maintained by the people themselves, the police didn’t handout numbers or did anything
I guessed it would take like a couple of hours before it was my turn to get them the papers I obtained a day ago so I left for home and then, at about noon I got back to find out there were two people in front of me

and I was so happy thinking I will finish this in a reasonable hour or so ;) but then the police computer system broke down
for an hour
and that keeps happening a lot
I guess the computers too have to drink coffee as do the computer operators, so thats why they break ;)

during the whole day a lot of people wanted to get inside the operators office without standing in line or signing up for the list
one time a police officer had to be called since one guy got pi$$ed off and took the list and threw it away

all the time decent people were waiting other police employees were going inside taking envelopes with them so the operators could do their stuff first… talk about corruption
some people say they saw some people handing papers to the operators through the street window… and I’m not surprised to hear that

at one time a mother and a child came and ignored our line and all the people waiting
people can be so selfish but I never expected a mother with a child to behave like that
I mean, what is she going to teach that kid to do in his life
will he bully his school friends, steal, lie…
that kid deserves a decent mother

anyway, I finally finished getting them the papers at like 2.30pm
I have to get back in 30 days and stand in line almost another full day to pick up the passport

I joked with some people saying once I get the passport I’ll use it and won’t come back here soon ;)

the passport is biometric, meaning they took photos of me, fingerprints, my signature on digital medium, probably my eye scan ;) and I expected to get an id on my arm just as the cattle is tagged with burning steel mark
I mean, wtf, why does my passport has to be biometric, why are they treating us that way

most normal citizens oppose having an ID card but no, we need to have biometric ID cards and passports…

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • YahooMyWeb

fastcgi mod_fcgid

October 1st, 2008

I’ve been playing a little on my cPanel hosting trying to get maximum speed while also enforcing security at running php scripts

I first started with security running mod_suphp and while it worked fine it lacked the speed of the DSO php (mod_php)

so I read a thing or two about fastcgi and enabled it

I’m pleasantly surprised by the speed of the hosting

each user got its own persistent php application running requests (actually it’s limited to 500 php requests per php5 process by MaxRequestsPerProcess 500 directive)

I’m keeping an eye about the memory consumption but I hope I’ll be able to keep running with this setup

and while I got php running as the actuall cPanel user, apache is still running as nobody for other requests… hmmm… I’m using apache 2.2 with MPM Prefork… maybe I should try a different MPM?

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • YahooMyWeb

Pedigree Dogs Exposed

September 23rd, 2008

this has been an eye opening documentary about the misuse of dogs

it talks about the British Kennel Club and the inbreeding health problems of the dogs

inbreeding makes dogs that conform more to the breed standard but health problems are not really taken into account

most common issues include hip, elbow problems, cancer (usually bone or brain tumor), heart, breathing problems, shorter life span etc.

I personally like dogs and have thought about getting a pure bred dog or two, maybe starting a breeding business but after seeing this I have doubts…

I guess working dogs and mixed dogs, those that aren’t bread for beauty, are much healthier and should be a choice when getting a dog

as one person said in a movie, if you punch a dog in the head with a stick and the dog develops head problems you’d probably get arrested or something but if you breed a good looking dog with visible genetic health problems and pass on those genes that replicate the problems to the puppies you are not held responsible

think about it…

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • YahooMyWeb

Kopaonik Videos, Pictures

September 19th, 2008

I’m back from Kopaonik, had a great time there

here are some videos I took

and here are some photos






Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • YahooMyWeb