Category Archives: Uncategorized

Noogler

Just a short note that I’ve went to Dublin on November 6th, and I started working for Google on November 11th. Well, not quite working — training.

I won’t post work related stuff to avoid wrath of the security people 🙂 but I’ll try to expand a bit more on my impressions of Dublin, a bit on the overall atmosphere of the workplace (no confidential or even work-related stuff), and similar “safe” things.

What I can tell you is that — I can recommend Ireland, and it’s great at work training.

Movie to animated gif

To get an animated gif from a movie, I do this:

ffmpeg -i themovie.mov themovie-%02d.png
convert -verbose +dither -layers Optimize themovie*.gif GIF:- > themovie.gif

convert comes from ImageMagick. I could/should pass some more stuff to ffmpeg and convert, such as -s to resize and -r to change FPS of the PNGs, or -resize to resize the output gif.

More info in this gist.

Izgubljen novčanik/osobna – što sad?

Dovoljno puta mi se dogodilo da bi bio red da dokumentiram. Između ostaloga, radi sebe. Dosta neugodna situacija.

Prvo, ja sam posve odustao od toga da prijavljujem policiji. Predzadnji put pokušao sam prijaviti policiji na otoku Silbi, no kako je nemoguće iskopati jednog ili dva policajca koliko ih je nazovimo-to-dežurno na otoku, pokušao sam zvati telefonski i dobio policiju u Zadru. “A šta bi vi tili, da vam mi sad, ka, tražimo novčanik?!” Ukratko — nula bodova.

Drugo, malo pričekajte s prijavom nestanka kartica, za slučaj da se novčanik nađe — ali ne predugo. Tu procijenite sami. Da biste izvadili nove kartice u PBZu, potreban vam je dokument sa slikom. Ako nemate putovnicu, praktički jedini dokument ste upravo izgubili i vadit ćete ga preko mjesec dana. Ako nađete novčanik, bit će vam žao 50kn po kartici koliko PBZ (pravedno) uzme. Ipak! Ne previše odugovlačiti! Makar su kartice računa neupotrebljive bez PINa, PBZova kartica žiro računa je itekako upotrebljiva na Internetu. Ako imate American Express bez čipa, ta kartica prema mojem iskustvu traži samo potpis. Dakle, ne odgađati predugo.

A sad, kako do osobne.

Kako do nove osobne

Minimum minimuma je dva dana hodanja. Ne možete u manje od toga. Rezervirajte barem nekoliko sati u oba dana, primarno zbog čekanja u redu.

Dan prvi. Odlazite u policijsku upravu zaduženu za područje na kojem ste prijavljeni. Najvjerojatnije ista policijska postaja koja vam je izdala prethodnu osobnu iskaznicu – primjerice, u Petrinjskoj, ili (ako ste na području dijela kvarta Dubec, ili na području Sesveta), u Sesvetama.

Ponesite neki dokument tipa rodni list, makar vam vjerojatno neće trebati. Odmah kupite 70 kn u državnim biljezima. (Obično najbliža trafika kod policijske postaje ima biljege. Pitam se zašto.)

Ulazite unutra, stojite, dobivate od “tete na šalteru” formular za prijavu gubitka osobne iskaznice. Stanete sa strane, popunite ga u miru. Formular vas pita stvari poput OIBa, JMBGa, okolnosti pod kojima je osobna izgubljena, te da potvrdite da osobnu niste prodali, dali u zalog i slično.

Predajete popunjeni formular teti na šalteru zajedno s biljezima. Teta na šalteru vas upućuje da se vratite npr “sutra”, “prekosutra” ili “za tri dana”.

Međukorak. Možete obaviti slikanje za dokumente. Koliko sam ja upućen, slika za osobnu ne smije biti starija od 6 mjeseci. Neka vam ne pada na pamet pokušati “podvaliti” istu fotografiju za dokument koju ste predali prošli put, upravo zbog tog pravila; pred-predzadnji put sam otkantan kad sam pokušao dati istu, lijepu sliku, te sam se išao nabrzinu slikati. Recimo samo da sam prozvan MMK.

