Archive for the ‘blog’ Category:

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 :

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

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:…

Color palette, color inspiration tools

Some usefull tools: – online database of colors,pallets and gradients – Gets color pallets of your photos – 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, 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

Sublime 2 – quick configuration for WebDevelopment.

This post has ‘quick’ in the title, so lets go straight to the point. Download Sublime 2 from here Install Package Control – press CTRL+` and type:

Install additional Sublime packages – press CTRL+Shift+P and type Install Package and install following: Emmet – for rapid creation of html i css DocBlockr – for quickRead More

jQuery Plugins that make Your life much easier

Będę starał się na bieżąco uzupełniać przydatne biblioteki. Avgrund Modal. Biblioteka oferująca wyświetlanie okien modalnych i popup w sposób dający wrażenie głębi pomiędzy stroną, a naszym oknem modalnym. Biblioteka zajmuje ok. 2KB, wymaga jQuery 1.6 oraz wspiera starsze przeglądarki. Demo & download. TextExt Bardzo zaawansowana biblioteka usprawniająca tworzenie pól formularzy z autocomplete i filtrowaniem zaRead More