Posts Tagged ‘tech’

Ubuntu 14.04 and roundcube

Friday, August 15th, 2014

For any of you updating from 12.04 to 14.04 with roundcube and having constant “Error 500” when you log in, you need to enable libcrypt on php5:

add to /etc/php5/apache/php.ini file:

extension=mcrypt.so

or

php5enmod crypt

ESXi, 5.5, and the PERC 5 series of cards

Saturday, May 3rd, 2014

So, many of us have come to love the stodgy old PERC5 RAID controller – this SATA 3G/s and SAS 1.5G/s controller is generally a reliable little beast.

Until it meets Intel’s VT-d on a system running esxi 5.5. Then.. not so much.

Now, if you don’t happen to need passthrough, you can disable VT-d. However, if you happen to have a Dell 710 that has no ability to disable VT-d without disabling VT-x, you might find yourself needing the ‘noiommu’ boot option.

Problem: that option no longer lurks under the advanced setting menu.

However, the good news is, you can still set it, either by passing it in on the kernel boot options line, or by setting it in the CLI:

esxcfg-advcfg –set-kernel “TRUE” noiommu

C# arg parser

Monday, December 2nd, 2013

Since I posted a perl one. Note there’s probably some neat way to do this using system libraries that I just don’t know about, but this is what I use

As part of the class (you can have this as a class i.e. Config.cs, or as part of the program:


static readonly Dictionary argsDict = new Dictionary();

Parser:


static public void ArgHandler(string[] args)
{
foreach (string arg in args)
{
Regex quoteRE = new Regex(“\”(.*)\””);
string[] quoteResults = quoteRE.Split(arg);
string workarg;
if (quoteResults.Length > 1)
{
workarg = quoteResults[1];
}
else
{
workarg = arg;
}

Regex argRE = new Regex(“–(.*)=(.*)”);
string[] regResults = argRE.Split(workarg);
if (regResults.Length > 1)
{
Console.WriteLine(string.Format(” — {0} -> {1}”, regResults[1], regResults[2]));
argsDict.Add(regResults[1], regResults[2]);
}
}
}

Get a argument:


static public string GetArg(string arg)
{
string result = null;
argsDict.TryGetValue(arg, out result);
//if (debug)
// Console.WriteLine(“arg ” + arg + ” -> ” + result);
return result;
}

At the top of main(), call:


ArgHandler(args);