Dan drugi. Dolazite na šalter i predstavite se. Pokupite rješenje o proglašenju osobne nevažećom – komad papira A4 koji je državi od krucijalne važnosti da sami odnesete u Narodne Novine™ i predate kao “zahtjev za objavom oglasa o proglašenju osobne iskaznice nevažećom” – za što ćete biti oderani za 35 hrvatskih kunića. Posve mi je nejasno zašto efektivno državna institucija Narodne novine ne može surađivati s policijom dovoljno da uplatim policiji novce i da oni to srede. But I digress.

Odmah pokupite i formular kao zahtjev za izradu osobne iskaznice (OIB, JMBG, …) te uplatnicu na 48.50kn. Pripremite i par kuna više; FINA odere za dodatni 4.80kn, a tko zna kako je u drugim bankama i poštama. Internet bankarstvo bi bilo teoretski moguće, ali morali biste donijeti natrag i uplatnicu, ali i isprintanu potvrdu o uplati. Printati vam se, naravno, za 5kn razlike ne da.

Pitati tetu gdje su najbliže Narodne novine – recimo, u Sesvetama ih nema, pa ih možemo potražiti najbliže u Aveniji Dubrava 35 – kod Lidla. Što se tiče Petrinjske, najbliže Narodne novine su na famoznom ilitiga popularnom Trgu žrtava fašizma, i čak imaju zaseban odjel za objave oglasa. Put pod noge!

Stričeku u Narodnim novinama kažete zašto ste došli, predate mu papir, predate mu A4 papir, i mirni ste. On vam da natrag vaše rješenje o proglašenju, kao i račun vezan za objavu oglasa. Oboje predajete teti na šalteru.

Ako ga niste obavili dosad — sad možete svratiti na gore spomenuti međukorak ilitiga slikanje! Osobno sam dosta zadovoljan uslugom i ne poznajem osobno niti vlasnika niti ikoga od djelatnika — ali ako ste rješavali objavu oglasa u Aveniji Dubrava 35, mogu preporučiti Foto Studio Đurđica koji se nalazi odmah iznad Lidla. Kad kažem iznad, mislim iznad; skriveni su doslovce na brdu u Ulici Hrvatskog proljeća 15 preko puta ceste u odnosu na Lidl. Čekao sam 20ak minuta i platio 50kn, ali slike su odlično ispale, uz minimalno popravljanje slike (ne prepravljanje, što bi bilo zabranjeno, jel’). Oko 50kn je, čini se, standardna cifra kod fotografa onda kada izrađujete fotografije za dokumente. Možete proći jeftinije, no iovako ionako ste izgubili novčanik i trošit ćete hrpu love na povrat svega. A bar ćete imati par novih slika. (Whee!)

Konačno, vraćanje u policiju. (Whee! Još uvijek dan 2, nadajmo se, ako ste dovoljno rano ujutro krenuli.)

Čekate opet na šalteru. Teti predajete “uplaćenu uplatnicu”, dvije fotografije izrađene za osobnu iskaznicu, formular sa zahtjevom za izradu osobne iskaznice, rješenje o proglašenju osobne iskaznice nevažećom, račun za oglas o proglašenju osobne iskaznice nevažećom. Teta uzima žutu kartonsku karticu, popunjava, traži potpis na žutu kartonsku karticu, traži potpis na papir, traži otisak desnog kažiprsta (ponesite maramicu, salvetu ili nešto slično da obrišete tintu) i konačno uzima žutu kartonsku karticu i daje vam rok u kojem će osobna biti izrađena.

U nekim policijskim postajama/upravama/whatever pitat će želite li SMS dojavu kad je iskaznica gotova. U Sesvetama ne nude tu uslugu za osobnu iskaznicu.

Ukupni trošak? 155kn + fotografije 50kn. Oko 8h kombinirano u 2 dana potrošeno na čekanja u redu, vožnju po tramvajima i busevima, itd itd.

Kako do ostalih dokumenata?

Vjerojatno nikako dok ne dobijete osobnu iskaznicu. Ali…

