Здравна книжка, дубликат

Липсва ми здравната книжка. Отидох при личния лекар. Заместващия му каза да отида до РЗОК в Младост. Отидох. Случайно хванах шефа там и той каза: не тук момче, ул. Енос 12. Отивам там, на информацията ме питат за номера на книжката. WTF?! “Тогава отидете в каб. 302″. Отивам там, ” кажете знаете ли кога е издадена?”, “не, не знам”. “ходили ли сте на зъболекари. Ако да, кога”, “ами 2005та мисля последно ходих на такъв, който работи с касата”, “Няма такъв, слезте в деловодството”. Слизам, там – “Без номер не може, питайте личния за номера”. Звъня на личния: “не съм ви първи личен, трябва първия да намерите”. Пак в деловодството: “първия ми личен е починал, какво правим?”, “ами той всъщност не ви е първи, ама ви е първи, отидете при него”. И това след пълен кръг от институции.

Извод: мразя държавни служители. Моля ви уволнете ги всичките. Ненужни са. Така и така си плащам здравеопазването.

Update: problem solved с кутия бонбони и кафе за личната. Уж нямаше книжки и не трябвало да ги вади, но кафето някак й припомни, че някъде имала забутани книжки. Цена: 4.68 лв.

Lego Technic 8880

Intro

When I was a kid I wanted the biggest and most complex Legos. I only got small and cheap ones. The series I liked the most were the Technics.

Last winter I was dragged into a kids store. I saw a large box with “Lego Technic” on it. It was a crane with motors and everything. It was quite expensive.

When I got home I couldn’t stop thinking about it. Google quickly returned all the results for “the best lego technic ever”. Unanimously the answer was Technic 8880:

 

This was the most complex lego ever. It had a REAL gear box with four gears, independent suspension, 4×4 with three open differentials, V8 engine with cylinders and everything. 4-wheel turning. One could study car internals from this toy.

It was said to be the most complex to assemble, due to the scarce instructions. Even though the instructions were 51 pages. Here’s a video:

The problem

was that this was a 1994 model and was discontinued. So I had to buy a second hand from ebay/amazon. Unopened boxes went as high as $1000.

After 3 months of searching and bidding I found a 14-year-old kid from Germany, that didn’t speak a word English. After a lot of trouble with paypal (the kid didn’t know how to use it) I finally got it.

Assembly

It took me 14 hours, even though it said 7 on the box. I had to wear knee pads so that my knees wouldn’t hurt so much.

Pictures

Preparations
Preparations
The beginning, page 1
The beginning, page 1
The beginning
The beginning
The suspension
The suspension
The chassis
The chassis
The gearbox can be seen, 1 differential also, front cv joints
The gearbox can be seen, 1 differential also, front cv joints
The knee pads
The knee pads
Suspension attached to cv joints
Suspension attached to cv joints
Testing the tires
Testing the tires
The engine block
The engine block
The car is functional now
The car is functional now
After 14 hours, it's like 6 in the morning
After 14 hours, it's like 6 in the morning

Time machine is not perfect! A mobile backup solution for OS X

There’s this rule that drives fail and stuff must be backed up.

My main operating system is Apple’s OS X. OS X has a backup infrastructure called Time Machine. Time Machine is a way to do a version control on the whole file system. In layman’s terms: if you delete a file, you will have a version saved. Or if you mess up a document, you can recover an old version from the Time Machine. This is how the interface looks:

Also if you mess up the OS by installing something stupid, you can recover the whole OS to a state that was for example 1 hour ago. A week ago I had to test this option, because by accident I destroyed some virtual network interfaces and was too lazy to try to fix them manually. This requires an installation cd and then the whole hdd is restored. 120 gb in 50 minutes. I thought it could figure out what to reverse and do it faster without an installation cd, but I guess this is how stuff works. It worked perfectly however.

I have a Time Machine router from Apple. It’s a router with a hdd inside it. Backup/restore happens via wi-fi. It works perfectly.

Note: when restoring the whole hdd to an old state, you should link the laptop and the router with a cable. This cuts the restore time in half (10 mb/s on wi-fi, 20 mb/s with cable).

Drawbacks: when a drive fails, I need an installation cd, new hdd, screwdrivers to change the drive and a lot of time for the restore operation (1 hour in my case). This solution is not mobile. The router is big, so I can’t take it with me on the road.

Why would I want to have a mobile backup solution?

Well, I have an SSD drive. They tend to fail quite often and without warning. What would happen if I have work abroad and need a laptop and drive that sould not fail, or at least have a backup option? Should I bring a spare hdd, screwdriver, installation cd and the bulky router?

The mobile backup solution

No, there’s a better option. Use a drive-cloning software that clones the whole SSD to an external HDD via usb for example. If the SSD fails, I don’t even have to change the drives. OS X can boot from the USB drive easily, so I don’t need a screwdriver. No downtime, no 1 hour restoration. Just reboot and the new drive kicks in. Well, it’s not going to be as fast as the SSD:

I have a 120gb SSD with a 750 gb HDD for a mobile backup. The backup is 120gb, 200gb if I want some history of the most changed files (yes, the software can even do versioning and incremental backup). What should I do with the rest? Split the drive and have some extra space. Now I have a mobile backup with enough space to bring a ton of music or TED hd lectures.

The two softwares I know that can do that are Carbon Copy Cloner (ccc) and SuperDuper! (yes, the exclamation mark is part of the name). CCC is free, that’s what I use. Easy to setup. I did all in an hour. I even rebooted to see whether the backup drive would work. It worked like a charm. It copies with around ~30mb/s.

I have not tested SuperDuper!, but it has great reviews, especially the support, they say, is awesome.

Вещите от миналото

Днес измислих нещо.

Докато почиствах днес, се издразних на разни шкафове пълни с вещи. Разни стари лекции, стари инструменти, стари документи, разпръснати. Беше пълно и със стара техника.

Та реших да разчистя. Първо, старите визитки, оставих си по 2 от всяка за спомен, другите – на боклука. Разни стари монети, пак по две, другите на боклука. Изхвърлих стари инструменти. Изобщо, правилото беше следното – всяка вещ, до която се докопам, се замислям от колко отдавна не съм я ползвал, ако се окаже прекалено дълго – на боклука. Има изключения, но те са много малко.

После документите, доста от тях бяха вече безсмислени. Останалите подредени и доста ясно надписани в папка.

После старата техника – стара, но професионална лан карта, уи-фи карта, хдд, кабели, кабели, още кабели, клавиатура. Мислех да ги подарявам, но така и не намерих време, а тия вещи са доста безсмислени вече. На боклука.

Стари тетрадки, списания, дори една книга за Бойко Борисов замина (подарък от стария хазяйн).

Преди време успях от всички компютри, които имам, да събера всичко ценно и да го набутам на един лаптоп. Разкарах всички други машини. В друг момент се оказа, че мега големият портфейл, който нося, също не е нужен. Половината от съдържанието му не беше важно. Сега се движа със щипка за пари и лична карта. Документите за мотора са залепени от вътрешната страна на каската.

След 4 торби с боклуци се замислих за следното: голяма част от тия вещи дълго чакаха да им отдам дължимото внимание – да ги подредя, подаря, разглобя и т.н. Дори да си поиграя с тях. Тоест ми висяха като задачи.

Всъщност всички тия вещи ме разсейваха от важното, от основната цел. А основната цел не е свързана с тия вещи. Половината от тях бяха неща с някаква историческа стойност за мен. Голяма част от тях заминаха, каквото имам онлайн ще остане, другото тежи, влачи ме назад, безполезен багаж е. Не съм мобилен и гъвкав. Трябва да се съобразявам.

Сега съм по-лек. Смятам с всички други вещи да направя така. Каквото мога да го сложа онлайн и ако е ценно, то някой да го ползва, но да си държа разни неща заключени в шкаф – тотална безмислица. Усещането е като да се обръснеш нула номер – става ти изведнъж леко, усеща се всеки бриз, можеш да полетиш. Това, което те е притискало преди това, вече го няма.

