Agave Storm

Best way to use jQuery "this" in typescript lambdas

just use instead

   param = jQuery("data-my-param");

Nice and clean.

[RESOLVED] Fedora 21 VirtualBox

Yet another dependency problem, no proper kmod.. but you can install akmod-VirtualBox

yum install akmod-VirtualBox

and VirtualBox will be installed as a dependency

[RESOLVED] Fedora 21 wifi not working

Ok, here is the solution what works for me, finally

yum install akmod-wl
yum install kernel-devel
modprobe wl

kmod-wl has broken dependencies (always point to wrong kernel) and for some reason akmod-wl does not work with regular kernel, only with kernel-devel.

I was in love with old fedora, but the newest one disappoints me.. think I’ll switch to CentOS or Arch after some investigations.


This is a nice KineticJS we are taking over!

As it’s said on KineticJS officeial website:

KineticJS is a fast, robust, HTML5 Canvas Library that is no longer maintained. The last stable version is v5.1.0

That’s a pity.. we have a few projects written with KineticJS, and I think other people too. This projects need to keep going.

The worst is that documentation is not available from official website any more. So we made this web resource for you and for our devs.

I’m trying to find out what happened with old KineticJS. If it’s completely abandoned, i’ll make a fork on github, so project will keep going.

(Station V3 – by Tom Truszkowski )

Svn and Git can't be compared.

This systems have different purpose and can’t replace each other.

Over last, well, years? yep years.. i hear “Svn is outdated let’s migrate to new modern Git!”. It is true, that both Git and Svn are source code visioning systems. And you might hear, that git is distributed sytem and svn is client-server system. But, most people do not understand the difference.

Most people think of distributed systems like about client-server systems with a few more features. This is wrong!

Distributed systems have their own limitations. So you need to choose. Basically, you can follow this rules:

  1. If your company work on the only one huge single project. And you need to distribute this work between your company departments/branches/partners – use Git. The obvious example is Linux. You need to consolidate thousands of people to create one single product. Git is excellent for it. Or choose another distributed version control system. There are many.
  2. If you have more than ONE project – NEVER choose Git (nor other distributed system).

Here are limitations of distributed version control systems:

  1. No subprojects. Git can work in reverse way – you can setup one megaproject what will consist of regular projects. But each project will require it’s own repository. In other words – there is no way to checkout subfolder.
  2. No centralized access rules for different projects. The same reason – each project should have it’s own repository.
  3. To overcome point 2(but not 1) you might want to use web service like github and this will turn things from bad to worse – you got a “choice” now:
    1. Pay to github (or bitbucket or wahtever)
    2. Hire someone to keep an eye on your own system like DarcsDen or Gitlab (bitbucket looks cheaper..)
    3. Allow everyone to have read access to your code… well github can be used to PROMOTE your opensource product, once you have one, but not to DEVELOP even opensource product.

If you start new task every 2 weeks (like if you create websites, or small games like we do) you will need to setup new git remote every 2 weeks. Svn can be configured once and for all.

Wordpress is not enought

Ok, WordPress is the best CMS on the market right now. It is opensource, there are tons of plugins, you can change default behaviour using hooks and they are moving to be more Object Oriented and in most cases you do not need to touch database manually and stuff.

But there are limitations :(

  1. Permalinks. SEF urls are acceptable, but link structure depend on data structure. This is bad for programmers, because our clients always want to change their mind at the last moment. SEF urls should be treated as public content.
  2. Security problem – wordpress (and most of it competitors) store some data in filesystem. It can be configured to be safe, theoretically. But in real life some idiot will change permissions to 777 for entire website. Sooner or later. Everything related to data should be stored in database. This is why people call it DATAbase. Yes it can be done. Even for huge files like movies.
    If you will store all the data in database – you will be able to use BENEFITS of databases. Like replications, triggers, rollbacks, and other.
  3. Sorting. Sorting is really bad in wordpress. If you have data types linked with each other, it become real pain. To be honest – it can be done, but it require too much time to implement.
  4. Search. WordPress search is really disappointing. As you know, WordPress work on top of MySql. SQL (any SQL) – it excellent search engine. SQL stands for SEARCH query language. You should not allow users to write sql requests themselves, sure. Theme developers should not write sql requests too (so old themes will keep working after changing database structure by core developers). But search should be way more flexible out of the box.
  5. User management. Let’s face it – worpress is for bloggers. Or news-makers. Nobody else can use worpress in multi user mode. So theme developer should recreate: user registration, user profile page, user login, user permissions, and so on. Why? Because registered users tasks are mixed with site maintainer tasks.

So we gonna create new CMS/CMF wich will be suitable for:

  1. Enterprise web applications.
  2. Game development.
  3. Social networks development.
  4. Regular websites as always.

If you or your company want to get involved – feel free to call me directly via skype: yoreck_o

Behold: Code Hightlight for Vanilla

Code Hightlight for Vanilla Forum ⇒


How to draw triangle using CSS only

Idea is simple:

  1. Create 0×0 size div
  2. Set huge borders where you need, using different colors

Basic example:

width: 0;
height: 0;
border: 50px gray solid;
border-left-color: aqua;
border-top-color: lime;
border-right-color: coral;

the triangle:

width: 0;
height: 0;
border: 50px transparent solid;
border-left-color: aqua;
border-right: none;

the flag:

width: 0;
height: 0;
border: 50px coral solid;
border-right-color: transparent;

triangle pointed to top-right corner

width: 0;
height: 0;
border: 50px transparent solid;
border-top-color: lime;
border-right-color: lime;

Use border size to adjust shape

width: 0;
height: 0;
border: 50px transparent solid;
border-left: 100px aqua solid;
border-right: none;

How to detect Ajax request


&& $_SERVER['HTTP_X_REQUESTED_WITH'] === ‘XMLHttpRequest’){

/* this is ajax*/


Pingback DDOS attack and how to deal with it

As you might know, our website falls into “Database connection fails” error a few days ago. The reason was – xmlrpc pingback attack.

I’ll start with attack algorithm. If you are in a hurry – scroll down for tips how to solve the problem.

The core of the problem is this:


In other words – any website that support Pingback 1.0 AS IT USED TO BE can be used as a relay! For example – any website build with wordpress.

The attacker just search for websites of that kind and make them to send requests to the victim. Either you are the victim or you are part of “botnet” you got tons of traffic and it can cause deny of service.

What to do:

1. Disable method. If you use worpress – install this plugin   but it will help only if the attacker is smart enough to stop bombarding you with requests.

2.Do you really need xmlrpc? if not and/or if you have lots of websites on the same ip you can use this rule in httpd.conf (or .htaccess)

<Files “xmlrpc.php”>
Require all denied

Ok it will help if you are a part of “botnet”, but not if you are a victim. But there is ultimate solution to stop DDOS

3. Install mod_evasive. This is extension for Apache Httpd. Mod_evasive analyse activity of the users and block those who send too much requests per second. After a few seconds they are unblocked, because lots of people can use the same ip. As a result,  anyone can access your website anyway, buy evil ips got lower priority. This mod has various options, but defaults works pretty cool.