Gubitak studentske “iksice” (odnosno ja imam iskustva samo s nasljednikom, ‘e-indeksom’) prijavljujete u studentsku referadu. To je mali problem ako su trenutno ljetni godišnji, ali što se može, menza iovako ionako ne radi, niti su predavanja u tijeku. Na FERu sam platio 100kn “kazne” za e-indeks, plus 35kn za objavu u Narodnim novinama, uz informaciju da sljedeći gubitak sankcioniraju sa 150kn. Ne sjećam se da li sam plaćao izradu novog e-indeksa. Na TVZu još nisam prolazio kroz postupak, jer je studentska referada na godišnjem.

Gubitak kartica u PBZu možete prijaviti telefonski već isti dan: 0800 365 365. PIN stiže kroz svega par dana na kućnu adresu. Nažalost, to apsolutno ničem ne služi jer morate podići karticu koristeći osobnu iskaznicu ili drugi dokument sa slikom. (Vozačka ili putovnica, koje ja, recimo, nemam.) Koliko se sjećam, naknade za izradu kartice skidaju se izravno s računa.

ZETov pokaz — uopće nemam pojma što s njim, i gubitak ovoga je najstrašnija stvar. Ovaj elektronički pokaz je toliki organizacijski promašaj da je to strašno. Nemam pojma što ću uopće s time i kada ću ići po njega. Naime, koliki su biseri, vjerojatno će inzistirati da pokažem (e-)indeks, jer nagađam da su nesposobni vidjeti da osoba s mojim imenom i prezimenom, OIBom, te karakterističnim licem i predivnim “osmjehom” uistinu već jest student i da je ta čudna individua već imala pokaz. To je samo nagađanje, ali mislim da neće to povezati.

Dalje, na izradu pokaza sam čekao tri tjedna… a za to vrijeme nisam mogao uplatiti 120kn. Da, tako je — izradu sam platio 30kn i čekao tri tjedna i za to vrijeme plaćao vožnju po redovitim cijenama. Naravno da k tome pokaz vrijedi od 1. do 31. u mjesecu, pa kad je bio izrađen, za 120kn sam mogao platiti pola mjeseca vožnje, ili nastaviti plaćati po redovitim paprenim cijenama. Očekujem slično se provesti i sada, kad sam izgubio taj krucijalni komad plastike koji je toliko fantastično bolji (za praćenje kretanja nazovi-slobodnih građana) od komada papira i plastike koji smo prethodno imali, a koji sam dobio za prestrašno dugih 5 minuta po ulasku u njihov ured u Remizi.

No o ZETovim manama kao vjerojatno najnesposobnijoj državnoj firmi jednom drugom prilikom u nekom drugom dugačkom postu. (Sad jedva čekam “je al nije državna neg gracka striček Vuč’ca… i nema ZETa nego Zagrebački holding striček Vuč’ca…” — yeah right: same difference.) To što je javni prijevoz u drugim gradovima u još većoj banani nikako ne može i ne smije značiti da možemo tolerirati ZETove igrarije i skupoću izazvanu novim tramvajima, aparatima za “cvikanje” (Linux, by the way), bezobrazluk (vjerojatno i preplaćenost) zaposlenika, prečestim polupraznim vožnjama, kršenje privatnosti bilježenjem “svakog” ulaska u vozilo (kako nas podsjeća striček na svakom stajalištu!), iritantno puštanje “ZET radija”, itd.

Idemo dalje!

Upute za budućnost

Otvorite mobilno bankarstvo. Ja sam se spasio tako da sam prenio kolegi dio novca preko mobitela, jer za razliku od Internet bankarstva ne trebam karticu.

Ostavite barem jednu bankovnu karticu kod kuće.

Nabavite putovnicu. Jest da dođe oko 400kn (320kn + 70kn biljega), ali ako izgubite novčanik, bit ćete presretni što imate bar jedan dokument sa slikom za dokazivanje identiteta. I dalje morate prolaziti ovaj gore navedeni postupak, ali u kombinaciji s bankovnom karticom koja je kod kuće, bar nećete ostati bez novca. A da ne spominjemo da u slučaju potrebe nećete trošiti dodatne novce na “hitnu izradu” putovnice, ako baš žurno morate ići u inozemstvo negdje gdje vam nije dovoljna hrvatska osobna iskaznica za prelazak preko granice.

