Cash Talks - BS Walks RSS 2.0
# Wednesday, 10 October 2007

I created a DasBlog Content filter for creating Wikipedia links.  DasBlog Content filters are simple search and replace items.  It does stuff like replace ; -) with  <img alt="; -)" src="smilies/wink.gif">   (I inserted a space after ; so it would not get performed)  It can also do RegEx patterns as used in this example.

I created a derivative of their Google search that searches Wikipedia instead.  The Find Pattern is

\$w\((?<expr>[\w\s\d]+)\)

RegEx patterns. 

<a href="http://en.wikipedia.org/wiki/Special:Search?search=${expr}">${expr}</a>

This allows you to type $ w(Microsoft)  and it will create Microsoft.   (I inserted a space after $ so it would not get performed)

The imbedded HTML is:

<a href=”http://en.wikipedia.org/wiki/Special:Search?search=Microsoft”>Microsoft</a>

Multi Word with spaces works great too.  If you want it to go to a page it must be exact and unique. 

Wednesday, 10 October 2007 19:57:55 (GMT Daylight Time, UTC+01:00)  #    Comments [17] -
DasBlog

PowerGUI's editor is nice and lightweight.  I wasn't crazy about the colors in the syntax highlighting.

Luckily, this can be customized.  Not with a GUI, but at least in the configuration XML - PowerShellSyntax.xml.  I replaced the Styles section with the following:


      <Styles>
<Style Key="ReservedWordStyle" ForeColor="Blue" Bold="True" /> 
<Style Key="OperatorStyle" ForeColor="Red" />
<Style Key="OperatorWordStyle" ForeColor="Red" />
<Style Key="VariableStyle" ForeColor="Purple" /> 
<Style Key="CmdletStyle" ForeColor="Black" Bold="True" /> 
<Style Key="NetClassStaticStyle" ForeColor="teal" /> 
<Style Key="NetClassStaticMethodStyle" ForeColor="saddlebrown" /> 
<Style Key="CmdletParamStyle" Italic="True" ForeColor="Black" /> 
<Style Key="NumberStyle" ForeColor="Black" /> 
<Style Key="StringDelimiterStyle" ForeColor="Green" /> 
<Style Key="StringDefaultStyle" ForeColor="Green" Bold="True" /> 
<Style Key="CommentDelimiterStyle" ForeColor="Maroon" /> 
<Style Key="CommentDefaultStyle" ForeColor="Maroon" /> 
<Style Key="AutoVars" ForeColor="Navy" />
</Styles>


A Sample Render looks like:


#########################################################################
# Some sample code

$strComputer = "."
$colItems = get-wmiobject -class "Win32_LoadOrderGroup" -namespace "root\CIMV2" `
   
-computername
$strComputer

foreach ($objItem in $colItems)
{
   write-host
"DriverEnabled: " $objItem.DriverEnabled 
   write-host
"GroupOrder: " $objItem.GroupOrder 
   write-host
"Name: " $objItem.Name write-host
}


I'm sure I'll tweak it, but I'm already happier using the product.

 

Wednesday, 10 October 2007 04:41:49 (GMT Daylight Time, UTC+01:00)  #    Comments [4] -
Powershell

When I first saw PowerGUI I was suspicious.  Quest is a first rate company that is very proud of their tools.  I've personally drove the purchase of their tools for Oracle Development a few years back.

Quest made a Press Release for PowerGUI.  It doesn't really commit to keeping it free.  Besides, it's still Beta.  I figured the other foot would drop when it got released.  And by foot, I mean several hundred dollars of foot.

Dimitry Sotnikov recent post announces a new download - that's still Free!  Still slightly leery, I did some searching and found his commentary Why is Quest doing free PowerShell stuff?

While I can't imagine Quest committing to keeping it free, it looks like it is for now!

Don't get me wrong, I'm not a "profit is evil" kind of guy.  But I find it difficult to keep up with the license management for my team.  A product has to be core to the job and save a magnitude more time that it costs fooling with it.  Who knows, we might get addicted to it and maybe Quest will charge a hundred dollars or less for it.

Hopeful Microsoft will make the definitive editor for PowerShell.  Hey, maybe integrate into Visual Studio!  We pay thousands of dollars per developer per year and you would think an intellisense editor for PowerShell wouldn't be too much to ask for.  (I'm hoping Bruce will slap me down again and show me where I've missed it.)

Wednesday, 10 October 2007 01:54:23 (GMT Daylight Time, UTC+01:00)  #    Comments [48] -
Powershell
# Tuesday, 09 October 2007
Simple technique for deferred expansion of Powershell strings. It is useful for Template strings.
Tuesday, 09 October 2007 19:50:06 (GMT Daylight Time, UTC+01:00)  #    Comments [48] -
Powershell
Archive
<2007 October>
SunMonTueWedThuFriSat
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2017
Cash Foley
Sign In
Statistics
Total Posts: 20
This Year: 0
This Month: 0
This Week: 0
Comments: 5413
Themes
Pick a theme:
All Content © 2017, Cash Foley
DasBlog theme 'Business' created by Christoph De Baene (delarou)