kusabi

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. 
kanji

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'.
kusabi

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!
X

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.
X

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
  • Current Music
    Mylene Farmer - California
  • Tags
kusabi

Whales sounds

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

Deepak Chopra asnwers a question

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

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


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

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.