Сега трябва да направя същото с другата стая – дрехи, обувки. Трябва да разкарам едно nintendo wii, пейнтбол пушка, сноуборд, голям монитор, авто тонколона. Ако не се наканя да ги продам в някой сайт, или ще ги подаря или просто ще ги изхвърля.

Представям си перфектния дом само с вещи, които употребям често – рутер, лаптоп, нескафе, микровълнова, китара (приближава се скоростно към неупотрябяваните вещи), малко, но хубави, дрехи и другите маловажни неща – пералня, легло, т.н.

Трябват ми още няколко дни да изтрещя като днес и доста други неща ще си заминат.

Виваком ми казаха да си го *$#^@#*&##

Началото на сагата ми с Виваком е описано тук.

Оказа се, че сметката ми не е 104, а е 124 лева. Това ми е личен рекорд за този оператор. Мтел държат за цялостен принос със сумата 270 лева за 1 месец.

Беше ми спрял интернета и се обадих да питам кво става. Оказа, че имам отговор на възражението. Прочетоха ми го по телефона. Отговорът беше (по памет): благодарим, че сте ни клиент. Понякога стават недоразумения. Смятаме да подобрим качеството. Цените са следните за интернет в БГ и извън.

Нямаше отговор на въпроса дали мога да чуя разговора, в който ме излъгаха. Не мога да получа оригинала на възражението си, нито копие.

Най-накрая успях да се логна във vivacom.bg (при цъкане се отваря един попъп, ебаси ламерското). Излезе и фактурата. Ето го интернета:

Така и не разбирам какво е това времетраене. Може би килобайти? А това е списък от всички сесии? И защо пише GPRS? На телефона пишеше 3G и EDGE.

Нищо не разбирам. Някой ако може да ми го обясни. Обясниха ми – това било килобайти.

Значи се оказва, че имам няколко сесии и всъщност 11те мегабайта реално съм и изразходил в една сесия. Как точно се случи това? 2 уебсайта и гугъл мапс са 11мб? Защо телефонът ми не ги показва?

И защо по дяволите се таксува на 100кб/сек? Телефонът ми постоянно прави нови сесии, сменя между 3G, GPRS и EDGE, тоест това само по себе си е безумие.

И още нещо. Ето ми я фактурата:

Вие някъде виждате ли 124 лева? Сега една операторка ми рови из профила, за да ми покаже, че някъде това 124 трябва да фигурира. А да видим. Update: мацката си призна, че 104.01 -0.17 не може да е 87.17 и че никъде не пише 124. Идиоти. Та значи фактурата ми е (104.01-0.17)*1.2 = 124.608.

Оттук нататък следва следното: или да си платя оставащите 9 такси по 10 лева и да премина на глобул (единственият оставащ оператор) или постоянно да им звъня и да питам колко пари съм изхарчил. Обмислям. Съвети?

Review: mplayer

Mplayer is the best media player there is. It just is. One just downloads it and it just works, no codecs installation, no registry shit, nothing. It can navigate with the arrow keys (up/down, left/right, pgup/pgdn), it can open unfinished downloads, and can repair/redo their index and navigate while the file is still downloading – awesome. It’s very lightweight.

It can play almost anything, no matter how broken it is. It comes with a console tool called mencoder that can encode stuff. It’s very hard to use, but it works. It has a GUI for windows and mac os x.

The problem is that the development is a bit forsaken. Sometimes the GUI crashes, there a few bugs, the integration with the OS is not that perfect (I had issues with Vista effects and Mac OS X graphics cards switching)

I just found that the MplayerX (+GUI) is available in the App Store, perfect. The GUI is very slick.

Verdict: highly recommended.

Longstanding Eclipse issues – fix them finally, please


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/mstoynov/public_html_mihail.stoynov.com/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/mstoynov/public_html_mihail.stoynov.com/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Eclipse is the best IDE ever. It’s the most stable, most popular, most- a lot of things. The developers that write the Eclipse code have T-shirts that say that – they are that proud. The code-base is said to be awesome – I don’t have time to check. But, there are some longstanding issues.

First, SVN client. There’s a CVS client that comes with Eclipse. SVN is way more popular. Put the client inside finally. I’m sick of solving numerous JavaHL issues. Fix it. I don’t care how, just do it.

Second, Tomcat is the best web container ever and most popular in development. Integrate it better. There are numerous issues with debugging, redeployment and so on. These problems are so old. Fix ’em NOW.

Third, installing plugins is soooo slow. So very slow.

Fourth, web development is not that well integrated. WTP is still buggy, there are issues with configurations, deployment and so on.

Update: Fifth, autocomplete should put jdk classes/interfaces first!!! This is so important. Screenshot:

WTF is antlr.collections?! Are you kidding me?

Now, I’m trying to launch a main method without the “String… args” parameters and Eclipse cannot find it. This is also a longstanding problem.

This works:

public static void main(String... args)

This does not (eclipse cannot find the method):

public static void main()

I’m pretty sure there’s a solution, but I’m not going to waste time searching for it.

I’ve wasted time with compilation, memory, various configurations with xml and whitespace also.

There are always solutions, but this is wasted time. What are the developers working on? Stupid pointless features? Fix these please. Please.

Vivacom – разочарованието

Преди 2-3 месеца най-накрая успях да си сменя оператора от Мтел на Виваком.Важно е да отбележа, че сметките ми в Мтел държаха трицифрената граница (100 лв)  и колкото и да ограничавах говоренето си, не успявах да сваля значително под 100 лева (най-ниската май беше около 90). Съпортът им постави рекорд по on-hold: 40 мин. Сметките идваха веднъж на 5 месеца и едно от плащанията ми беше над 500 лева (за 5 фактури). Интернетът последните месеци беше адски зле. Та летвата, която Мтел поставиха беше адски ниска.

Първата ми сметка във Виваком беше 50 лева като 20 от тях за интернет. При повечето хора, с които говоря, не са абонати на Виваком. Впечатляващо. Втората сметка също беше там някъде. Имаше и дребни недоразумения – не позволявали tethering (споделяне на интернет от телефон към лаптоп най-общо) – направих си го сам, заобикаляйки ограниченията им. Другото – регистрацията за електронни фактури на сайта е адски тегава и ако объркаш, чакаш следващия месец за нова фактура.

Съпортът им се оказа адски бърз – вдигат почти мигновено. Разбира се и те подхождат по типично държавнически – ние тука тва от системата идва, тя така е направена, ние не можем да помогнем. Идиоти, или просто са ниско платени и не си дават много зор.

Разочарованието дойде този месец. Обадих им се от Чехия и ги питах колко струва един мегабайт, те – 5 лв, аз – на 1кб ли таксувате, те – да. Ползвах аз около 1 мб или поне така пишеше на сметката телефона ми. Връщам се тук, телефонът ми спрян. Звъня, те – ами висока ви е сметката. Аз – защо? Те – ами много интернет сте ползвали – 11мб. Питам аз как така е 11 мб, те – ами ние таксуваме на 100кб.

Звъня и питам как да оспорвам, те ми казват официално да подам възражение (поне молба не ме караха да пиша). В същото време внасям 20 лева, за да ми се качи кредитния лимит.

Днес отново телефонът ми е спрян. А днес точно ми излиза фактурата. Звъня и питам защо, бе тъпаци такива, пак ми е спрян телефона? Те – ами много висока фактура – 104 лева. Аз – ама сега имам 0.00 лв потребени, фактурата тъкмо е излязла, може би трябва да ми дадете някакъв толеранс да я платя. Те – да, прави сте, ама много е висока и затова ви е спрян телефона.

И тук става най-интересно. Аз ги питам – защо не ми е излязла тая фактура в Ипей. Те – в системата ни за плащане е излязла, но в системата ни за отчетност не е излязла. И аз – демек не мога да платя през Ипей? Те – ами през кеш терминалите можете да внесете аванс. Кви бяха тия кеш терминали така и не разбрах. Той не успя да ми обясни също.

Тоест – оспорвам фактура, но докато не я платя няма да имам телефон. Не мога да платя през Ипей и не мога да си видя електронната фактура, тоест да видя за какво плащам. Но ако не платя – нямам телефон.

