Author Archive


Written by Leif Stenfeldt. Posted in Tips

<script src=""></script>

  <h2>This is a heading</h2>
  <div class="containerdiv">klik her
    <div class="inch">dette er teksten.</div>
  <div class="containerdiv">klik her2
    <div class="inch">dette er teksten2.</div>




mc – history poisoning

Written by Leif Stenfeldt. Posted in FreeBSD, Tips

Argh… my history file is full of linies like this:
cd “`printf “%b” ‘\0057’`”
cd “`printf “%b” ‘\0057home\0057ciprian`”

Here is a quick-fix to the history poisoning when using csh shell on a FreeBSD server:

Insert this code at the end of the .cshrc file.

mv .history .hist
grep -v "printf" .hist | grep -v "echo_style" > .history
rm .hist


Then, every time you log in, the history file will be cleaned for mc-crap.


Veeam: Task failed Error: The remote certificate is invalid according to the validation procedure.

Written by Leif Stenfeldt. Posted in ESX

In Veeam B&R select “Backup Infrastructure” / Managed servers / VMware vSphere / vCenter Servers and your vCenter.

  • Right click on your vCenter and select “Properties”
  • Select “Next” (Credentials’ page)
  • Select”Next”
    A message “An untrusted certificate is installed on “???” and secure communication cannot be guaranteed. Connect to this server anyway?
  • Select”Connect”

The new server configuration is saved and the server should reconnect correctly.

Screendump from my server. (no vCenter server)




Windows 10 – Why is my logon script not mapping any drives?

Written by Leif Stenfeldt. Posted in Windows, Windows 10

I’ve got a solution now.

What creates this behaviour of your logon script not wanting to map drives?

If you have Windows 10, you want to use Edge, Calculator and PDF App. Microsoft says you need UAC enabled for that, otherwise it won’t work. So you enable UAC by GPO (Reg. Key EnableLua).


Move WFV

Written by Leif Stenfeldt. Posted in PHP, Tips, Wordpress

Transfer WP file version to an other site?

You will need to recalculate the data location length.

Here is a quick made converter.


Hvis WFV (WP file version) SQL-data skal flyttes til anden webside, kræves det en genberegning af direktorie+fil længe. 

                                          ~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Input: filename.sql
Output: NEW-filname.sql



if ($file = fopen($filename, "r")) {
	while(!feof($file)) $a[] = fgets($file);

$file = fopen("NEW-".$filename, "w");
foreach ($a as $key => $line) { 
	$line = preg_replace_callback(
		function ($matches) {
			return str_replace( 'path\\";s:'.$matches[1], 'path";s:'.(strlen($matches[2])-4), $matches[0]);
	fwrite($file, $line);
//	echo $line;    	



Install Google Chrome

Written by Leif Stenfeldt. Posted in Linux, Tips

Google Chrome isn’t in the repositories – however, Chromium is.

Google Chrome is only available for 64-bit Linux. I’ve included directions for 64 below.

To install Google Chrome, run the following:

sudo apt-get install libxss1 libappindicator1 libindicator7
sudo dpkg -i google-chrome*.deb

If error messages pop up after running the command sudo dpkg -i google-chrome*.deb then run the command

sudo apt-get install -f

and then re-run the previous command. The error messages mentioned should include something similar to

google-chrome-stable depends on [lib-example]; however; Package [lib-example] is not installed.

This installs a needed library for Google Chrome, then downloads the latest version of Chrome to a temporary directory and installs it. Run google-chrome to start the browser.

During the installation a PPA is added to your system so that Google Chrome receives the latest updates whenever you check for system updates.