Look, someone's on that tree

Apr. 29th, 2011

01:58 pm - goodbye LiveJournal

I am sick and tired of you LiveJournal. You want me to pay for subscription in the same time as you are filling my inbox here and in my email with spam. You keep loosing the order of my posts, you keep 'archiving' them making the backup sync impossible for me and you keep sending me stupid update emails about how often you change your header. I hate you. And I am leaving you. 

Goodbye!

PS. My original blog with blogger is still active and very well, I am already using it actively and intend to keep doing it while you die in loneliness. It is true, they marked it as NSFW but who cares, people either read it or not. 

Tags: ,
(1 comment | Leave a comment)

Apr. 10th, 2011

06:20 pm - Storm!

Very nice poem by Tim Minchin. I advise anyone who understands English to hear it. I bet most of you know at least one 'Storm'.

Tags:
(Leave a comment)

Apr. 5th, 2011

10:17 am - Torchwood is coming back!!!

Torchwood poster - miracle day
Oh, and by the way LiveJournal is so spammy these days, it is ridiculous! I am not the gatekeeper of my f**king blog! If I wanned to do spam filtering myself I would have set up my own blogging platform. So screw you livejournal! And screw all Russian spammers! I am getting out of here!

Tags: ,
(Leave a comment)

Mar. 20th, 2011

09:44 pm - On a clear day you can see all the way to conspiracy

Very nice story this week on Escapepod!

Well narrated this one also!

Tags:
(Leave a comment)

12:40 am - Кози обувчици

Много яки кози обувчици, малко като на дявол крачетата, но повече като на козичка:

кози буйки


Via: BoingBoing

Tags:
(Leave a comment)

Mar. 13th, 2011

04:29 pm - Disable third party JS form submission

Let's say you have a very nice form on your page and you dislike people who write user script. Scripts that mess up with your form for example.
Typical form submission with user script would be:

document.forms['targetform'].submit();
Very well, lets prevent this! Each form has a submit button, lets add one that has type submit, but in addition has the name 'submit' too (you should know to ignore its value on your server side logic):
<button type='submit' value='whatever' name='submit'>My button</button>
Now we have harder to spot intuitive way to submit the form with javascript, $('myform').submit() will give TypeError as the 'submit' property of the HTMLFormElement is no longer a function, instead it is an HTMLButtonElement.

This little trick of course is easy to catch and overcome, however it is very easy to implement and will stop the less educated scriptwriters from messing up with your manual form submission requirement.

Tags:
Current Location: Bulgaria, Varna
(Leave a comment)

10:38 am - Node js on port 80

Yes, I know, nodejs on port 80 is not a good idea, however if the project completely disregards the proven http servers and completely relies on node for all http traffic we need to make compromises. Or not.

Here is how I run node as main http server:

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8000
And of course we close all other ports, as usual for web servers facing the world.

Disclaimer: I found this on Internet, the original 'thanks' go to: @rckenned, @jrconlin, and @spullara ... see also http://iptables.rlworkman.net/chunkyhtml for a pretty definitive-looking iptables tutorial from @frozentux

Tags:
Current Location: Bulgaria, Varna
Current Music: Mylene Farmer - California
(Leave a comment)

Mar. 5th, 2011

03:24 pm - Whales sounds

Вместо да четете Дийпак Чопра и неговите измишльотини за неподвластното на времето тяло, горещо ви препоръчвам да слушате китове ето тук
Особено яко е keening/loaning.
Да предупредя, по-добре пеят от Карл Сегън (той нали се опитваше да ги имитира в един епизод на Космос, не особено успешно според мен).

Tags:
(Leave a comment)

02:57 pm - Deepak Chopra asnwers a question

Може и да не знаете кой е Дийпак Чопра, но е факт, че е продал доста книги, повечето от така наречените 'спиритуални'.

Аз самият за известен период от време бях очарован от този измислен свят на набивалици, чудеса, изцеления, срещи с предишни животи и така нататък. Лесно е да започнеш да си вярваш и да вярваш на тези, които с ткаъв авторитетен тон твърдят измислиците си. Но не това е темата сега, а видеото отдолу. Насладете се:)


Линк към видеото в YouTube

Tags: , ,
Current Location: Bulgaria,
(Leave a comment)

Mar. 3rd, 2011

07:10 pm - YouTube changes

YouTube has changed the way they provide the video URL, so Free YouTube script is not working any more.

However the change is trivial, here are the updated bits:

-        var fmt_url_map = unescape(document.body.innerHTML.match(/fmt_url_map=([^&]+)/)[1]).split(/,/);
+        var fmt_url_map = document.body.innerHTML.match(/fmt_url_map": "([^"]+)/)[1].split(/,/);
-                    videourl = val[1]
+                    videourl = unescape(val[1]).replace(/\\/g,'');
It is working again. I am so used to watching the videos in separate tab with mplayer, i cannot even recognize the page with embedded video any more.

Tags:
Current Location: Bulgaria,
(Leave a comment)

Feb. 21st, 2011

11:20 pm - Note to self

Node is actually perfect for testing JavaScript snippets in console environment when my computer is overloaded with 100 other things and I should not start another browser to just test 5 lines of code.

Tags:
(Leave a comment)

Feb. 17th, 2011

11:31 am - Javasscript timers and time

Introduction:

Javascript provides means to postpone execution of a function with 'setTimeout' and 'setInterval'. How is this handled exactly and what does it mean for embedded devices/ set top box type of devices using gecko/webkit is used for its interface.

Example:

A basic function of each STB is to display a clock somewhere in the user interface. Bellow is a very simple class that does exactly that.


var Clock = function(el) {
    var clock = {}, timer, refresh = 60*1000;

    clock.dom = el || document.getElementById( 'clock' );
    clock.format = clock.dom.getAttribute( 'timeFormat' ) || STATIC_DATA.clockTimeFormat;
   
    var setTime = function(  ) {
        Tools.setHtml( clock.dom, Date.getFormatedTime( clock.format ) );
    };

    var start = function(  ) {
        setTime();
        clearInterval( timer );
        timer = setInterval( setTime, refresh);
    };
   
    var stop =  function(  ) {
        timer = clearInterval( timer );
    };
   
    clock.start = start;
    clock.stop = stop;

    return clock;
};
This is all good and it works, basically updates the inner html of the dom element designated to display the time every 60 seconds (i.e. once a minute and we should probably show only date, hour and minute, no seconds. However what will happen if the system time is changed.

By definition setInterval does the following:
 

Calls a function repeatedly, with a fixed time delay between each call to that function.

 
(from MDN)

So regardless of all external factors one would expect that the once the function is called it will be called again in 60 seconds. As the timers in JS are not precise one would actually expect the function to be called in about 60 seconds.

Real world:

The example above works well until someone decides to change the system time. So let's say we start our clock in 15:00. Then we expect the timers to work every ~60 seconds and the displayed time to change. at 15:01 the function will work and so on.

What happens however if someone sets the system time to 14:00 and our application is still running? One would expect the function to work again in 60 seconds, so we expect once the time of 60 seconds elapses the function to work, the time will be taken again and the clock in our user interface will show 14:00. This however is not how it happens.

It seems periodical and delayed functions are bound to an exact time variable rather than period. So when at 15:02 you say 'delay my function with 60 seconds' you are actually saying 'delay my function to 15:03'. And now if we go and change system time to 14:00 the function will be executed again, only in 1 hour and 2 minutes and 60 seconds. What will happen if the time is changed to 16:00? You can guess it okay - it will never be executed.

What should we do with it:

I don't know all the answers, probably one should change how timers in JavaScript are recorded, but for now one should reset all timers once the time on system is changed. So in the above example we need two things - a simple way to reset the timer and a mechanism to notify the execution environment for the time change. The last however cannot be done without external function. One should be able make calls to JS objects from outside and actually call the 'restart' method of the clock.

clock.restart = function( ) { stop(); start(); };
Conclusion:

In dynamic systems where we expect long runtime for our application we cannot rely on periodical execution too much.

Tags:
(Leave a comment)

Feb. 11th, 2011

10:02 pm - Botnets?

Today on New Scientist was an entry about a research from the University of Minnesota in Minneapolis computer specialists that states

The attack requires a large botnet – a network of computers infected with software that allows them to be externally controlled: Schuchard reckons 250,000 such machines would be enough to take down the internet.

Okay, question: what the fuck? So you mean there actually are 250,000 computers being out there and running bots unsuspecting? This seem to me like science fiction. How come those computers are not attended? How come an operating system/software that allows such thing to happen is still used? Talking about Windows? I don't know, but this really really stupid to me!

I run Linux from 1998 on all my machines. Servers, laptops, home computer, home media centre, my parents computers. Never have allowed any access to anyone. I know it is possible for someone to compromise a server or even several servers but 250,000 computers... this is mind lowing for me.  And they (windows folks) still talk about security? And ease of use? Do they mean insecurity and ease of misuse? I don't know. I was 'this' close to by myself a windows 7 laptop (to be able to experiment with the hardware acceleration in CSS3 animations and transitions as well as webGL). Well. I would not be doing it. Sorry windows. I will stick with Linux for now, even thou openGL ES support is crappy and works only on Nvidia cards. It is still better than having a zombie machine.

Tags:
Current Location: Bulgaria, Varna
(Leave a comment)

Feb. 5th, 2011

06:18 pm - Хомеопатията срещу 1023

На адрес 1023.org.uk можете да научите какво ще се състои този уикенд.

А долу можете да видите Джеймс Ранди, който отправя предизвикателството си отново към хомеопатите:
Връзка към видеото в YouTube
Защо поствам това? Защото, като доста поболедувал човек смятам, че е важно да се пазим активно от измамници, ако ще измамата да е за милиарди, пак си остава измама. Дори когато я рекламират по телевизията постоянно. Дори когато някой ваш познат се кълне, че му е помогнало такъв вид лечение. Това все още си остава измама. Дори когато 'експерти' обясняват по 'научен' канал на кабелната как всъщност работи този вид лечение и какви дълбоки научни тайни се крият в него - пак си е просто схема за измама, почиваща на недоказани теории, на догадки и често на обикновени, макар и добре скроени лъжи!

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

Tags:
Current Location: Bulgaria, Varna
(Leave a comment)

Jan. 30th, 2011

12:05 am - Може ли кандидат за работа да каже че ИЕ е боклук?

We shouldn't blame browsers while we are professional front-end developers.

Асене: Може би не, но определено не е необходимо и да им се радваме или да спестяваме коментарите от рода на "IE e боклук'. Защото е истина. Особено когато клиента иска свърхмодерното му, 3d SVG CSS3 transition driven приложение да работи и в ИЕ6. Извинете. Цитат и от професионални програмисти (такива, които не пишат на джаваскрипт, а на  С и се занимават с енджините за които пишем ние ):

"Говорех за браузъри. Инернет експлорър не е браузър, това е машина за визуализация на статични страници"

Tags:
(Leave a comment)

Jan. 29th, 2011

09:51 pm - Craigery Morgan TV debut

He became a YouTube sensation a few months ago, he is really cute and funny and now he is on TV! The last night episode of "$#!* my dad says" featured him as Abercrombie sales person. He is really nice looking and great facial expression for comedy too. Bellow is a capture:

Craigery Morgan in Blip my sas says

I wish him good luck with his career.

Tags:
Current Location: Bulgaria, Varna
(Leave a comment)

01:14 pm - Как не се прави сайт/услуга през уеб

За пример ще вземем 'най-популярния български сайт за запознанства' - gepime.com

Че е популярен - популярен е. Но не защото е добре направен, а защото е пълен с порнография 'на една ръка разстояние'. Това е друга тема и в случая не е от значение.

Това, което ще коментирам е, защо един сайт изглежда така сякаш е събран 'от вол и кон'.

Забележките:

Аз нямам нищо против payed premium service. Но за разлика от нашенския ултра подход - да спрем всичко (очаквам скоро да не ми даде и да се логна докато не си платя) нормалните сайтове за запознанства предлагат ЕКСТРИ когато плащаш и не спират нормалната функционалност, която преди е била безплатна. Е, това е ако можеш да измислиш какво да предложиш в повече. Ако не можеш (както е с Гепи) явно просто спираш вече безплатното и чакаш да кихат хората....

Tags: , ,
Current Location: Bulgaria,
Current Music: celine dion & peabo wilson - beauty and the beast | Powered by Last.fm
(Leave a comment)

Jan. 26th, 2011

09:59 pm - Cloud 9 beta

It was announced today - cloud9 now accepts user registration, which means one can apply and if approved can start developing applications on their servers.

Unfortunately, as mentioned earlier in this blog, my opinion is that the technology, while somewhat mature and really interesting, is not fast enough to compete with regular editor, like gEdit, which has its quirks also, but at least is not choking my laptops to death when loading several thousand lines of code. Not that I think this kind of code is manageable in one file, but still some libraries come that way and I need to be able to look in the code. If the editor cannot do it, then its no use at all.

What I really want to see added (apart from better performance, which I don't think will happen, maybe one day when I have a gazillion cores laptop and the browser can use them all...):

var object_generator = function(options){
    var that = {};
    var private_variable = false;
    var private_function = function(param){
        if (!private_variable && typeof that.whatever === 'undefined') {
            that.whatever = true;
        }
        //....
    };
    that.privileged_method = function(param){
        private_function();
        //....
    };
    that.property2 = 'string';
    return that;
};
var myObject = object_generator();
myObject.privileged_method();
This should give me information that I have Object Generator named object_generator with 1 private variable, 1 private function, 1 privileged method and 1 object property for the returned object. It should also tell me that it has one object instantiated and list the public methods and properties of that object. Well this second part actually requires execution so it would not be easy to be made for an IDE, but I believe the first part is quite doable. However, for know I do not know of an editor/IDE that can do it.

On the other hand we have the fact that one can set breakpoints and change variable values during runtime while executing node programs. This is really handy. But still, the editor need to be faster, really!

I hope they will succeed, it might change lots, for example JavaScript developers might no longer be required to go to the office everyday (dream a little dream of me).

Tags:
(Leave a comment)

Jan. 22nd, 2011

07:49 pm - Update pretifier

I have continued to play around with LiveJournal's update page.

I feel I need more space for the entry, so I shrank the metainfo related stuff in expandable (but not expanded by default) div and increased the height of the post entry frame.

The code is available at pastebin.

I have also worked a bit on the editor capabilities, now the image editing with pins on top and shadows is available as button in the toolbar and the code for the other stuff I wrote before is cleaned up.

As with many other things in life, once you get deeper into it, it becomes easy and clear.

So as of now I accept proposals for other functions to be added to the editor.

The script is also available on Usersciprts.org if you want to try it out. I have tested it only in Firefox 3.6. It might or might not work on other user script enabled browsers, depending on their implementation.

And because I love posting pictures of gorgeous guys here is one:

Harel Skaat in Barcelona

Oh and by the way - he also signs very well.

Tags:
Current Location: Bulgaria,
(Leave a comment)

Jan. 17th, 2011

03:18 pm - Update on the Editor script

I have encountered a small issue (GreaseMonkey being 'bad' and wrapping the HTMLElement, thus wrapped elements are never equal, even if they are in the DOM) and I had to use the unwrapped version (wrappedElement.wrappedJSObject).

This makes the script not that ideal, but it still works. The following two paragraphs are for testing of both warning messages and code snippets:

This is a test warning!
var a = 'Hello GreaseMonkey!';
alert(a);

Hopefully it will be useful. There are places for improvements, but I don't have the time to do it right now. The code was re-worked and shortened, also some edge cases were taken care of. It is not tested very well, still, it can be used as entry level script to develop more robust extensions. Once my hosting provider restores my account I will upload the complete userscript and link it here. A screen shot follows demoing the new buttons:
LiveJournal editor with two additional buttons

Tags:
(Leave a comment)

Jan. 15th, 2011

01:11 am - Customize LiveJournal Post composer

I have been developing advanced custom interfaces with JavaScript for some time now and while I still do not think that whole IDEs written in that language are ready for prime time, I do believe we should be able to extend the already present functionality for our fave web sites.

One easy way to do this is using 'user scripts'.

I use some custom classes in my blog in LiveJournal and there is no easy way to add divs with class names in the HTML editor. However it is fairly easy to add more buttons to the toolbar (I honestly do believe the empty space on the second row is left for users like me, who like to add more buttons!!!).

There are however some limitations when working with multiple iframes.

First of all nodes should either be created in the context of the iframe to which they will be added or created in outer context and imported. Other than that there is nothing special.

Sample code follows (assuming it is executed from 'top' context, however the function should actually be created in the context of the draft iframe to attach the event to the load event of the frame we are targeting, so have this in mind if you take the example code and intend to use it for your own custom buttons):

	var button_action = function(){
		var cDocument = document.getElementById('draft___Frame')
			.contentDocument.getElementById('xEditingArea')
			.childNodes[0].contentDocument;
		var cWindow = document.getElementById('draft___Frame')
			.contentDocument.getElementById('xEditingArea')
			.childNodes[0].contentWindow;


		var oSeclection = cWindow.getSelection();

		if (oSeclection.anchorNode !== oSeclection.focusNode ){
			var i, i1, i2, tmp;
			if (oSeclection.anchorNode === cDocument.body )
				i1 = oSeclection.anchorOffset;
			else {
				for (i=0; i< cDocument.body.childNodes.length; i++){
					if (cDocument.body.childNodes[i] ===
						 oSeclection.anchorNode){
						i1 = i;	
						break;	
					}
				}
			}
			if (oSeclection.focusNode === cDocument.body)
				i2 = oSeclection.focusOffset;
			else {
				for (i=0; i< cDocument.body.childNodes.length; i++){
					if (cDocument.body.childNodes[i] === 
						oSeclection.focusNode){
						i2 = i;		
						break;
					}
				}
			}
			if (i1 > i2) {
				i = i1;
				i1 = i2;
				i2 = i;
			}
			var docFragment = cDocument.createElement('div');
			docFragment.setAttribute('class','cod');
			for (i = i1; i <= i2; i++){
				docFragment.appendChild(cDocument.body.childNodes[i]
					.cloneNode(true));
			}
			for (i = i2; i >= i1; i--){
				cDocument.body.removeChild(cDocument.body.childNodes[i]);
			}
			i = cDocument.body.insertBefore(docFragment, cDocument.body
				.childNodes[i1]);
		}
		else {
			var i;
			for (i=0; i< cDocument.body.childNodes.length; i++){
				if (cDocument.body.childNodes[i] === oSeclection.anchorNode){
					break;	
				}
			}
			var docFragment = cDocument.createElement('div');
			docFragment.setAttribute('class','cod');
			docFragment
				.appendChild(cDocument.body.childNodes[i].cloneNode(true));
			cDocument.body.removeChild(cDocument.body.childNodes[i]);
			i = cDocument.body
				.insertBefore(docFragment, cDocument.body.childNodes[i]);
		}
	};


Notice that I do not want to separate textNodes but copy them as they are (because this is my use case). Probably the code can be shortened by applying better logic, however this is a late night quick and dirty approach and it works.

Now just add it to the new buttons you add to the draft frame and voilà!

Tags:
(Leave a comment)

Jan. 9th, 2011

10:06 pm - Harel

I know i am getting boring with all posts about Harel Skaat, but hey, this is my blog, so I will post whatever I want.

First - Words (Milim) in English with Karina Pasian. The performance is stunning!
Video link

End for a final accent - Od yair alay sung live in the studio:
Video link

Tags:
(Leave a comment)

Jan. 8th, 2011

04:37 pm - Cloud 9

I have been looking into using Cloud9 for JavaScript development. The project has just announced new release.

Installation on Linux (Fedora 13) went smooth, first one will need the latest stable Node from NodeJS project. Download and compile as usual, I have installed it with root, however it can be installed as regular user. Once this is installed I used npm (node package manager) and install cloud9. Start i with

cloud9

Unfortunately even the 'world fastest browser' (a.k.a. Chrom) could not keep up with editing. Loading a huge file (let's say mootools.js) is too slow, scrolling in it is too slow, switching between files was way way too slow and what is worse, debug stopped working at some point and I cannot figure out why, so we are back at the console.log() debugging, which is not that great, but at least you can see the log in the same time as you see the code, which is better than constantly switching contexts, however the breakpoint type of debugging is not working. Let's hoe this would be fixed in next release.

Oh, and by the way you can still run your script with
node /path/to/your/script.js

It is kind of cool, I will have to find time to play some more with this.

Tags:
(Leave a comment)

Jan. 1st, 2011

08:17 pm - A few movies.

As many of us know, the holidays can be quite lonely time. If you are also ill it makes the time passes even slower. So sooth my pain and soul I decided to give a few movies a shot. It was about time, since my 300GB hard drive is having only 20 gigs free now, everything else is pending my review.

letters to Juliet posterSo here we go. First - Letters to Juliet. A romantic ... something. I don't know, it is very slow paced, very cliche inclined and pretty much we all know what happens at the end. The beautiful scenery simply does not cut it, especially compared to the previous hit of the young lady in the leading role - Mamma mia. And by the way he really good view is coming too late (in the face of Christofer Egan).
Egan

Next - David's birthday (original title Il compleanno). Very Italian movie, no doubt. Lands it right in the middle of all other Italian movies about straight guys going south. Nothing interesting really, the only interesting character being the souse killer/brother/uncle. The young Thyago Alves is nice to look at though, however I don't really understand all the Italian/French movie makers - why does the young, hot, awesome good looking guys have to always fornicate with someone twice their age. It looks they do it just so that something dramatic can happen, like being outed or kill someone. I don't get it, why not do it with someone their own age? The scene where Davit is masturbating is really awesome, you can see him sweating in the dim light, its really good. Much better than, say, 'Broke straight boys'.

I would love to add one more, but all of theme would be just waste of your time as it was of mine. Just to protect you from doing the deed:

Enough with the bad for now.

Oh and as a bonus - you should watch the 'Steam room series' in YouTube, its like a promo series for the 'Is it just me' movie, which is really poorly made one, but the series is cool.

Tags:
(1 comment | Leave a comment)

Dec. 23rd, 2010

06:42 pm - My ninja name

My ninja name is: Nokuchikashi!

Tags:
Current Location: Bulgaria,
(Leave a comment)

Dec. 18th, 2010

05:07 pm - End of an era or how we should not favour our past on the expense of the present day

Dear Mr. Mandla,

I am happy to report that my adventurous love affair with your blog is now over.

I find it mostly waste of time for the following reasons:



I am not sure if anyone here will agree on any of this, but now I am completely sure you and your followers apprehend yourselves as some cast that knows the right path to the computing and everyone else for you is lost in the non-sense of modern computing. I was trying to follow your path of thinking and made this experiment, I have lived without normal computing environment for over a month. It slowed me down, It made me spend more time in front of the computer and it made me lag on performing very simple tasks (for example copying text from one application to another is pain in the console when the application has its own windowing, like finch of irsii or elinks!!!).

This said - now I believe you are on the wrong path, for users like you I believe the right path would be - run web applications (your own!), write them to be fast and efficient and have only web interface, very simple one, but web, and use whatever you feel like as browser to access all of them! browser environment can be effective even without images, sounds and plugins! one can also configure handlers for flash video in a regular browser ( so the video can be played by mplayer or just downloaded and so on), all images can be saved at once and on and on possibilities, that you delude users into forgetting and hang themselves in an era not 10 =12 years ago but 30! because text terminals were used 30 years ago! Just watch Crockford's first hour presentation on history of computing and you'll see what I am referring!

Tags: ,
(Leave a comment)

Dec. 15th, 2010

08:55 pm - Those were the days my friend..

Those were the days my friend..
Original lyrics (Russian):

Ехали на тройке с бубенцами,
А вдали мелькали огоньки…
Эх, когда бы мне теперь за вами,
Душу бы развеять от тоски!

Дорогой длинною
И ночью лунною,
Да с песней той,
Что вдаль летит звеня,
И с той старинною,
Да с семиструнною,
Что по ночам
Так мучила меня.

Помню наши встречи и разлуки,
Навсегда ушедшие года,
И твои серебряные руки
В тройке, улетевшей навсегда.
Дорогой длинною…

Пусть проходит молодость лихая,
Как сквозь пальцы талая вода.
Только наша тройка удалая
Будет с нами мчаться сквозь года.

Bulgarian translation:
Возехме се в тройка със звънчета,
а далеч блестяха светлинки...
Ех, да можех пак след вас да тръгна,
да избавя от скръбта душата си!

По дългия път,
през лунната нощ,
със песента, която
далеч със звън лети,
и със старинната,
със седемструнната,
която нощем
ме мъчеше така.

Помня всички срещи и разлъки,
и годините отминали далеч,
и ръцете сребърни, които
отлетяха с тройката навек.

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

The song wat translated in English in 1968 and became a huge hit:
Once upon a time there was a tavern
Where we used to raise a glass or two
Remember how we laughed away the hours
And dreamed of all the great things we would do


Those were the days my friend
We thought they'd never end
We'd sing and dance forever and a day
We'd live the life we choose
We'd fight and never lose
For we were young and sure to have our way.
La la la la...
Those were the days, oh yes those were the days


Then the busy years went rushing by us
We lost our starry notions on the way
If by chance I'd see you in the tavern
We'd smile at one another and we'd say

Those were the days my friend...

Just tonight I stood before the tavern
Nothing seemed the way it used to be
In the glass I saw a strange reflection
Was that lonely woman really me

Those were the days my friend...

Through the door there came familiar laughter
I saw your face and heard you call my name
Oh my friend we're older but no wiser
For in our hearts the dreams are still the same

Those were the days my friend...

In all languages the meaning is the same - sadness on the lost youth.
At last - an interpretation of Placido Domingo from 1994, as part of the 3 Tenors concerts. Those were the years...

Tags:
Current Music: Not playing
(Leave a comment)

Dec. 14th, 2010

09:42 pm - JavaScript engine differences

Like it is not enough that we have to deal with browser differences in styles implementation (like opacity normalization for example), with lack of DOM retrieval differences (mostly between IE and the rest) - now I have to deal with native objects method differences.

Being a fully fledged JavaScript developer for some time now I have to admit - I hate it when there are differences between execution environments. IE6 is completely out of the picture - if someone uses IE6 - screw him, he/she can browse the Internet with text browser as well! I don't care! But facing issues like difference in the implementation of String methods was something I was not prepared for:

"my.string.test".replace(".","-dot-","g");
I expected this to work across browsers, after all this is a native method on native object. However the result in Firefox is:
mi-dot-string-dot-test
but in Chrome it is:
my-dot-string.test
What the f...???

Okay, fine, I know, I can use regular expression and it will work (probably?) across browsers, but WHY do they have to be different??? Isn't it the case, when you write a C program on POSIX system you can run it on all POSIX systems. Why they cannot do it for javascript. Please! Save our souls!

Oh, and by the way the way to go with the above example would be:
"my.string.test".replace(/\./g,'-dot-');


And I am reading the book whose cover you see at the top of this entry. Definitely not for novice! Definitely! Regardless of what the author states at the beginning!

Tags:
(Leave a comment)

Dec. 12th, 2010

10:32 pm - In between (men)

I have been watching The A-list: NY and it was really disappointing, I mean who wants to watch bunch of gay guys fighting and bitching all the time, like if it was their profession or worse, their true self.

Anyway, it seems there is a better show - In between men. It is a web series format (meaning the episodes are really short, 10 minutes each) but it is also full of gorgeous men and yet - they, while scripted, seem to act more appropriate and more in sync with the real world! I suggest you take a look, it will, I bet you'll find them more pleasing than the asshats on the A-list.

Here is the link to the site where you can watch the series.

Tags: ,
(Leave a comment)

Dec. 4th, 2010

06:43 pm - All starts - Let is br

Wow! Just wow!
In the video bellow you can see everyone, I mean EVERYONE you happen to see on TV/MTV and had forgotten! Like 'Bud' from "Married, with children", Rene from "Allo, Allo", Stephen Gately from Boyzone (RIP), Kate Turner and many, many more, including Bud Spenser (my GOD he looks 100 y.o.)! I have seen so many people I recognize in this clip, it is almost impossible, like my brain has hard times remembering them all right now, but just watch it, okay?
Video Link to cover of Let It Be

Tags:
(Leave a comment)

04:19 pm - Конфигуриране на i3 за нормална работа (за хора идващи от ГНОМ среда)

В този пост ще се постарая да опиша как се конфигурират неща, като "кирилица, превключване между кирилица и латиница, специални символи, мултимедийни клавиши, яркост на монитора, време на заспиване на монитора, настройки на шрифтовете, настройки на темите" и разни други подробности, заради които много хора, макар да не ползват Гном среда, а нещо по-леко и по-бързо в крайна сметка по някакъв начин след стартиране на сесията изпълняват:

/usr/libexe/gnome-session-daemon
gnome-power-manager

Целта с горните две команди обикновено е:

Понякога това включва и "да си оправим грозните шрифтове".

Демона за настройки на Гном обаче пуска множество други неща, като монитори за закачане на преносима медия и прочее, неща, които много бързо хората се научават да правят с gvfs-mount и да достъпват в Midnight Comander. Следните стъпки е необходимо да бъдат предприети за да получим всичко онова, изброено по-горе, без да е нужно да имаме Гном.

Първо: намираме как се добавят команди към стартирания window manager.
В моя случай това е i3. Добавянето на команди, които да бъдат изпълнени при стартирането му става много лесно с включването на exec клаузи в края на конфигурационния му файл.

Втора стъпка: определяне на подходящите за нас настройки.
Тъй като тук предполагаме, че идваме от Гном среда, подходящите за нас настройки за шрифтове, теми за приложенията, осветеност на монитора, клавишни подредни и прочее са ясни. Ето как се взимат настройките на клавишите:
setxkbmap -print

Върнатия резултат е нещо такова (варира според вашите настройки в Гном):
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+inet(evdev)" };
xkb_geometry { include "pc(pc104)" };
};

От така взетите настройки се прави командата:
setxkbmap -compat "complete+ledscroll(group_lock)" -keycodes "evdev+aliases(qwerty)" -types "complete" -symbols "pc+us+bg(phonetic):2+inet(evdev)+group(lwin_toggle)+level3(menu_switch)+compose(caps)+eurosign(5)" -geometry "pc(pc104)"

Както се вижда лесно просто съм копирал настройките от горния изход и съм ги приложил към съответната опция на командата. За удобство съм изнесъл цялата команда във файл за bash интерпретатора, но това не е задължително.

Следва настройката на шрифтовете. Отваряте gnome-appearance-properties и в секцията с шрифтове разглеждате настройките. Трябват ви следните данни: дали се заглаждат шрифтовете (почти сигурно - да), дали се ползва hinting, какъв тип се ползва. Резултата записваме в ~/.Xdefaults:
Xft.antialias: 1
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.rgba: vrgb

Следват темата и шрифта за Гном/ГТК приложенията: тях всички вярвам добре знаят как да намерят в графичната среда, тъй като са от най-често променяните. След като ги намерим ги записваме във файла ~/.gtkrc-2.0:
gtk-theme-name = "Beos-r5"
gtk-font-name = "Liberation Sans 11"

Тези са моите.
Следва настройката на яркостта на монитора: необходим ви е xbacklight.
Останаха само настройката на изгасяне на монитора и мултимедийните клавиши. За клавишите ще се наложи да ползвате xev. При пускането му натиснете всички клавиши и клавишни комбинации за мултимедия, които виждате на клавиатурата си, след това го спрете. Онова, което ви трябва от цялата изписана боса са редовете с KeyPress event. В тях намираме нужните ни кодове (keycode) - обикновено 2 или 3 цифри.

Накрая е необходимо да съберем настройките и да ги добавим към командите на мениджъра на прозорци, част от тях като изпълними такива, други, като извиквани чрез клавиши (по-специално - мултимедийните клавиши).
Ето как изглеждат моите клавишни извиквания в i3:
bind 121 exec amixer set Master toggle -q
bind 122 exec amixer set Master 10%- -q
bind 123 exec amixer set Master 10%+ -q
bind 232 exec xbacklight -dec 10
bind 233 exec xbacklight -inc 10

Моят лаптоп има само клавиши за усилване, намаляване на звука и спиране/пускане на звука, плюс два клавиша за яркостта на LCD панела. Ползвам amixer за да командвам alsa, тъй като pulseaudio хаби твърде много CPU когато работи. Как да спрем pulseaudio и да накараме приложенията ни да работят с Алса е тема на друг пост.

Ето и автоматично изпълняваните команди от i3 (изпълняват се всеки път когато се стартира):
exec xsetroot -solid "#000"
exec xrdb -merge ~/.Xdefaults
exec xbacklight -set 30
exec ~/Documents/System/Applications/Bin/setkbd.sh
exec xset dpms 0 0 300

setkbd се ползва за настройка на клавиатурата, както беше описано по-горе.
Един проблем, който още не мога да разреша е как да направя подредбата да бъде запомняна за всеки прозорец, така че да не се налага да сменям постоянно подредбите, това е опция в Гном, не не намирам в Интернет как се прави без Гном. Ако някой знаеш, моля да помогне.

Tags:
(Leave a comment)

Nov. 28th, 2010

11:09 pm - Истината зад рекламата

Преди време споделих за малкия подарък от Clinique. Сториха ми се много добри, но това за съжаления трая по-малко от седмица. Много бързо кожата ми реагира негативно, зашеметяващо бързо всъщност, появи се цялостно зачервяване, сякаш съм стоял над вряща тенджера с боб. Въпреки високата си цена, продуктите не се оказаха нито по-подходящи за мен, нито по-добри. Напротив, оказаха се много по-лоши. За да съм сигурен за какво говоря направих експеримент, като всеки добър скептик, спря ги за две седмици и после пак пробвах - нада! Същото се получи, една седмица мека гладка кожа и след това - зачервявания.

Едно трябва да кажа тук, да е напълно ясно - който иска да си купи, нека си купи, не са много скъпи и са добър 'entry level' по пътя към прахосване на пари. Но не очаквайте чудеса. Тези митични истории с това как микро липидни капсули доставяли безценни вещества в дълбочината на кожата да ги разправят на баба ми! Истината е съвършено проста, я достигне нещо до подходящите места, я не, но дори и да достигне я се метаболизира правилно, я не, а дори и да се метаболизира правилно, я е достатъчно, я не. Нека изпитва тялото и кръвта ви недостиг на нещо си, па чакайте кожата да се захранва чрез кремове.

В този ред на мисли, ефективността на помадите на Clinique е почти същата като да се полеете с газирана вода.

И понеже някой някъде беше споменал и за "почистването на кожата с естествени масла" - ойдете се гръмнете, преди да се намажете с смес от зехтин и рициново масло и да се наведете над тенджерата с врящия боб. И между другото крайния ефект е същия - зачервяване на кожата, ставате като домат. Един вид - узрявате.

Та следващия, който реши да ми купи/подари/предложи крем за 100 лева на бурканче ще го изяде. Немит.

Tags:
(Leave a comment)

01:58 pm - Varna

The dancing stars at the entrance of the Sea garden in Varna, November 20th, 2010

stars at the entrance of the sea garden

Tags: ,
(Leave a comment)

Nov. 27th, 2010

11:41 am - News reading from the console

It is a bit misleading, the tag of this post I mean.

Now that I am no longer running any Gnome applications, the tag should probably be changed, but I will leave that for another time.

Recent years I have been having an affair with the console on Linux. There have been some good and some bad moments. However my wrist pain got worse, so regardless of the 'regular user' pros and cons, I have switched to console again.

Not that I don't run X. Unlike Mr. Mandla, I still want to see some web pages with their images (mostly blog entries with 20 and more images in them, viewing those one by one in links is tedious).

In this case one can use Vimperator, which is an add-on for Firefox, that makes it behave much like Vim. This is all good, but unfortunately firefox starts very slow, it is very noisy (too much output for my taste when started from the console). It is only once process, yes, started once it can be used. Yeah, but I want to view just one or two pages a day, waiting for 15 seconds just to start is not gonna cut it.

Enter 'surf'. The most minimalistic browser EVER. It uses webkit and 10 shortcuts. And that's it. And it loads really, really fast. Because there is nothing but webkit.

For images I use 'feh'. It can load the images from the Internet and locally, so it is all good. I use it to view messages from my news (will get there in a bit) and from elinks. Once elinks is configured to use MIME types and images are pointed to use feh it works really nice. How about flash video?

Enter clive. It is in the repos, so not hassle installing it. Use it with mplayer and you don't even have to switch anything regardless of the medium (i.e. X or no X). Detailed instructions are available here.

What about the news I have mentioned? Well, I was in a limbo for a while now, between google reader and newsbeuter. The thing with greader is that you get your news anywhere. The keyboard shortcuts are great, they provide both list view and page view which is great for image blogs. Sounds all good, except I miss the filter language that is available in newsbeuter. Turns out it is possible to configure newsbeuter to work with google reader! And then again, I have to keep all my things on their servers.

Don't get me wrong, I find it very pleasing especially for emails, because I get my emails on my Android phone. But my feeds.... I don't know why, maybe because I had issues before with the loss of some entries or I don't know... it is just I am not comfortable with everything being there. So I switched back to load URL source for now.

Wrote a little script to handle different type of media from the newsbeuter 'browser' command (so when I start 'open-in-browser' I am actually submitting the link to a script that decides how to handle it, feh for images, clive/mplayer for video, links for html).

The Internet can tell you how to use alpine/mutt with google main, but as mentioned I don't get that much of mail so I use my phone for it.

It seems that this is all, I get everything else from console applications, including mc, mocp, hbn, vim and a few bash scripts to handle various situations.

There is however one major exception. I use homebank to handle my finances, I have not discovered console tool to manage this. I enter my day to day expenses from cli script I wrote and once in a while I import it to homebank, but still this binds me to X.

Anyone knowing any PFM (Personal Finance Manager) for the console?

Tags:
(Leave a comment)

Nov. 26th, 2010

12:59 pm - Stoning to death

What does stoning to death means? National Post (Canada) explains it for us.

Excuse me, but who will EVER want to live in Iran? I would be ashamed to be citizen of such country!

Tags:
(Leave a comment)

Nov. 14th, 2010

05:29 pm - The oath of Spartacus

So here it is - The oath of Spartacus - fragment. I like the angle and the accent on the face of the boy.

The oath of Spartacus

Enjoy!

Tags:
(Leave a comment)

Oct. 31st, 2010

05:38 pm - My new desktop

I know I am making fun of all the guys (and probably some girls) constantly sharing their current desktops on the Internet, but hey, mine isn't bad! Not bad at all! (What you see is i3 with dzen2 (and probably me1)).

My i3 desktop

Tags:
(Leave a comment)

05:25 pm - Из старите писания

Умна жена - приказно същество, съчетаващо красота и интелект
Каляска - спортен модел каруца, две врати, две седалки, до 8 конски сили

Tags:
(1 comment | Leave a comment)

12:24 pm - I am gonna be fantastic

Is this how straight guys say 'fantastic'?

I love it!

Tags:
(Leave a comment)

11:11 am - On the matter of Holly War Against Homos

The everlasting dilema on should we proceed with abortion should we know for sure the embrio would turn out to be homosexual - I aways enjoy the debate and often encourage the priests to go into it, it's kind of funny and stupid at the same time. Here we get it on a new level:

May the embryo you save be gay and proud

And while we are at the Church vs. the Homos here is another one:
God hates figs

Tags:
(Leave a comment)

Oct. 30th, 2010

11:46 pm - Quiet

Brian Justin Crum - Quiet (at Joe's pub - Broadway Impact, 2010)


Kyle Dean Massey - What kind of fool am I (at Joe's pub - Broadway Impact, 2010)


Brian Justin Crum & Kyle Dean Massey - Who will love me as I am (at Joe's pub - Broadway Impact, 2010)


And this is what it's all about


(plus you get to see Kyle Dean's chest hair)

Tags:
(Leave a comment)

Oct. 24th, 2010

02:16 pm - Още един си призна

Харел Скат си призна. Сякаш никой не се досещаше де...

Понеже отдавна 'се знаем' с него, ми беше странна цялата тази тайнственост около личния му живот. Например конкурента му в предаването, с което проби в Израел (пак със същото малко име - Харел Мойал), не съм забелязал да се крие много, като беше в България, чак му се появи снимката по едни 'специфични' сайтове. От друга страна, явно Скат искаше да стане много, ама много известен, преди да се раздуха цялата история.

Харел Скат в Кочав Нолад
Harel Skaat in Kochav Nolad

И все пак, като загледам клипа от прослушването му за Kochav nolad и се питам: кого можеше да заблуди? В момента не мога да намеря клипа в YouTube, но можеше да го дръпнете от тук.

Нищо де, да е жив и здрав, пожелавам му да го намери този "бой-френд", дето като се появял и какво щяло да стане. Последните години е наедрял доста, съзрял, време му е да се задоми.

За финал може да погледате последната му песен:

Tags:
(Leave a comment)

Oct. 5th, 2010

01:20 pm - Christianity explained

What is Christianity

Стой, върни се, скитнико незнаен....

Tags:
(Leave a comment)

Oct. 1st, 2010

03:04 pm - Linux desktop has saved the cub seal

Baby seal saved by us, Linux usersYears ago I have posted about the findings of UK government study related to e-waste indicating that using Linux operating system can prolong the useful life of the computer equipment.

Those years ago I have not owned a computer for long enough to be able to confirm it. But now I have. My own laptop is 7 years and 10 months old now. Apart from the faulty hard drive (which was gone on the second year) the laptop is still running, the software has been updated many many times but the operability is still there.

My dad is now using it with basic Fedora 12 install (plus skype and video codecs). No significant impairment of usability is observed. I use the same hardware on my work laptop for the last 5 years and I can assure you it is capable of doing almost anything you can think of, except playing really large video files. And then again most computers can't do it.

So yes, the seal cub was saved. Partially by me, I like to think so!

Tags: ,
(Leave a comment)

02:26 pm - Няколко снимки от миналия месец

Няколко снимки от миналият месец не намерих ред и място да бъдат публикувани на време. Днес назря момента.

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

Изплашено коте

Втората снимка е направена пак през миналата седмица, пак с телефона. Този ъгъл на падане на слънчевата светлина става все по-късен и по-късен... усещам как ми става все по-студено и по-студено:
Късно утро


Стига толкова снимка. Друг път - пак.

Между другото нещо много неприятно забелязвам, питон скрипта, който бях написал за попълване на картинките в постовете не работи така добре вече, от как преминах на новата версия на GTK/Гном и Питон, питам се къде ли се чупи. Като цяло си беше глупава идея, да ползвам графичен инструмент, просто исках да е универсален (тоест да може да се ползва от всеки) и в стремежа си към това пропуснах факта, че GTK както и bindings към GTK от питон еволюират доста стремглаво точно в момента и има голяма вероятност всичко изведнъж да спре да работи. Тези дни вероятно ще се наложи да пренапиша инструмента с друг, отлежал и доказал себе си похват.

Tags: ,
(Leave a comment)

12:05 am - Livejournal integration with Vim 7.x

I have played aroun with PyLjVim script to tune it for better intergation with my workflow.

Here are the changes I have introduced to make it easier to work with:


File listing (all files can be downloaded - see link at the end of the post):
~/.vim/ftdetect/livejournal.vim
au BufRead,BufNewFile *.lj nested source ~/.vim/macros/pyljpost.vim

~/.vim/after/lj.vim

let b:closetag_html_style=1
let b:unaryTagsStack="br"
source ~/.vim/plugin/closetag.vim
LJTemplate


It is now much easier and more convenient to post to LiveJournal from withing Vim than it was originally designed by its author, I dare say. All related files can be found on the usual place.

Tags:
(2 comments | Leave a comment)

Sep. 30th, 2010

09:42 pm - Най-нежното удоволствие!

Най-нежното удоволствие

Tags:
(Leave a comment)

Sep. 29th, 2010

08:21 pm - Buxfer is DOWN!

sad face

We should not count on web services for essential needs!

Tags:
(Leave a comment)

Sep. 25th, 2010

08:55 am - Outsourced

In the sea of old and new series bombarding the silver screen, if you are like me, each season you are desperately looking for a drop of fresh idea, a nice to watch, interesting enough but not in obsessive ways, new series to watch.

Just like Drop dead diva it is funny, easy to watch, the episodes does not seem to be strongly connected, so you are not in anxiety to watch the next one (like with Glee), and yet interesting enough to force us to enjoy it.

Outsourced

I present you "Outsourced". I have not seen the movie, so it is a fresh idea for me. And it involves Indian food which is yummy enough for me also.

Among the other starters this year, I could mention the following (already seen thus far):


There are some more (not new, but watchable): Supernatural (Come on! they should quit already! How many times one can go to hell?!), Glee (no, its not gay, just the music is coming from a drag queen's iPod music collection), Desperate housewives (Ok this is gay, but hey, they have Wanessa Williams now, how can one resist?!), House (the weakest season premier EVER!!! Loosers...). Hum, I guess that's it. I might be missing something.

What will be missed: Eurika (of course), Hevan (not so much, actually not at all), Warehouse 13 (I know it is childish and completely ridicule most of the time, but if you have nothing better to do...), Unnatural history (3 young, pretty attractive, nicely cleaned, cute people, 2 boys and a girl, save the day, each Wednesday, what is ti not to like?!).

The rest is a mix of &#!? of course, but can help the work hours pass, especially if you work in a mall where no one ever do his shopping in your department. Like "Life unexpected" or "Melissa and joey". Or even "Mike and Molly". No, seriously, who wants to watch about the development of the romantic relationship between two obese middle aged dick heads? Uhm... not a gay man anyway!

Tags:
(Leave a comment)

Sep. 24th, 2010

08:04 pm - The commitment (by Dan Savage)

Okay, I confess, I am a fan. Not that I read his column regularly (and not that I can, since I don't buy subscriptions for news papers). But I have watched his QAs on youtube and I can tell he is a funny guy. And nice to look at. For a gay man on my age this is almost as he's Apollo himself.

Dan Savage - The commitment

From the first page of the book one can sense his witty humor and I can tell you, I laugh a lot with it. If you are looking for something funny and light to read before sleep (or to finally start using your iPhone/iPad/Android device for something more than games (because come on! confess it finally, you are using it for games and stupid apps anyway, don't tell me you regularly use the map to find your way to the coffee shop or to track your hikes or to research important information on the go, you, just like everybody else are mostly playing games and update constantly your freaking facebook status with occasional mindless tweets)) I would strongly recommend it. I am actually surprised to read the following in chapter one:
We realized relatively quickly that the only time we remembered why we liked each other well enough to want to have kids together in the first place is when we were alone together. (you may need to read the last sentence twice)

Okay, honestly, Dan, is this an insult to your readers? Or is the average literacy of gay men (as I suspect the book will be bought mostly by gay men) in the United States that low to incline you to suggest re-reading your 20 something word sentences twice just to make sure they understand it? I hope you did not mean that.
Anyway the book is funny and, at least from where I stand, a good read. Unfortunately (mostly for you and for your publisher) I am not buying it any time soon.
But as I said it is a good read, so, dear reader, if you have spare 4 dollars - go for it. As Terry Pratchet is more expensive. Kidding, really, the book is good! I promise!

Tags:
(Leave a comment)

Navigate: (Previous 50 Entries)