Напълно осъзнавам факта, че тази битка е безмислена. На оня по телефона му казах, че споря с радиото. Само от тези дребни наглед случки тия хора ще ме изгубят като клиент и то за едни 104 лв. Не смятам да се примиря с безумията им и просто ще отида при единственият останал оператор ако нещата не се решат по приемлив за мен начин. А Виваком имат потенциал. И то много. Но вместо да качат летвата, те се примиряват с летвата на Мтел.

Винаги съм се чудил защо мобилните услуги не се развиха като интернет предлагането от LAN доставчиците – конкуренция, ниски цени, адски високо качество. Явно защото държавата е намесена и спира конкуренцията.

 

Review: codinghorror

Jeff Atwood, the author of the aforementioned blog is awesome. He’s as good as Joel On Software (todo: link to the review page here). I found him quite late – I follow Joel for so many years now. Jeff is a must for everyone who calls himself developer. He’s smart, he writes very well, he’s practical. The last thing I read was a piece about keyboards. And he references old articles about keyboards – he’s written on the subject like 5 times. Wow, that’s kind of refreshing.

A must: Coding Horror.

Dramatically increase battery life on a Macbook Pro with 2 GPUs

There are numerous ways to increase battery life on laptops, but I’ll talk for one specific issue on Macbook Pros that has a profound impact on battery life.

Some of the Macbook Pros have 2 graphics cards. Mine has one from Ati and one from Intel. The second is a slower one that should be used only when serious graphics power is not required. Unfortunately this mechanism is not that well thought up. It turns out that any application using a specific graphics library (forgot which one) triggers a switch to the more power-hungry GPU. Simple applications like Skype, Flash… are such, even though they would work fine with the Intel card. This shortens battery time.

Fortunately there’s this guy Cody Krieger that made an application (<—– link) that can make this switch manual:

Do you see the applications that the switch depends on? Skype and Twitter!

It even can see whether the laptop is no battery power and take further action:

Perfect. Time on battery power increased with a couple of hours (from 3-4 to 5-6):

I’m pretty sure I can increase it further.

 

Installing PostgreSQL 8.4.x (8.4.8-1) and 9.x (9.0.4-1) on OS X Lion with EnterpriseDB installer (fix)

Postgres for Mac OS X has three install options:

  1. Using a package management system. Fink, MacPorts and Homebrew all have it. I’ve tried only MacPorts and it works fine.
  2. Manually downloading and compiling it.
  3. Using EntrepriseDB’s installer. It can be found here.
Options 1) and 2) require Xcode. Xcode is a large development package for OS X. It installs an IDE, compilers and unix tools. Options 1) and 2) use the unix tools.
I don’t want to install Xcode, even though there is a way to limit it’s memory footprint. Here’s how (the question was with negative rating when I found it, but the answer is useful).
Anyway I don’t want to install Xcode, and on my last OS X I only installed a couple of databases. That made the whole ports thing a bit useless.
So I tried the EnterpriseDB’s installer. It failed with
Problem running post-install step. Installation may not complete correctly
The database cluster initialisation failed.
The official sites said: Lion is not yet supported: link. I didn’t want to install some package management solution so I wanted a solution.
I found one here. On a poker site – kill me now. It seems to be the easiest one. Just create a postgres user using the Users & Groups preference tab. Don’t create a Sharing only user, it doesn’t work with it – I tried. Create a normal user. Everything works like a charm:
I tried the new postgres 9.0.4, but it failed with “invalid stream header: BB656430” when serving binary data from an import from 8.4.x. I went back to 8.4.x.
EntrepriseDB’s installer creates an uninstaller, installs pgAdmin, works nice. User-friendly.

ui:param … and caching


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/mstoynov/public_html_mihail.stoynov.com/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

I have the following thing:

<ui:param name="randomVideo" value="#{bean.randomVideo}" />
<a href="#{randomVideo.link}">#{randomVideo.text}</a>

Because <ui:param> does not cache the variable, Bean.getRandomVideo() is called twice, and the worst part is that the .text and .link are from different videos. I have already tried <c:set and <f:param. They both do not set the variable, maybe because I’m with facelets (JSF2).

Any ideas?

JSF 2 does not update the url after a form action?

I did not know that http://www.mkyong.com/jsf2/jsf-page-forward-vs-page-redirect/

I did not know that the upper link solves that http://www.mkyong.com/spring-mvc/handling-duplicate-form-submission-in-spring-mvc/ (which is a problem I have in my current project).

 

 

 

 

 

 

 

 

 

 

 

 

 

Как да изберем най-добрият абонамент за мобилен оператор?

Не, това не е реклама.

Един приятел е седнал и е направил http://www.gsmbill.com/. На този сайт всеки може да ъплоудне подробна разпечатка от мобилния си оператор, на който е клиент. Тогава ще получи отговор кой план, на кой оператор е най-подходящ за него.

Помня преди време имаше доста по-базова услуга, с която си играеше. Сега е седнал и е направил цял сайт и е автоматизирал процеса.

Услугата е платена, 1.20 лв за смс.

I hate getters and setters


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/mstoynov/public_html_mihail.stoynov.com/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

I hate getters and setters in java. Half of my code is filled with them. They are pointless boilerplate code that says nearly nothing. 99.9% (I made that number up, but it sounds reasonable) percent of the cases they don’t have any additional code in them.

And it is really hard to see whether a variable is read-only/read-write/write-only. You have to find the getters/setters to see that.

I have a notation where I put all the modifiers at the end of the class and separate them with a page of whitespace.

I don’t like the C# solution – it’s not really shorter, only binds the getter and setter together.

I have a proposition: use annotations:

    @Getter @Setter
    private boolean subscribedForEmailNotification;

And one wants to write extra code, one should be able to use the old notation. The compiler will check for collisions.

I don’t see any reason why this cannot become the next syntactic sugar in java where one saves a bunch of useless code-writing.

Rename Mac OS X applications


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/mstoynov/public_html_mihail.stoynov.com/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/mstoynov/public_html_mihail.stoynov.com/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/mstoynov/public_html_mihail.stoynov.com/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/mstoynov/public_html_mihail.stoynov.com/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Suppose you would like to have firefox 3, 4 and now 5 simultaneously. Unfortunately renaming applications is not possible via Finder.

Suppose you have firefox3 installed. Do the following:

$ cd /Applications
$ mv Firefox.app "Firefox 3.app"

Then install firefox4 and do that

$ mv Firefox.app "Firefox 4.app"

Install firefox5 and then:

$ mv Firefox.app "Firefox 5.app"

Now you would have all three versions:

$ ls -a | grep Firefox
Firefox 3.app
Firefox 4.app
Firefox 5.app
$

The even show up correctly in Applications tab:

(I messed up in renaming and Firefox 4 is actually Firefox4)

Note: unfortunately you cannot launch them simultaneously since Firefox has a mechanism to check if it is already running.

IntelliJ IDEA 10.5 on Mac OS X: save subversion credentials

This is a note-to-self. So when I forget the solution I can come back here and find it.

IntelliJ IDEA is one of the best Java IDEs. More here.

I have had the problem of not being able to save the password of a test svn repository. I found the solution:

  1. vi ~/.subversion_IDEA/servers
  2. add the following lines:
    store-passwords = yes
    store-plaintext-passwords = yes
  3. Save and restart Idea.
  4. Play around with the changes tab until a popup shows up that asks for credentials.
  5. Give the credentials and click <Save the credentials> or whatever it says.
  6. That’s it.

 

Distributed version control systems (Lecture)

This is a presentation I just gave on Bulgarian Java User Group (BGJUG). The topic is Distributed Version Control Systems (DVCS). The main DVCSs mentioned are Mercurial and Git.

Here it is:

Btw, consider it absolutely free. But if you mention my name I’d be grateful.


Усмихни се!

Усмихни се. Красива си. Умна си. Погледни напред, изтупай се от всичко, което ти е в главата, реши кое е важно за теб и започни да се бориш.

Важен е пътят, който ще извървиш, а не успехът, с който бленуваш да се окичиш.

И ще бъдеш щастлива и ще се чувстваш пълноценна.

It is alright

сбърках.

този път много сбърках.
имам само музиката.
само.
никога не съм била по-сама.
и по-сигурна в това, което правя.
как може да съм сбъркала тогава.
спомням си че съм правила някои неща за теб, специално за теб – текстове, снимки, нищо подобно преди за някои…
as long as you love me….
сега пиша до теб, но до онова теб което беше някога,
до онова себе си което бяхме някога.
създадена съм за това.
да пиша.
да дишам.
да бъда себе си чрез някой друг.
без теб не бих могла да бъда това което съм.
без теб ще бъда само празен химикал, чакащ за нов пълнител.
възбужда ли те тази мисъл?
възбуждам ли те?
безгласни смс-и.
благодаря на силата, която ме напи и ме прибра успешно у дома.
така няма да ме видиш.
така няма да ме видиш.
така само ще ме прочетеш.
онова,което обичаш в мен.
онова,което можеш да понесеш в мен.
без талаша.
без физиката, без умората, без сдухаността, без всичко онова,което ме прави несъвършена, без всичко онова, което те кара да се чувстваш несъвършен на мой фон.
запази този текст.
това ще е най-красивото нещо, което някой е създавал за теб.
най-искреното.
нито едно момченце, нито едно момиченце, нито едно нещо, част от твоята плът, дух, мозък, кръв, съзнание, няма да бъде по-красиво, нищо.
само този текст.
най-красивият.
и моментите заедно с мен, когато цялото ти същество е греело и си се чувствал на място.
обичан.
разбран.
красив.
искан.
желан.
наслаждавай се на живота си.
не мисли за миналото.
защото аз съм там.
защото не е хубаво да се връщаш назад.
защото винаги ще се чувстваш нещастен заради това, което е МИНАЛО.
това е твоята диагноза.
МИНАЛОТО.
липсваш ми…

Проблем с онлайн банкирането на ЦКБ

Ето един мейл, който пратих на ЦКБ:

Здравейте,

Пратил съм ви поне 3 мейла относно един и същ проблем. Да приемем, че Mac OS не е много популярна платформа и не ви се занимава. Оказа се, че същите проблеми с макетите ги има и с Internet Explorer. Ваш служител (<angel.yakimov@ccbank.bg>) обеща, че “скоро” ще има ъпдейт, ама досега нищо не се е случило. Не знам дали съм ви скъп клиент ама, ако продължавате така да нехаете и откровено да лъжете, ще си сменя банката. Изборът е ваш.
С намаляващо уважение,
Михаил Стойнов
Не знам дали на тия хора им пука, ама съм сменил 5 банки и ще продължа да го правя, докато не се научат да работят с хора.
П.С. Не съм сигурен за две запетаи.

RichFaces presentation

This is a lecture I presented that is part of the JavaEE course.

The presentation was prepared by Radoslav Ivanov.

Exercises: RichFacesJSF1.2 project for eclipse
Installation: eclipse -> import -> existing project into workspace -> archive -> finish

Richfaces installation instructions for Eclipse in the presentation (ppt).


Gmail’s support for multiple accounts in a single interface

I have multiple gmail and google apps accounts and hate the idea that I have to go through each of them to check them out.

There was always the possibility that I can forward them all to one big merge account, but then I would have to reply to a mail sent to mihail1@gmail.com with a mail account of mihail.merge@gmail.com and the user that sent a mail to mihail1@gmail.com would receive a response from mihail.merge@gmail.com which is not consistent (emails are made up).

Google has a fast account switch in the upper right corner, but that is not consistent, and google apps that have not been upgraded cannot use this feature.

Today I found out that gmail has substantially upgraded their support for other accounts.

This feature is found here gmail -> mail settings -> accounts -> send mail as:

First, you can “own” other email accounts with your google account, which means that you confirm that you own that other email address. For example I can own mihail1@gmail.com from my mihail.merge@gmail.com. Then when I log in to mihail.merge@gmail.com I can send mail pretending to be from mihail1@gmail.com which is very cool. Long time ago gmail used to say that the mail may come from mihail1@gmail.com, but really it was from mihail.merge@gmail.com which made this feature useless. This is no longer the case. But for that to work gmail will use the smtp server of mihail1@gmail.com (one has to supply user/pass for gmail to be able to login). Now gmail leaves no trace (I checked the headers) of the account the mail was really sent from – I always add reply-to address when I own an email, haven’t tested it without supplying.

Second, gmail automatically sets the from field when sending a message. This feature is really cool. If I login to gmail with mihail.merge@gmail.com and receive a message sent to mihail1@gmail.com and click reply, gmail will automatically set the from: field to mihail1@gmail.com even though I’m logged as mihail.merge@gmail.com. This makes this feature an awesome one. Thus the guy that is sending mail to mihail1@gmail.com would have no idea I’m logged to gmail as mihail.merge.

The last thing, how to get the mail from mihail1 to mihail.merge? I use the forward feature. It works fine. Gmail allows me to add a mail and check for incoming mail via pop or imap, but does that with a timer, which would mean mail would arrive more slowly. This might have changed since I last used it.

Adding filters to sort mail makes this feature complete.

Conclusion: it’s now easy to use one gmail account that can receive and now send mail from multiple accounts. Great work, Google.

Disable session persistence in Tomcat


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/mstoynov/public_html_mihail.stoynov.com/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/mstoynov/public_html_mihail.stoynov.com/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

This a pretty common issue when running java web applications on Tomcat. One puts an object into session and after a restart one gets:

Caused by: java.io.NotSerializableException: java.lang.Object

It may not always be java.lang.Object, any class not implementing java.io.Serializable could be in this error.

This is due to Tomcat’s default behavior of serializing all the sessions and after restart trying to deserialize them. (A good question is how does tomcat serialize them in the first place, but no time to research that).

The solution is pretty simple, find tomcat_dir/conf/context.xml and find a place where it says:

<!-- Uncomment this to disable session persistence across Tomcat restarts -->

This works for both Tomcat 6 and Tomcat 7. Tomcat guys did the effort to prepare everything so it’s easy for us.

This solution deserves a blog post because every once in a while I get bugged by this problem and have forgotten the solution. Now I know where to search for one.

Howto start tomcat on port 80 without root privileges on linux

Opening ports below 1024 on a *nix machine requires root privileges. If the application opening the port is exploited, then the exploiter would have full access to the machine since the application was run with root. The way to avoid this is to run the application without root privileges. Then the application has to open a port above 1024. Then the real port (<1024) has to be forwarded to the local one (>1024).

This solution would work on a wide variety of *nix machines that route with iptables. This solution is adequate not only for tomcat but for all kinds of applications and ports >1024.

  1. Check unprivileged user has java in its path. Check with java -version
  2. Check JAVA_HOME is set properly in the env of the unprivileged user.
  3. change 80 to 8080 in server.xml. Check if tomcat works with startup.sh. 8080 may be changed to any other port > 1024.
  4. execute the following to forward the port: sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
  5. After restart, do step 4 again or make permanent (depends on the linux used).

The most valuable part of this howto is the iptables script in step 4. Everything else is a prerequisite.

Note: I have made this port short by design. There are many tutorials that are quite long and explain everything. This just worked with me. I read a lot to get it to work. All I wanted is a solution that works without much explanation.

Note: I’m not an administrator or a linux/unix specialist. I have found that this solution works and allows me to start tomcat without sudo. Use at your own risk.

Why is java development so windows oriented?!


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/mstoynov/public_html_mihail.stoynov.com/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/mstoynov/public_html_mihail.stoynov.com/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

I’m using a macbook. Obviously I’m using Mac OS. Not so obviously actually – recently I saw a few people using Windows 7 on a macbook.

JDK. Developing java applications on a Mac OS is not so straightforward as it is on windows. When you start on Windows, the first thing you do is download the JDK – that’s easy. On Mac OS you don’t have a real JDK, you have Java for Mac OS X. It’s not the same. It’s always late. Using SoyLatte they made a darwin port called openjdk6 that is a lot more like a real JDK. With JavaSE 7 it’s even worse – there are binaries for Windows, on Mac OS one has to build it manually which is not that easy.

Eclipse. Then there’s Eclipse. Thank god – there’s an Eclipse.dmg that is pretty easy to install. But (there’s always a but), the shortcuts are a bit changed. Alt+Shift+X becomes ⌘+⌥+X. There’s also the speed issue – Eclipse is not as fast on Mac OS as it seems on a Windows machine.

Browsers. One major setback is that if one does front-end, one needs Internet Explorer to test. Otherwise QAs come and kick one’s ass because something doesn’t work on IE6 for example. I hate Internet Explorer. Not only IE6, all of them.

Configuration. In my project I have:

File file = new File(element.replace("file:", ""));

my Windows-using colleagues have

File file = new File(element.replace("file:/", ""));

The good thing is that since Mac OS is unix-based I have the settings that are closer to the Ubuntu we deploy our production on.

I don’t know – maybe I should buy a new Macbook with a fast SSD with a lot more juice into it than the one I have now (a two-year-old one that hasn’t been reinstalled since). Now there’s the question – should I buy the 13″ or the 15″?

P.S. The things are getting a lot better. OpenJDK6 port is pretty mature (I use it), OpenJDK7 port is coming soon. Apple donated it’s JavaSE port to Oracle, so soon Java’s download page would feature a .dmg file, which will be awesome.

Still I think developing java apps on a macbook is a bit harder than on a Windows machine. I wouldn’t go back to Windows because of the awesome hardware and because the OS is so much better for anything else.

Johny I hardy knew ye

I first heard this tune in Die Hard 3. After all I like Bruce Willis since third grade. It got stuck in my head. After a few days of out loud humming it was time to find it. It’s called

Waltz of the Banker

After some time searching I found out that the original tune is actually a popular traditional Irish anti-war and anti-recruiting song. It is generally dated to the early 19th century. The original refers to the soldiers from Athy, County Kildare that fought in “Sulloon” (Ceylon – present day Sri Lanka) for the East India Company (in what history knows as the Kandyan Wars though the term was not familiar to the Irish). It has become a definitive anti-war song. It’s called

Johnny I Hardly Knew Ye


Check out the refrain:
Ye haven’t an arm, ye haven’t a leg, hurroo, hurroo
Ye haven’t an arm, ye haven’t a leg, hurroo, hurroo
Ye haven’t an arm, ye haven’t a leg
Ye’re an armless, boneless, chickenless egg
Ye’ll have to be put with a bowl out to beg
Oh Johnny I hardly knew ye.

There’s one more version I found. It’s a popular song of the American Civil War that expressed people’s longing for the return of their friends and relatives who were fighting in the war. That’s called

When Johnny Comes Marching Home

Review: Global Delight’s Boom – boost mac’s volume

Sometimes some youtube clips, movies or podcast have their audio recorded really low. My Macbooks’ sound is not really strong, so when I listen to such a video I struggle to catch the speech – especially when I’m in the shower.

Global Delight has created Boom. It costs $4.99. A software solution to such a problem – it can boost the volume up to 400% and has a system-wide equalizer:

Here’s an indian presenting it: http://www.youtube.com/watch?v=MMiv-qHHeNw&feature=player_embedded#at=197.

bg headhunters – yeah, right

Това е комуникация с един от т.нар. bg headhunter-и:

On 02/23/11 5:40 AM, Daniela Solachka wrote:
——————–
Здрасти, понеже виждам, че се оплакваш от headhunters, мога да те посъветвам да си махнеш от профила  “interested in career opportunities”. Или пък целия профил. 🙂
Поздрави.

Моят отговор:

Всъщност се интересувам от истински career opportunities, а не от тези стандартните типично по бг изпълнени:

  1. елате на интервю,
  2. дайте си всичките лични данни,
  3. ние няма да ви кажем нищо за фирмата, за която ви търсим и
  4. ще ви сложим сивито в нашето портфолио.
  5. На интервюто ще ми се задават абсолютно малоумни въпроси, защото ще си говоря с някоя тотално не-техническа руса кака.
  6. Няма да сте прочели въобще сивито ми или поне няма да сте вникнали в него и ще ме предлагате за тотално неадекватна позиция, защото ще сте извадили само 2 ключови думи и от моето сиви и от изискванията на клиентите си.

Не, не желая career opportunities на бг headhunter-ите. Там се връзват само разни junior-и, които сами трудно ще си намерят работа сами, защото нямат опит. Но качествените хора с опит избягват подобни услуги (повярвайте ми, всичките ми контакти имат същото мнение за целия този бизнес, просто са учтиви и не го казват в лицето на спамърите).

И, btw, трябва да се кръстите bg spammers вместо bg headhunters. Спамите през linkedin, skype, mail и каквото намерите още. Няма отърване.

Ebanking на ОББ – #epicfail

Всичко започва с регистрация на сайта ebb.ubb.bg (конкурс ли е имало за името на субдомейна?). Оттам си избирате парола, НО НЕ И ПОТРЕБИТЕЛСКО ИМЕ. (това е стъпка 1)

След това отивате на място в клон (клонът си го избирате при регистрацията в стъпка 1 и не можете да идете в друг клон) и потвърждавате регистрацията. Дотук всичко е логично. Те ви дават плик с юзър/парола (стил нова дебитна карта).

Прибирате се вкъщи и се опитвате да се логнете с това потребителско име и парола. Не става.

Тук е важно да отбележим, че генерацията на сертификат (да и сертификат изискват) става само на Internet Explorer (мързеливци). Освен това сървъният сертификат на ebb.ubb.bg е self-signed (наистина ли сте толкова свидливи и непрофесионални?).

Така, докъде бяхме стигнали? А да, потребителското име и парола от плика не стават за логин. Сайтът им казва грешно потребителско име и парола.

И сега какво? Ами звъним на съпорта. Естествено не беше работно време и оттам (имали служител само за спешни случаи) любезно ми обясниха, че няма да ми помогнат, защото не било работно време. Тъпанари.

Продължаваме сами с опитите. Някой се сеща (в тоя момент вече сме трима и brainstorm-ваме какво може да е решението, не искаме да се предадем), че всъщност при регистрацията (направена април’2010) сме въвели парола. Добре, че е записана на лист. Изравяме я и пробваме с какви ли не потребителски имена: егн, мейл, … Не става. Накрая пробваме с потребителското име от плика и паролата от регистрацията и viola СТАВА.

Дотук добре. Влизаме вътре (естествено с Internet Explorer) и започваме да ровим. Сега е момента да издирим как се генерира сертификат. Оказва се, че втората парола от плика е за генерирането на сертификат, без нея не генерира сертификат. Генерираме сертификат. УРААААА.

И най-накрая (вече са минали няколко часа и са изхабени много нерви) се логваме и половината линкове не работят. Кво става? Примерно не можем превод да направим. ЗАЩО? Разлогваме се няколко пъти и накрая откриваме, че при логин трябва да се цъкне един чекбокс (май беше нещо от рода на “Активирай нещо си”). Цъкаме там и вместо да ни логне, ни завежда до един екран, в който очаква код от sms. НЕЕЕЕЕЕЕЕЕЕЕЕЕ. А батерията на телефона беше паднала и не можехме да прочетем. Отказахме се да продължим. Обяснихме на изстрадалия клиент на ОББ, че като си зареди батерията и (ВЕРОЯТНО) ще може и преводи да прави, ама не сме сигурни, защото не сме стигнали до там.

Защо са толкова некадърни тия банки? ЗАЩО? КАКВИ МАЛОУМНИЦИ СА ГО МИСЛИЛИ ТОЯ workflow? ЗАЩО ИСКАТ СЕРТИФИКАТ И SMS ЕДНОВРЕМЕННО? А ПРЪСТОВ ОТПЕЧАТЪК НЕ ИСКАТ ЛИ? Ако искате сигурност, изисквайте УЕП, както вече правят масово банките, защото това е легалния начин да се правят нещата онлайн.