Ostavljajte stvari kod kuće, jer usprkos oprezu, dovoljno je da se malo zamislite ili da netko u blizini ima spretne prstiće kako biste prolazili horor. Osobnu iskaznicu ne možete ne nositi (koliko znam, protuzakonito, je li), no možete pokušati ne nositi baš sve bankovne kartice.


ŠTO KAD JE NOVČANIK PRONAĐEN? (update 23. kolovoza 2012)

Pred nekoliko dana stigla mi je obavijest na kućnu adresu da se javim u Policijsku postaju “vezano za novčanik”, uz dobilježeno da donesem “pristojbu od 20kn”.

Odmah sljedeći dan ujutro otišao sam, i stvarno, novčanik je pronađen. 20kn se odnosi, naravno, na biljege. Šteta što je skoro sve bilo otkazano, osim pokaza, iksice i studentservisne članske iskaznice.

Disable Safari Webpage Preview Fetcher

This site says you enter the following into the terminal and restart Safari:

defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2

Revert using:

defaults delete com.apple.Safari DebugSnapshotsUpdatePolicy

The site says it works with Safari 4. Let’s see if it works with Safari 5.

See also “Secrets” at BlackTree.

Figuring out software version of a passcode-disabled iPhone

If you have an iPhone that’s passcode-locked, especially with message that iPhone needs to be connected to iTunes, you may want to try to unlock it by jailbreaking, installing SSH and messing with the filesystem. (tcprelay.py from usbmuxd is very helpful for SSHing if the iPhone doesn’t connect to a known wireless network.) There’s this tutorial on installing SSH on a disabled iPod, which doesn’t use tcprelay.py and is targeted for Windows users, but it should nonetheless give you the starting info.

Before you start you may want to discover which software version is installed on the iPhone.

Current redsn0w, 0.9.11b4, displays the device name, ECID, and software build when you use the “Fetch SHSH” functionality. There’s also “Identify” functionality which should do the same thing, but you won’t be collecting SHSH blob (it’s a good idea if you want to downgrade in the future.) Build name is a string similar to iPhone2,1_5.0.1_9A405 and can be used to obtain the correct .IPSW for your device, enabling you to jailbreak the device and to install contents of “SSH Bundle.tgz”. Most important thing is – fetching SHSH blobs is a non-destructive operation.

You’re welcome.

(All files mentioned are googleable.)

Saving PC sales

So today I’m reading that Dell may be stepping away from the consumer PC arena. What could a prospective PC retailer do to save sales?

While I’ll be ranting about Canonical, Ubuntu, Linux and GNOME a lot, please note that this is just a mention of a possible platform a device maker could have opted for. Same goes for Dell: I’m talking about them, but it mostly applies to others. And what I’m talking about is that people want an integrated (but powerful) solution that ‘just works’.

Figure out that people want the sleek and fancy. Steam is fancy. App Store is fancy. iTunes is fancy. Intel AppUp from 2011 was decidedly not fancy, and in fact, it was a prime example of the “old” way of doing things one the PC: let’s just pack random garbage in front of the customer and hope he’ll not only bite it, but happily chew it. (Just remember all the “photo handling” software that shipped with your digital camera, or “antivirus protection” demo software shipping with your shiny new PC.)

Thankfully, the latest version of AppUp from 2012 is a bit fancier, although still somewhat weird.

Figure out that people want to do things differently. How happy are users with the operating system you’re shipping? I personally like Windows 7 a lot lately (more on that later). But how integrated it is with your product? What does your product do? Is it just another box? Admittedly, it may be a neat, shiny box, but what does it do? Oh — this thing on it isn’t your product? Uh-huh, so you’re just another box-maker?

Hint-hint: end users like custom (but usable) stuff. At one point, aforementioned Dell has promoted Ubuntu on its machines. What they haven’t done is sit with Canonical and decide how to make Ubuntu the operating system for their machines. Not only that — they should have thought about how to make Dell’s laptop the machine for running Ubuntu.

Dell and Canonical could have figured out what exactly people want and how they want it done. In my previous life as a Linux user, I was quite “needy” and I desired customizability, shunning Ubuntu for Debian. But that’s not what people want. People want stuff to “just work”. I want it too nowadays. I also want a company to figure out how the user interface should work, and make it work that way instead of me. I want them to figure out what is the best way for me to achieve my goals.

