Denis Barushev

Email: barushev@gmail.com
Calling preventDefault during any stage of event flow cancels the event, meaning that any default action normally taken by the implementation as a result of the event will not occur. Gecko DOM Reference
If child is a reference to an existing node in the document, appendChild moves it from its current position to the new position (i.e. there is no requirement to remove the node from its parent node before appending it to some other node). Gecko DOM Reference

A Simple jQuery Plugin Skeleton

(function ($) {
    $.fn.pluginName = function (settings) {
        settings = $.extend({
            param: 'value'
        }, settings);

        return this.each(
            function () {
                var $this = $(this);
                // plugin code here
            }
        );
    };
})(jQuery);

http://gist.github.com/12656

CSS min-height Fast Hack

This hack which is a pure CSS solution will get a min-height working for IE6. MSIE 7.0 supports CSS min-height.

selector {
    min-height: 500px;
    height: auto !important;
    height: 500px;
}

Min-Height Fast Hack

Using Kompare for Git Diffs

git-kompare

It’s possible to use kompare as a graphical diff viewer for git. I created file git-kompare in my /usr/local/bin/ directory with such content:

git diff $* | kompare -

I also created alias gk for this command in my ~.bashrc:

alias gk='git-kompare'

Now I can use gk command instead of git diff with all its options.

Bash Script That Deletes Itself

suicide.sh

#!/bin/rm

Truncating a File to Zero Bytes

> log/development.log

Removing a Remote git Branch

git push origin :branch_name