ОББ, СТЕГНЕТЕ СЕ. Моята банка иска регистрация, потвърждение на място и това е. А вие? Отворете електронните банкирания на другите банки и откраднете нещо работещо.

Некадърници!!!

Проблем с Infonotary Configurator 1.3.4

Репортнах следния проблем на инфонотари:

Плугинът Infonotary Configurator 1.3.4 ви за Firefox създава проблеми с Firefox за Mac OS X. Проблмът се изразява в тотално irresponsive (не мога да преведа) интерфейс браузър. Страниците не се зареждат адекватно, на линкове трябва да се цъка по няколко пъти и въпреки всичко не се зареждат. Пробвах изключване на всички плугини на firefox – открих, че проблемът е във вашия плугин.

firefox with infonotary plugin
firefox with infonotary plugin
firefox without infonotary plugin
firefox without infonotary plugin
firefox error probably related to infonotary plugin
firefox error probably related to infonotary plugin

Update: Ето комуникацията ми с Васил Бъдев (представи се като разработчик на въпросното нещо):

Здравейте,

Плугинът Infonotary Configurator 1.3.4 ви за Firefox създава проблеми с Firefox за Mac OS X. Проблмът се изразява в тотално irresponsive (не мога да преведа) интерфейс браузър. Страниците не се зареждат адекватно, на линкове трябва да се цъка по няколко пъти и въпреки всичко не се зареждат. Пробвах изключване на всички плугини на firefox – открих, че проблемът е във вашия плугин.
Версия на firefox: 3.6.10
Версия на Mac OS : 10.6.6.
Атачмънти:
Скрйншот с включен плугин (без пуснати други плугини):
Скийншот без
Грешка, която може би е свързана с плугина
firefox with infonotary plugin firefox without infonotary pluginfirefox error probably related to infonotary plugin
firefox error probably related to infonotary plugin
Date: Fri, 18 Feb 2011 12:44:39 +0200
From: Vasil Badev <v_badev_AT_infonotary.com>

Здравейте,
това вече го прочетох на вашият блог. Както писах и там, проблема според мен не е в Infonotary Configurator for Mozilla. До колкото си спомням по телефона ви обясних, че единственото което прави той след първоначалната инсталация, е да проверява стойността на extensions.infonotary-mozilla-setup.lastVersion, при всяко отваряне на нов прозорец, и ако тя съвпада с текущата му версия спира работа. Не можете да ме убедите че по този начин се чупи зареждането на всякакви станици, както и SSL връзките. Понеже при забраняване или деинсталиране на разширението не се премахват настройките които то прави, теорията че точно това чупи Firefox ми се струва още по-невероятна. Не случайно бях предложил да дойдете до офиса за да се опитам да намеря проблема, но Вие не дойдохте.

Най-вероятно проблема е във лошо работеща версия на софтуер за смарт карти или лошо настроен pcscd демон, но това не се вижда от снимките които сте дали. В самият конфигуратор има изключително малко специфичен за Mac OS X код и той се изпълнява само при първоначална инсталация. Ако имаше проблем като описаният от вас той щеше да се прояви при всичките ни клиенти, както и на нашите компютри. След като проблема е само при вас явно е някъде другаде.

П.П.
Mac-a на който реално се тества всичкият ни софтуер е с Firefox 3.6.12 и Mac OS X 10.6.6, но разширението е тествано и на Firefox 3.6.10.

Date: Fri, 18 Feb 2011 12:51:20 +0200
From: Vasil Badev <v_badev_AT_infonotary.com>

Здравейте отново,
чак сега прочетох какво сте коментирали в блога си, явно вече сте двама клиенти са точно същият проблем, но според мен той не е следствие от инсталацията на нашият add-on. Ако можете се обадете на телефона от подписа ми за да се опитам да локализирам проблема.

Date: Fri, 18 Feb 2011 13:14:29 +0200
From: mihail stoynov
Още веднъж: имайте предвид, че не желая да ви убеждавам в каквото и да било. Грешката наистина може да е във всичко и вероятно сте прав, тъй като познавате съответния плугин, но е непрофесионално да отричате грешка без анализ.
Вчера свалих файърфокс 3.6.13 и сега изтествах с включен плугин. Проблемът не се наблюдава, което може би показва, че сте прав. pcscd демона го включвам само като работя със сертификата, иначе ми държи по 10-20 процента от cpu-то постоянно и се принудих да включвам/изключвам ръчно, което е досадно. Надявам се няма да кажете сега, че това също се наблюдава само при мен 🙂 Ако проблемът се появи, ще ви пиша допълнително.
Отново с най-добри намерения,
Михаил Стойнов
Date: Fri, 18 Feb 2011 15:36:40 +0200
From: Mihail Stoynov

Здравей,
Отново се случи – виж атачмънта. Вече не съм сигурен в това каква е причината.

Date: Fri, 18 Feb 2011 16:08:57 +0200
From: Vasil Badev <v_badev_AT_infonotary.com>

