Denis Barushev
Firebug Console Object and API
Firebug adds a global variable named “console” to all web pages loaded in Firefox. This object contains many methods that allow you to write to the Firebug console to expose information that is flowing through your scripts.
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);
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;
}
Using Kompare for Git Diffs
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.
Truncating a File to Zero Bytes
> log/development.log
Removing a Remote git Branch
git push origin :branch_name
