Monthly Archives : January 2007

Home  >>  2007  >>  January

Getting normality back

On January 14, 2007, Posted by , In Cool,PowerShell, With Comments Off on Getting normality back

The PowerShelling that I do mostly involves messing around the console window – dimensions, colours, title, etc. I wanted an easy way to get normality back so I added this to my $PROFILE. Nothing fancy or clever, but here it is:

Space Invaders with sound!

On January 12, 2007, Posted by , In Cool,Invaders,PowerShell, With 2 Comments

After yesterday’s attempts to make noises, I added basic sound support to psinvaders. On my setup, it seems that I can only play one sound at a time, so a new sound stops a previous, and it crackles, but that could be because of poor sound virtualisation in Parallels Desktop…

Making noises

On January 11, 2007, Posted by , In Cool,PowerShell,Quiz, With 4 Comments

There are twothree ways I know of to make noises in PowerShell. 1. Simple and most boring: use the internal speaker’s beep. write-host “`a`a`a” 2. Slightly better, use the .NET console beep. This plays A above middle C for one second. [console]::beep(440,1000) Both of the above are synchronous, ie, the…

Script Updates

On January 10, 2007, Posted by , In Cool,PowerShell, With Comments Off on Script Updates

After receiving feedback from a few people (thanks!), I’ve updated two of the scripts posted here previously. Convert images to text (ASCII art) This had a problem where a division by zero error would occur if the specified image file wasn’t fully qualified. Fixed script is here: convert-image2text.ps1. Console screen…

Text and path gotchas

On January 9, 2007, Posted by , In Rant, With 1 Comment

PowerShell is now my default Windows shell, but every now and then, little things crop up that make me want to go back to CMD.exe, or better cygwin/zsh. Someone gave me an example of filtering an ASCII text file, stripping out the first 3 characters of each line. On a…

What colour is yours?

On January 8, 2007, Posted by , In Odd,PowerShell, With 3 Comments

I noticed something very odd today. My PowerShell console thinks that the default white text is actually “DarkYellow.” If I set it to “White” there is no visible difference. What colour is your default console? Update: I’ve found a use for “darkyellow” being white. When you run something like findstr…

Moving to WordPress

On January 8, 2007, Posted by , In Announce, With Comments Off on Moving to WordPress

I’ve been having problems with RapidWeaver as my blogging software, not limited to RSS links being broken, and no previous/next links for the blog, so I’ve decided to move it to WordPress. It looks like it’s all ok now, but if you see anything broken, please let me know. The…

Convert images to text (ASCII art)

On January 7, 2007, Posted by , In Cool,PowerShell,Utility, With 6 Comments

Recently, whilst messing with sprites and the Grrr framework, I got thinking about better graphics for games. As PowerShell is very slow at doing console atomic write operations, a game should really have fewer, larger sprites. I then thought about ASCII art, and wouldn’t it be great if PowerShell could…

Console screen grabs in html

On January 6, 2007, Posted by , In Cool,PowerShell,Utility, With 4 Comments

[Updated 25 Jan 2007, well rewritten 🙂 ] Something I find myself doing a lot is getting a screen shot of a PowerShell console window and posting it some place. Unfortunately, its always a bitmap, and occasionally, I want it as formatted text. Now, the console is readable via $host.ui.rawui.GetBufferContents,…


On January 5, 2007, Posted by , In Cool,PowerShell, With 1 Comment

Some time ago, I wrote a Sudoku solver in Java, along with an editor, interactive hint mode, puzzle generator etc, but the project never got finished because of feature creep and I generally got a bit bored of it all. This morning, I resurrected the project and implemented the solver…