Virtualbox and Linux Mint high CPU

I use VirtualBox a lot. Mostly on Windows 10 host and Linux Mint guest (Ubuntu, Linux Mint 18). And it was always horribly slow no matter what cpu/memory/video acceleration settings I used. If using without “3d hardware acceleration” it was just generally slow but using the hardware acceleration was sometimes glitchy and most of the time very high CPU usage reported in htop. Today I finally found a solution – install MATE desktop interface in the linux virtual machine! Turns out Cinnamon interface that comes default with Linux Mint heavily depends on graphics acceleration and Virtualbox just cant do that even with the Guest Additions Iso. Mate desktop interface uses only CPU and in a very efficient way – finally the Virtualbox virtual machine feels like real OS and is real fast, CPU usage went from 10-80% to 0-1% idling.
To switch Linux Mint from Cinnamon to Mate:
1. open terminal, type “sudp apt-get install mate-desktop”
2. log out of cinnamon
3. on login screen click the upper right corner of login box and choose Mate
4. log in and enjoy!

change ubuntu linux mint from cinnamon to mate
change ubuntu linux mint from cinnamon to mate

Blackhat tactics 101: spoofing referrer for audits

Here’s a little tactic to spoof browser referrer in case you need to skip audits for gateway pages and show them coming from different URL ( It is based on good old iframes and the referrer trail. When you click on affiliate links the browser sends referrer from the url the page is hosted. If it is within iframe, the referrer is of the iframe domain. And for the iframe – it gets referrer header from the top site. There is no pass-through. Lets break it down:

You own 2 sites: – you have keywords, ads, whatever, that was available to users and google, etc, and you really don’t want affiliate provider see this link in stats. – some site with different unrelated real content that is ok to show up in audits

1. On add iframe, position:absolute; width: 100%; height: 100% (or whatever 2000px), iframe source href is “”, just add at the end of page
2. On (if its php) add in the very beginning of index.php:

$spoofsite = false;
$spoofurl1 = '';
$spoofurl2 = '';
if ( $_SERVER['HTTP_REFERER'] == $spoofurl1) $spoofsite = true;
if ( $_SERVER['REDIRECT_SCRIPT_URI'] == $spoofurl1) $spoofsite = true;
if ( $_SERVER['HTTP_REFERER'] == $spoofurl2) $spoofsite = true;
if ( $_SERVER['REDIRECT_SCRIPT_URI'] == $spoofurl2) $spoofsite = true;
if ($spoofsite == true) {

3. on add your “spoofsite.html” that contains whatever you have on or whatever you want to display with the affiliate links.

So if you simply go to it will show its own original content as the php check for referrer header returns false. But if you include in an iframe from, it gets referrer header of “” and if matched adds the included html file and exits() php.

1. google might find the iframe and cut your adsense (if you’re using) or cut search traffic for showing floating iframe. You could somewhat delay detection with hiding the iframe code with JS: eval(base64decode(ENCODED_JAVASCRIPT_DOCUMENT_WRITE_IFRAME))
2. users coming to might notice the iframe pop up and cover the page. if its same content and page is fast loading im fine with that.

Background. Some of money I generate online is in ways that some would question and label unfair. But I don’t spam or do any harm to anyone, actually I do a lot of favor. The real reason for developing this “hack” is that some affiliate sites and shops add rules to terms of service about trademarks and copyrights and restrict using their brand name in search engine marketing. In the end I still bring them customers and I get paid when they get paid. They just wanna cut my earnings, like a health insurance company that denies broken arm expenses because patient smokes cigarettes.

Install Windows XP/Vista/7 from USB memory stick

Today I got myself a new desktop PC. Since I had a lot of hard drives and a few CD/DVD roms, I ordered a PC setup with smallest HDD available and skipped DVD/RW drive. Once I got the PC I found out the Gigabyte motherboard had no IDE ports. So I searched for alternate installation methods of Windows. I had tried installing from uSB flash drive before but didn’t succeed, the methods were too complicated and with lots of issues. Today I found a nice utility – Novicorp WinToFlash – and it works like a charm!
Dowload here:
Install WinToFlash, select folder or CD drive where your windows installation files are and create thumb drive with a few clicks. Plug your USB drive in the destination PC, choose “Text mode” on first attempt, install, then choose “GUI mode / continue setup / 1st start” on two next boots. Done!

UPDATE: It’s been a few years and I’ve found even easier tool – Rufus. It comes in portable package as well (just download and run) and while i had no success with another software to install live cd on micro-sd card (inside usb sd adapter), Rufus installed linux (Mint and kubuntu) fast and easy!

Google Chrome proxy password change

Just had a very irritating problem at work. Since I changed my corporate windows network password (it’s a must on regular basis) I need to use the new password for web browser proxy servers. AFAIK the Google Chrome browser was asking for credentials when I installed it. I probably checked “save password” because it never shows up again. Now after changing my windows password Google Chrome wouldnt work – it just shows “This webpage is not available.” for every page or tab. I tried disabling/enabling proxy, used “chrome://net-internals/#tests” to check whats wrong and in the EVENTS section i found that PROXY_AUTH was returning “Access Denied” so I knew it was the new password that didn’t work. After long trial&error tinkering and googling, this is what worked for me:
1. for the Google Chrome shortcut Right-Click (in Windows) and click Properties.
2. Find the Target section (it should end with” )
3. append to Target: “–proxy-server=PROXY-SERVER-IP:PORT”
4. it should end like this: \Google\Chrome\Application\chrome.exe” “–proxy-server=” (example ip)
Thats it! Worked for me, it even didn’t ask for the new password!

P.S. My blog had some malware in the wordpress installation so it was blocked for some time.

Wrong monthly balance in Google Adsense

Currently a lot of users are confused – Google Adsense monthly balance shows more money than you receive in next month`s payment. When payment is issued you probably wonder “ok, maybe the rest of the money will be paid some time later”. But it won`t happen. You might see something like this:

Balance at end of April €223.74
May 24 Payment issued (€98.10)

There is a problem in Google Adsense payments page and they`re trying to fix it. The montly balance is shown incorrectly. To show correct values – go to payments page and change the “view: Last 3 months” dropdown to “View: All time“. Now you should see tha real monthly balance at the end of each month, unfortunately it`s smaller than you hoped ;)

Drupal error fix: Fatal error: Unsupported operand types in ../ on line 1426

If you`re using drupal, you might encounter this error, when upgrading to Drupal 6.16:
Fatal error: Unsupported operand types in path_to_drupal/includes/ on line 1426
It happened to me when I tried to create a node that is unpublished (“Published” checkbox is unchecked) or trying to unpublish a published node.
There various modules that conflict with the 6.16 drupal core file which is changed in 6.16.
This is a fast fix of core file and it works for me.
Open up the includes/ file, search for:

function url($path = NULL, $options = array()) {

(around line 1418)

Replace this code:

$options += array(
'fragment' => '',
'query' => '',
'absolute' => FALSE,
'alias' => FALSE,
'prefix' => ''

with this:

if (!is_array($options)) {
$options = array();
$args = func_get_args();
if (isset($args[1])) $options['query'] = $args[1];
if (isset($args[2])) $options['fragment'] = $args[2];
if (isset($args[3])) $options['absolute'] = $args[3];

Search for this line:
function l($text, $path, $options = array()) {

Replace code:

$options += array(
'attributes' => array(),
'html' => FALSE,


if (!is_array($options)) {
$options = array();
$args = func_get_args();
if (isset($args[2])) $options['attributes'] = $args[2];
if (isset($args[3])) $options['query'] = $args[3];
if (isset($args[4])) $options['fragment'] = $args[4];
if (isset($args[5])) $options['absolute'] = $args[5];
if (isset($args[6])) $options['html'] = $args[6];

Save the file, you should be done!
Tell me if it worked for you!

Annas hotel website

Recently finished another website in Flash. It is for a nice hotel in Latvia with SPA & restaurant.
I have switched back to Actionscript 2.0 in Flash, because AS 3.0 is a bit too much headache and tough learning curve.
Website is based on SWFAddress deep-linking structure and uses other free Actionscript libraries. Database is MySQL driven, connected in simple XML loadData manner. All text data can be edited with WYSIWYG type editor.

Intro section welcome page … reservation


Just made a simple page for product “TurboXS KnockLite“, an engine knock (detonation / pre-ignition) warning light. Simple 3-page website, the domain was available, so I just made and informative page with description, installation instructions and links to online shops. If Google will like my site, I`ll add some AdSense banners and put referral links to online shops..

Add or remove trailing slash in URL with .htaccess

If you`re using some kind of CMS, usually its normal that each URL works with or without trailing slash, e.g. these URLs would be the same:

Still Google, Yahoo, MSN and other search engines treat them as different urls and gives penalty as they are dupliate URLs with identical content.
You have two options – to add or to remove the trailing slash. After a bit of reading I chose to remove the slash from my celica site, because I`m using Drupal CMS that removes trailing slashes for new content and I don`t really want to hack the CMS plugins. To alter the URLs, you need to edit .htaccess file at the root directory of your website ( )
Add this code to your .htaccess file to remove trailing slashes:

#get rid of trailing slashes
RewriteCond %{HTTP_HOST} ^(www.)?turbocelica\.lv$ [NC]
RewriteRule ^(.+)/$$1 [R=301,L]

or use this code to ADD trailing slash to the end of each URL:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)([^/])$$1$2/ [R=301,L]

Make sure you backup your .htaccess file before you edit. It`s easy to get “500 Internal server error” if you don`t know what you`re doing ;)
Read more here:

Flash player 9, 10 – security policy file

I encountered problems for last 6 months to upload music on my dj site – . I have flash CMS admin on but the songs are uploaded to other site of mine, where HDD space is not a problem. about half year ago I couldnt upload songs from some computers, now its from all computers. It just stops. I had suspicion it had something to do with new Flash Player versions 9 and 10. So today I fixed it just by uploading simple file to my file hosting server: crossdomain.xml.
Flash player always looks for file when it accesses its contents or uploads something. The is what my security policy file contains: