#kvm #libvirt #win10 #win8

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 QXL as the video card – install drivers from: http://people.redhat.com/~vrozenfe/qxlwddm/qxlwddm-0.6.zip More info: https://bugzilla.redhat.com/show_bug.cgi?id=895356 http://en.wikipedia.org/wiki/Windows_Display_Driver_Model http://en.wikipedia.org/wiki/SPICE_(protocol)

#magento #sql

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… Get `atributte_id` for meta data: SELECT attribute_id,attribute_code FROM `eav_attribute` WHERE `attribute_code` LIKE '%meta%' The result should be similiar to: +--------------+------------------+--------------+| attribute_id | attribute_code | backend_type |+--------------+------------------+--------------+| 40 | meta_title | varchar || 41 | meta_keywords | text || 42 | meta_description | text || 76 | meta_title | varchar || 77 | meta_keyword | text || 78 | meta_description | varchar |+--------------+------------------+--------------+ We’ll use the attribute_id in the next query. ...

#beshell #gentoo #sabayon

BeShell (Be::shell) on Gentoo / Sabayon

How to intall: Currently BeShell is not avalaible in portage. More info could be found here: https://bugs.gentoo.org/show_bug.cgi?id=426946 mkdir -p /usr/portage/beshell cd /usr/portage/beshell wget https://bugs.gentoo.org/show_bug.cgi?id=426946 -o beshell-9999.ebuild ebuild beshell-9999.ebuild manifest echo "=x11-wm/beshell-9999 **" /etc/portage/package.keywords/package.keywords # or if on Sabayon #echo "=x11-wm/beshell-9999 **" /etc/portage/package.keywords/00-sabayon.package.keywords emerge -av beshell

#htaccess #apache #httpd

.htaccess – most common tasks

Redirect to non-www: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] Disable APC: php_flag apc.cache_by_default Off Compress certain types of files: AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript Set expire date for certain types of files: ExpiresActive On ExpiresDefault "access plus 1 day" ExpiresByType text/html "modification plus 1 hour" ExpiresByType text/css "access plus 21 days" ExpiresByType application/javascript "access plus 31 days" ExpiresByType image/gif "access plus 8 days" ExpiresByType image/jpeg "access plus 8 days" ExpiresByType image/png "access plus 8 days" ExpiresByType image/x-icon "access plus 31 days" 5. ...

#git

Git tricks

Backup an entire repository to one file using git bundle: git bundle create BACKUPFILE.git --all --tags --remotes Backup an entire local repository (with cache etc.) using rsync rsync -hxPavilyzH --stats --delete .git/ USER@HOST:/PATH/TO/BACKUP.git/ Automatically clean the repository of unneccesary files using git gc > du -chs .git 17M .git 17M total > git gc Counting objects: 12937, done. Compressing objects: 100% (7859/7859), done. Writing objects: 100% (12937/12937), done. ...

#administration #mysql

MySQL manage users

1. Removing users from the database. DROP USER 'USERNAME'@'HOSTNAME'; 2. Creating users – 3 common ways: A) The default way: CREATE USER 'USERNAME'@'HOSTNAME' IDENTIFIED BY 'USERPASSWORD'; B) As an insert statements: INSERT INTO `mysql`.`user` (Host,User,Password) VALUES('localhost','dummy',''); FLUSH PRIVILEGES; #it is neccessary, when creating users this way C) Batch adding users. Create a file (useradd.sql for example) which contains all create users statements : CREATE USER 'USERNAME'@'HOSTNAME' IDENTIFIED BY 'USERPASSWORD'; GRANT SELECT ON `DATABASE`. ...