Mats codemix

Mats codemix

A little c#, a litte .NET and throw in some c++ and you get a nice Spaghetti

Mats codemix RSS Feed
 
 
 
 

Archive for Uncategorized

Searching with google

If i want to search this site with google.

Code

<form action="http://www.google.com/search" method="get">
<fieldset>
<input type="hidden" name="sitesearch" value="mats.gardstad.se/matscodemix/" />
<input type="text" name="q" size="31" maxlength="255" value="" />
<input type="submit" value="Google Search" />
</fieldset>
</form>

Powershell v2 CTP3 - profiles

I wanted to change the colours for powersshell error messages. Easily done by using this code

# Set Error and warning colours
$hostprivate = (Get-Host).PrivateData
$hostprivate.ErrorBackgroundColor = "red"

First i put the code in Profile.ps1 in C:\Documents and Settings\myname\Mina dokument\WindowsPowerShell.
This caused the powerhell scripting environment (ISE) to spit out some errors while starting:
Property ‘ErrorBackgroundColor’ cannot be [...]

A mix of code

I wanted to have a place to jot down ideas and things i discover working as a software developer.  I hope to expand this blog to something useful if not fore everyone but at least for me.