Magento – manually close order


Sometimes there is no other way of completing an order than through SQL:

Instead of canceling an order You could delete it:

Git tricks


1. Backup an entire repository to one file using git bundle:

2. Backup an entire local repository (with cache etc.) using rsync

2. Automatically clean the repository of unneccesary files using git gc

MySQL manage users


1. Removing users from the database.

2. Creating users – 3 common ways: A) The default way:

B) As an insert statements:

C) Batch adding users. Create a file (useradd.sql for example) which contains all create users statements :

and then execute the script:

2.1 Adding specific grants for usersRead More

Converting pdf files under Linux.


1. Convert pdf file to image – PNG

2. Convert pdf file to image – JPG

2a. Convert a directory of pdf files to images:

3. Convert pdf file to a html page

4. Extract images from a pdf file using pdfimages

ntpd – don’t run late…


NTPD is a daemon that is using the NTP (Network Time Protocol) to synchronize you local watch with servers. NTPD is not changing the time after the synchronization. It calculates the difference (offset) between remote timer and the local one and after that adjusts the timer several times to minimize the offset. Install ntpd onRead More

Magento – Extending Core Classess for Models, Blocks & Helpers – cheatsheet


General Rules for rewriting Classes in Magento 1.7 (1.8):

1. Example – Rewriting Model Class for the class Mage_Core_Model_Session: The path to the model : /app/code/core/Mage/Core/Models/Session.php

2. Example – Rewriting the class Mage_Sales_Block_Order_Totals The path to the block class : /app/code/core/Mage/Sales/Block/Totals.php

CentOs shortcuts trick and more…


CentOS Linux

Synchronize time and date

Configure network on CentOS Go and edit /etc/sysconfig/network-scripts/ifcfg-IFACENAME. You can check Yours iface name by ifconfig -a. Example configuration for static IP address:

Update Yum & install some tools

Save and restore iptables state

Harden kernel security

Add epel repo Usefull if you want to installRead More

Joomla 2.5.* – Can’t Login to backend


If you can’t login to Administration Panel of a Joomla 2.5.* site, try setting above in You configuration.php :

Quick fix for the directories permissions:

Sublime Text 3 – CheatSheet & Plugins for Web develpment.


First point of the program is installing the Sublime Text Editory itself. If you are using Sabayon or Gentoo, the is an overlay sublime-text, so You can emerge it. Installing Sublime Text 3 on Gentoo / Sabayon

Installing helpfull plugins for Sublime Text 3 First of all install “Package Control” an utility that wouldRead More

Online Markdown Editor


User friendly and simple to use Markdown editor can be found here : http://benweet.github.io/stackedit/.

Colour for GIT output


If You want to enable color output for git try :

Joomla 2.5 – template overrides not working for menu items


If you encounter problems with this Joomla bug #29482 there is a simple workaround.

Changing default shell without admin rights.


The simplest solution is to run chsh. Example:

The command above will not work (chsh: /path/to/shell/binary: non-standard shell) if the shell You are trying to set is NOT listed in /etc/shells There are other ways of setting the default shell, more can be found here If you want to check which shell are YouRead More

WordPress template tags reference


http://www.dbswebsite.com/wp-content/themes/dbs_bp/wordpress-reference/V3/tag.php

Comparision of software licences (tldr)


The whole list can be found here.

Vim – polski podręcznik użytkownika


Doskonały podręcznik Vim, po polsku można znaleźć tu: http://nox.org.pl/doku.php?…

Color palette, color inspiration tools


Some usefull tools: http://colrd.com/image-dna/23869/ – online database of colors,pallets and gradients http://www.colorexplorer.com/default.aspx – Gets color pallets of your photos http://labs.tineye.com/multicolr/ – finds flickr photos based on color.

Instal NPM (Node Packaged Modules) on Gentoo / Sabayon


As root run:

Some usefull packages for less development:

CSS3 magic – using ellipsis


No more counting chars, just use some CSS3 magic:

The property text-overflow is now supported by all major browsers.

TwitterBootstrap – add extra space to child elements of .container


According to this bug request there is no way of adding some padding to .container without breaking to responsiveness of the fluid layout. Current workaround: – inside .container use always .row-fluid and put all elements in it – change the css to:

Joomla using sortable table (grid) with Mootools disabled.


If you have Mootools disabled on Joomla frontend and you want to use a grid like the one described in docs.joomla.org/Adding_sortable_columns_to_a_table_in_a_component, all you have to do is replace the JavaScript function tableOrdering() with your own implementation. An example using jQuery below:

Convert ext2 or ext3 filesystems to ext4


A quite good guide can be found at http://www.ghacks.net/2010/08/11/convert-ext23-to-ext4/