Здравейте,
Apple ползват много стара версия на pcscd, която проверява какви четци са включени пет пъти в секунда (подробности тук –http://ludovicrousseau.blogspot.com/2010/08/ram-and-cpu-improvements-in-pcsc-lite.html). На това се дължи и натоварването.

Проблема само при включено устройство ли се наблюдава?
Може ли да ми изпратите изхода от следните команди в терминал с включен четец:
ps ax | grep pcscd | grep -v “grep pcscd”
ls -l /usr/libexec/SmartCardServices/drivers
ls -l /etc/readers.conf
ls -l /Library/LaunchDaemons/org.opensc.pcscd.autostart
/Library/OpenSC/bin/opensc-tool -i
/Library/OpenSC/bin/opensc-tool -l
/Library/OpenSC/bin/opensc-tool -n
/Library/OpenSC/bin/pkcs15-tool -D
pcsctest

Терминала се намира в Application/Utilites. Всяка команда трябва да я копирате и да я поставите в терминал и след това да натиснете Enter.

Date: Sat, 19 Feb 2011 22:16:55 +0200
From: mihail stoynov

Проблемът го има и с изключен четец.

Забележка: спирам пускам pcscd със launchctl:

launchctl (un)load -w /Library/LaunchDaemons/org.opensc.pcscd.autostart

Резултати от командите в атачмънта
Date: Mon, 21 Feb 2011 12:55:49 +0200
From: Vasil Badev <v_badevA_AT_infonotary.com>

Здравейте,
Ако при изключен add-on проблема не се проявява не знам какво да предложа освен да дойдете до нашият офис с компютъра и тук да се опитам да намеря къде е проблема.

Ако се прояви и при изключен add-on може ли да пробвате да обновите софтуера за картата и четеца.
За смарт картата първо ще трябва да деинсталирате SCA със sudo /Library/OpenSC/bin/opensc-uninstall след това инсталирайте последната версия от http://www.opensc-project.org/files/opensc/OpenSC-0.12.0-10.6.dmg. За четеца си инсталирайте актуалният драйвер на HID Global от http://www.hidglobal.com/drivers/omnikey/ifdokccid_mac_10.6_i386-3.0.2.dmg.

В новата версия на opensc няма файл /Library/LaunchDaemons/org.opensc.pcscd.autostart, така че няма да можете да спирате и пускате ръчно по същият начин.

Date: Mon, 21 Feb 2011 15:08:13 +0200
From: mihail stoynov

Здравейте,
Ще изчакам да видя дали проблемът ще се окаже хроничен.
Ако не мога да спирам и пускам ръчно pcscd, не бих ъпдейтнал, защото понякога тъпия демон скача до 50% cpu и си стои така. Имам нужда да мога да спирам/пускам ръчно.

Още нещо: другите ползватели на тоя демон как свикват с натоварването? Ако това нещо стои постоянно, лаптопът ми постоянно ще върти вентилатора на 6000 оборота и ще е доста горещ

Date: Mon, 21 Feb 2011 17:44:41 +0200
From: Vasil Badev <v_badev_AT_infonotary.com>

По принцип демона се стартира в момента в който включите четеца. Повечето ни клиенти не са се оплаквали от подобен проблем, така че или не са забелязали или не се проявява при всички. На нашата тестова машина pcscd не натоварва процесора повече от 1-2%, но до преди малко на него нямаше инсталиран четец на OmniKey. Сложих му техният драйвер и един четец с карта и ще го наблюдавам тези дни.

П.П.
Ако не искате да обновите OpenSC (стартовият скрипт е от него), може да сложете новата версия на драйвера на OmniKey. В момента сте с 2.6.4, а актуалната версия е 3.0.2.

Review: свеж блог за харченето на пари

Покрай станалия популярен текст за “хаковете на мтел” открих един супер свеж блог на адски откровено момиче, което разказва за неволите си като предприемач (ах, този Кийосаки) и мисли на глас за това как се харчат и изкарват пари.

Прекарах няколко часа четейки статия след статия. Това не се беше случвало от joelonsoftware.com насам. Авторът пише много увлекателно, но основната причина да е толкова завладяващ почти всеки текст е искреността, с която се описва наивното понякога мислене и самоиронията под формата на дописвания след време.

Силно препоръчително четиво: kadebg.com

Twitter is so addicting

I’m using twitter for almost 2 months now. It’s so addicting. It prevents me from writing in the blog. Writing here takes sometime to think whether there’s anything to write. Whether it’s good and whether I though well enough what I want to write. While in Twitter one just shoots random thoughts. It’s addicting. There’s always something small that one want’s to share. Twitter is perfect. I think I’m overdoing it, but the two people following me haven’t left me yet. Thank you.

How do you run windows when your primary OS is not Windows (need help)

My laptop is a Macbook. It runs Mac OS X. While the OS is awesome, it’s not the most popular one. This would mean that there’s software that is only made for Windows. And it’s software that is custom, specific and generally cannot be changed for another software [running on OS X].

There is however one piece of software which even though it runs on OS X, I want on Windows. And that is Microsoft Office. MS Office for Mac OS X sucks. The ribbon interface is so ugly on Mac, the menus so different. And it deleted one of my presentations (while presenting it !!!). Don’t even get me started on OpenOffice, iWork and all the copycats. When everyone around you is using MS Office, you have to use it too. Period.

So we agreed that I need Windows

The most common thing to do is get a virtual machine. I was using VMWare Fusion with one Windows XP and one Windows 7 installation for quite a while. The problem is the HDD. It just can’t keep up with both machines (the host and the virtual). While stopping the swapping in the virtual machine can help, it doesn’t fix the problem. And I have the fastest plate hdd available – 7200 rpm, a lot of cache. Also getting a lot of RAM also helps considerably – I have 4GB but the issue with the HDD remains.

I went to the competition

People said that VirtualBox and Parallels would do the job better. I tried VirtualBox for a day. Importing failed due to hardware inconsistencies and even while loading it just made the host os unresponsive. So I guess the competition doesn’t do the thing better. What next?

What about remoting?

Using a dedicated machine that stays somewhere and logging on it only when needing windows could do the job. This means I have to buy an extra machine. Remoting would mean that I would need net constantly. And Remote Desktop for Mac is pretty bad. I could always switch to TeamViewer (also available for my phone), but it is not the best either. Also copying stuff while using my phone’s 3G is not viable if the stuff is in the hundreds of megabytes scale.

What about SSD?

While the classic HDDs are good for working on serial pieces of data, SSDs shouldn’t have the problem working in parallel with 2 streams of data. I have a friend who bought 50GB OCZ drive and he says his machine now went supersonic (a lot faster). The drive was like 130 euros. I can’t work with 50GB. 128GB could maybe do the job but it’s going to be tough. And buying a bigger one would be very expensive. Also I haven’t asked how does this drive behave with a VM. It’s important to do so.

And no I would NOT install Windows

…or get a Windows laptop. No way. No BootCamp either.

Conclusion: I need help

This problem would be relevant for everyone using any OS that is not Windows. So, people-not-using-windows, PLEASE HELP ME decide what to do.

The past 2010

The past year for me was marked by serious health issues that were pretty scary for me and the absolute lack of energy. There was some planet or constellation alignment, I don’t know, but throughout all the year I lacked power. Maybe I need RedBull or some other drug. Coffee I think lost its power to revitalize me in the morning.

Due to the scary stuff I had to endure, I think I value life more and maybe I know a little better what I want out of the near future. I’m taking steps to live healthier and I understand that the human body is incredibly strong but also easy to be broken if not taken care of. I eat better. If I figure out this energy problem I think 2011 would be a lot better year. So this is what I wish to myself. Also to be more focused.

Review: TED

TED (Technology, Entertainment and Design) is

a global set of conferences curated by the American private non-profit Sapling Foundation, formed to disseminate “ideas worth spreading.” (Wikipedia).

So actually TED are presentations in every field imaginable and most of them are really good. And some of them are inspiring. I use Miro player to download them and watch them when I have some free time.

Highly recommended.

Personal favourites:

 

Review: Miro

Miro is an application I first heard for at thepiratebay.org. It’s a torrent client, a video player and a desktop portal solution for all media. It’s free and integrates well with the pirate bay’s torrent tracker. Unfortunately it doesn’t integrate with local torrent trackers for some reason. Anyway it’s very good for following youtube channels and watching cnet shows and most of all watching TED presentations.

It has versions for both Mac and Windows, though I have only tried the Mac OS version, both look and behave the same. The GUI rocks, the player is light and runs nice.

The best thing is it downloads the youtube clips or ted presentations in HD and stores them locally. It’s full of browsable free content.

One note: youtube channels have to be added with the URL in this format: http://gdata.youtube.com/feeds/api/users/hdstarcraft/uploads?alt=rss with hdstarcraft being the user name. Otherwise it complains for some reason.

Verdict: highly recommended.

Update (24.08.2011): Version 4.x (especially for Mac) is bloated with pointless features. It’s not that fast and slim. It runs slowly. It crashes. And the most stupid thing I’ve seen – right/left arrow now goes to the next/previous feature respectively. To forward/rewind with 30 secs the Shift+right/left arrow must be used. So stupid. Cannot be configured.

Малко за ориналните неща

Покрай празниците имах достъп до телевизор и гледах
новините по една от популярните български телевизии. На финалните
надписи пишеше нещо като “Гардероб” и отдолу имаше логото на една
марка за дрехи. Марката е българска. Спомням си как бях чел едно
интервю за тази марка и собственичката обясняваше как тази марка
има 200 годишна история започнала в Италия. Оказа се, че марката е
замислена преди не много години и името идва от галеното
наименование на нечий наследник близък до собствениците. Толкова за
автентичността.

Review: The daily show with Jon Stewart

I first watched The daily show while I was living abroad. I got only a few english speaking tv programmes and most of them were news related – CNN, NBC… The daily show was one of the three programs I liked – the other two were The tonight show with Jay Leno and The late night with Conan O’Brien.

The daily show is something I consider a time well spent. It can be watched for free on its site: http://www.thedailyshow.com/. It’s paid in iTunes.

On the same site (Comedy Central) many other shows from the cable television may be watched for free. The most notable from them is South Park.

Всичко за продан

Преди няколко дни научих, че таксиджиите в София масово карат без един документ, който удостоверява, че са преминали изпит за водач на такси. Изпитът представлявал въпроси за маршрути в София. Поредният днес ми каза: “И триста лева съм давал на ДАИ и (гордо) съм ги изкарвал за един ден)”.

Сещам се за една случка преди години – един колега, англичанин си беше харесал българско полицейско яке. Оказа се адски лесно да се намери такова, даже ме врънкаха да си купя и още артикули. Ако не се лъжа за 5 евро направих безценен подарък:

Which stats to trust: Google analytics, Host or WordPress Blog Stats?

I’m using Google Analytics, awstats from cpanel, and a few plugins for wordpress (statpress, wassup). Except Google Analytics they all have unreadable interfaces with a lot of info, that I do not understand.

They all give me different results. I would like to know which one is correct or at least close to the truth. Another problem is Ghostery, which I use – a browser plugin that can block Google Analytics which automatically make its statistics wrong. Recently I was bombarded with requests from Russia and StatPress says Russia is the place where I get most of the requests, which is not right. Until I get an unambiguous answer I’ll keep them all running.