And then I want them to proscribe that as sacred rules to developers on their platform. Then I want them to justify why those sacred rules exist. (The way NSDocument class works in Cocoa frameworks has recently allowed Apple to introduce “recent files” list for an application in Lion’s Expose for an application’s windows, as well in the Dock icon menu.)

I want those sacred rules to be sane and enabling to the developers, instead of arbitrary decisions slapped together by a bunch of monkeys. (And I’m not pointing fingers at a single platform or library here — but pretty much at most platforms and libraries out there.)

Figure out that people want to do stuff with their machines. After securing a deal with Canonical, Dell should have attempted to secure a deal with, for example, Adobe to port at least their flagship product Photoshop to Linux (or more specifically Ubuntu). There are bound to be many, many hurdles along the way. But instead of toying with The Gimp and waiting for them to actually make a tool that is usable by real people, getting Adobe to bring their product over would make the platform (and products) stand out and appeal to an audience. And if Adobe doesn’t want to cooperate, invest those profits in your long-term gain: look at Photoshop and replicate it under Linux, including keyboard shortcuts and whatnot.

Go and fix OpenOffice’s interface, or at least lift what you can in designing an office suite that works and looks as an office suite should. Or write your own — Apple surely did with iWork, and they worked on that even before iPhone and iPad were insanely profitable like today. Compared to today, iPhone was only mildly popular.

Can you see the big picture now? Can you see how a platform could have and should have come together to save, for example, Dell?

As Apple has built their OS on the strong base of BSD userland and Mach kernel, Dell and Canonical could have delivered integrated products based on GNU userland and Linux kernel. They should have worked on securing partnerships to deliver key products to what was (and is) a nascent desktop environment.

Apple did not use window compositing to bring you toys like a 3D cube, but to bring you tools to switch between windows and apps. Dell and Canonical should have and could have slimmed down Compiz. GNOME 3’s window manager is a nice experiment in this direction, but on the first look at it, it lifts off of Apple so blatantly in some ways that I can’t help think they should have and could have done better. It could have and should have been better than what Apple does.

Figure out how to cut the stuff out. As mentioned, I personally like Windows 7 a lot lately, but it hasn’t struck the good balance between exposing whatever a power user needs and hiding anything that a common user doesn’t need. It’s still too complex for a common user, and at the same time, any attempt at simplification and hiding stuff just means the actual stuff you need is now hidden behind menus and behind more menus and behind more menus. See: attempting to configure just slightly more complex wi-fi setup in Windows 7. Something is seriously wrong if it’s easier to change resolution and color depth in Windows 95 than it is in Windows 7.

Compiz needed to be cut and configured to sane defaults. Or it should have been thrown away and a custom manager should have been written.

As long as we stick to the UNIX principles wherever possible, I can take your window manager and throw it away. Or I could write my own settings app. But if you do a good enough job, I will not want to.

I currently am not inclined to go away from Mac, and the amount of customizations I do is minimal. Some people use custom app launchers, I’m satisfied with launching apps through Dock or Spotlight.

But in case I want to move away, I’m hoping GNUstep takes off and provides a viable way for people to port their OS X apps to other platforms. I hope for a healthy GNUstep ecosystem where people are free to share code, but also to sell the fruit of their labors.

But I am not really interested in moving away right now, because Apple delivers a good, complete, healthy ecosystem today, along with an integrated hardware+software stack where things like driver issues are rare and shocking events happening mostly to early adopters — definitely they are not common daily appearance for most users.

To save your sales, deliver a healthy, integrated hardware+platform+applications ecosystem. For a corporation as big as Dell, any investment into their own platform would have been an investment into long term future. It would have been diversification and it would be a way to stay unique long-term. And not doing a good job on creating a platform when you’re a multi-billion dollar company, especially in cases where you can already take other people’s work, should be inexcusable. In fact — I’m not sure if not even attempting to do it may be an even greater sin.

Make yourself stand out with an outstanding product that “just works”. Half-assed experiments with Linux just because it’s Linux and “free” won’t save you and will flop.

Delivering a complete product starting with a laptop designed around a platform (which may be based on Linux), and delivering a complete platform designed around your laptop is a good way to start.