Archive for the ‘blog’ Category:

Image optimization using ImageMagick

You can find a detailed article : Sample script to search a directory and only downsize pictures larger than 4k:

SQL query to display database size in MB

Display Mysql database size in MB Query

Sabayon / Gentoo – list of all installed packages

In order to get the list of installed packages in Your favorite linux distribution use equery or eix . eix Eix – get list of packages

Install packages exported by eix:


Installing Mega Sync client on Sabayon

Luckily someone alredy written an ebuild….

Sabayon – nvidia-drivers with old radeon

If You have an older nvidia graphics card you may run into problems trying to install/use Sabayon linux. For example :

If you get an error during Sabayon live CD install, try to boot with nvidia kernel module disabled. Edit the kernel parameters at the boot menu, adding:

The newest binary nvidia driversRead More

Magento special price SQL

Get sepcial prices:

Update special prices

Some of polish SEO webpage catalogs

SSH – new set of ciphers

In the newest versions of sshd the default available ciphers changed. If You are generating a lot of transfer through ssh You’ll probably want to speed id up by using a less resource consuming cipher.

The fastest ciphers like blowfish or arcfour aren’t enabled by default now. You have to add them to theRead More

Finding corrupted images using command line

If you want to find corrupted files using command line. 1. FEH:

2. jpeginfo

3. exiftool

Add a drive to raid1

First get information about the raid array:

The get information about the drive you’re going to add

If there are any partitions, delete them and create a one new primary partition with type fd – Auto RAID Add the prepared drive to the array:

And expand it:

Seat comfortable and watchRead More

Replace all occurences of string in a directory (filenames too)

In order to replace FOO with BAR inside files within directory DIR

Replace occurences in filenames:

Graphics Drivers for Win 8 guest on KVM

In the windows 8, the support for the XDDM (old windows display driver format) was removed. The format was replaced by WDDM and the “official” drivers won’t probably install. In order to have a higher resolutions than 1024×768 on Windows 8 (or windows 10) guest: – set the scrreen type to SPICE – set QXLRead More

Install Vivaldi browser on Gentoo / Sabayon

UPDATE 08/4/2015 Vivaldi is avalaible in portage, so all You have to do:

Magento change product meta data by SQL Queries

Editing contents of meta data for a big product base, can be very time consuming. But You can always use SQL… 1. Get atributte_id for meta data:

The result should be similiar to:

We’ll use the attribute_id in the next query. The backend_type determines in which table the data is kept. For exampleRead More

Securing a ssh server

speed test in bash

Measure the internet connection speed from the command line performing a speed test with the python client.

BeShell (Be::shell) on Gentoo / Sabayon

1. How to intall: Currently BeShell is not avalaible in portage. More info could be found here:

Opera 26 install on Gentoo/Sabayon

1. Download the .deb file from here: 2. Copy it to .distfiles

3. Create an ebuild in /usr/local/portage/www-client/opera-developer/opera-developer_26.0.1632.0.ebuild

4. Prepare manifest

5. Install

6. Postinstall

.htaccess – most common tasks

Redirect to non-www:

Disable APC:

Compress certain types of files:

Set expire date for certain types of files:

Install Opera 24/25 on Gentoo or Sabayon

A month ago Opera for Linux 24 was released. Unfortunately it was released only as a 64 bit deb package. Thats not a problem because an ebuild was already written (details: bug#514696). On Sabayon: Add PORTDIR_OVERLAY=”${PORTDIR_OVERLAY} /usr/local/portage/” to /etc/make.conf

Based on: HOWTO: Example of Installing 3rd Party Ebuilds HOWTO: Safely mix Entropy and PortageRead More

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