What do you think – which gives the best (closest to the truth) stats?

Ghostery

Few days ago I opened The Pirate Bay and was astonished to find it full of ads. Sometime later it happened with another site. Finally, I found the problem. AdBlock was stopped. AdBlock is the plugin that must come preinstalled with every browser. It kills (removes) almost all ads from sites. It’s easy to use and to customize (add more sites or ads to the block list).

Georgi said he found something that could accessorize AdBlock even further. Ghostery

sees the invisible web – tags, web bugs, pixels and beacons. Ghostery tracks the trackers and gives you a roll-call of the ad networks, behavioral data providers, web publishers, and other companies interested in your activity.

Since Firefox for Mac is awful. I’m using Chrome which is quite poor on the plugin front. But this one is available for Chrome and works pretty nice:

Mac OS X finally with a real Java

A quote from a newsletter from Oracle.

Oracle and Apple Announce OpenJDK Project for OSX; Java SE 7 and 8 JSRs Approved

Good news all around! Oracle and Apple announced the OpenJDK project for Mac OS X. Apple will contribute most of the key components, tools and technology required for a Java SE 7 implementation on Mac OS X, including a 32-bit and 64-bit HotSpot-based Java virtual machine, class libraries, a networking stack and the foundation for a new graphical client. OpenJDK will make Apple’s Java technology available to open source developers so you can access and contribute to the effort.

Furthermore, the JCP Executive Committe has approved the JSR “quartet” for Java SE 7 and Java SE 8. With this ratification, the Java standard will progress through the JCP while the open source reference implementation will be delivered through the OpenJDK project. See you on OpenJDK!

-The Oracle Technology Network Team (See Team Blog)

This means Java SE 7 woud be available for Mac OS X too and that Apple users will receive Java as soon as other platforms dog. Also the four JSRs for Java SE 7, Java SE 8, Project Coin and Lambda Expressions.

Apache redirect 301 with non-english characters

I have a lot of http redirects in my .htaccess file because I’d like to keep links from my old blog alive. Today I found that this redirect works:

redirect 301 /blog/2007/08/15/InMemoriamLorkis.aspx https://mihail.stoynov.com/2007/08/15/in-memoriam-lorkis/

And that this doesn’t:

redirect 301 /blog/2007/08/17/%d0%9b%d0%be%d1%80%d0%b0.aspx https://mihail.stoynov.com/2007/08/17/%d0%bb%d0%be%d1%80%d0%b0/

It should look like this:

redirect 301 "/blog/2007/08/17/Лора.aspx" "https://mihail.stoynov.com/2007/08/17/лора/"

WordPress, images and align=”right”


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/mstoynov/public_html_mihail.stoynov.com/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Note to self: put this code in every theme’s css if it doesn’t have it.

img.centered {
display: block;
margin-left: auto;
margin-right: auto;
}
img.alignright {
padding: 4px;
margin: 0 0 2px 7px;
display: inline;
}
img.alignleft {
padding: 4px;
margin: 0 7px 2px 0;
display: inline;
}
.alignright {
float: right;
}
.alignleft {
float: left;
}

Supporting wikipedia cookie

I think wikipedia is a great thing. There are studies that it’s and Britannica’s articles are comparably good, which by itself is a great compliment. It’s ads free, its interface rules. It’s pretty neat and tidy. I always add ‘wiki’ at the end of a search if wikipedia is not in the first ten search result, which is rare. I’m not a committer, only fix some minor error occasionally.

These guys operate wikipedia only from donations. Last year they needed $10m to operate. This year I guess it’s twice as much. So every year they start a campaign with a picture of Jimmy Wales’s face. I don’t think he’s ugly, but the same face every year? This year they finally changed the face with a lady one. A lot better.

Everyone using wikipedia should support it and I generally dislike people saying that it’s just another website. But one does donate something, wouldn’t they at least give a browser cookie or devise some other mechanism that would hide the ugly banner on top of every page?

Как да гледаме iptv.bg на iPhone/iPad

Това е ръководство за гледане на телевизии и слушане на радиа от iptv.bg чрез iPhone/iPad. Ръководството е тествано на iPhone 4G, iOS 4.1.

Важно е да се обележи, че ако не можете да гледате iptv.bg от компютъра, няма да можете да го гледате и от телефона – трябва ви wi-fi свързаност от провайдер, който е клиент на iptv.bg (Мтел не е клиент на iptv.bg и дори и радио не може да се слуша).

Необходими програми

Необходимо е телефонът, с който ще се гледа телевизия, да е jailbrеaked (споко, законно е).

  • iFile (има я в Cydia, платена)
    – файлов мениджър
    – има вграден текстов редактор (за отваряне на asx файловете)
  • iPhone Safari Download Manager (има я в Cydia, платена)
    – позволява сваляне на файлове от Safari
  • OPlayer (платена, 2.39€)
    – видео плеър – да плейва WMV8 енкоднати ASF стриймове (iptv.bg ползва такива)

За съжаление и трите програми са платени. С изключение на първата, другите две вероятно могат да бъдат заменени с други, които имат подобна функционалност (FStream успешно беше използван за слушане на радио).

Необходими стъпки

  1. Отворете iptv.bg в Safari и се логнете (създайте си потребител ако нямате):
  2. Изберете си телевизия или радио и изберете разделителна способност (hi-res и lo-res). Гледането на телевизиявисоко качество дори и на iPhone 4G е с насичане, въпреки че разделителната способност се “събира” в екрана на 4G. Ниското качество работи гладко на същия телефон.
  3. Задръжте пръст на тази иконка,  за да се отвори контекстното меню и, след като то се отвори, натиснете “Download Target…”, което е част от Safari Download Manager (показано по-долу). Без Safari Download Manager няма да имате червения бутон:
  4. Изберете си папка, в която да запазите asx файла (папката няма никакво значение):
  5. Отворете iFile и намерете папката, в която сте свалили asx файловете:
  6. Цъкнете на синята стрелка вдясно от файла и ще се отвори следното меню:
  7. Изберете “Open with…” и ще се отвори следното меню:
  8. Изберете “Text Viewer” и asx файлът ще бъде отворен с текстов редактор. Asx файловете са мета файлове и всъщност стриймът за гледане на телевизия е този, който е трябва да се копира.
  9. Копирайте избраният адрес:
  10. Отворете OPlayer и изберете “Open URL”:
  11. Ще се отвори следната страница, цъкнете на адрес бара:
  12. Изберете пейст, за да копирате адреса от asx файла:
  13. Сега адресът за гледане е зареден и остава само да натиснем бутона Done, за да го заредим:
  14. Voila, вече гледаме телевизия. Това е високо качество и насича сериозно дори и при “избити” други приложения.
  15. Ето и други скрийншоти (ниско качество):
  16. Ръчното вадене на url-тата е адски досадно, но OPlayer помага като запазва последните използвани адреси, а линковете дори и след няколко дни все още са активни (не знам кога expire-ват):

    (Плейлисти не знам как се правят, накрая ме домързя)

Заключение

Качеството на гледаната телевизия е добро, няма насичане. Може да се слуша радио на фонов режим и да се работи с други програми. Аз започнах тази идилия, защото исках да слушам радио Витоша, а те стриймват само през iptv.bg и така стигнах до гореописаното решение.

Допълнителна информация: https://mihail.stoynov.com/2010/12/07/iptv-bg-on-iphone/.

Изпробвано и работи на iPhone 4G, iOS 4.1. Не съм тествал на iPad, защото нямам такъв под ръка, но смятам, че ще стане. Ако някой друг тества на друго устройство или с други програми, ще се радвам да сподели мнение в коментарите.

Вероятно същото решение може да се приложи и на Android телефони или Windows Mobile, Symbian, Blackberry като се използва същото вадене на стрийма, но не съм пробвал. Всеки споделен опит е добре дошъл.

По-удобно би било ако iptv.bg предлагаха директен линк към asf стрийма. Не пречи да се пита.