Text and path gotchas
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?
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
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)
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
[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,…
Sudoku
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…
Minor gripes
A number of little things bother me about PowerShell, and I’d just like to outline them here. Adding to arrays According to get-help about_array : “You can append an element to an existing array by using the += operator. When the operator is used on the array itself, it appends…
Grrr!
Despite the title, this is not a rant 🙂 Grrr is a pet project of mine that came after the exploratory work with psinvaders. I was somewhat dissatisfied with myself for doing so much without seeing how else it could be done, especially with respect to drawing of images, animation,…
Space Invaders
In a previous post I said that I always like to try to write space invaders in every language that I learn. Well, PowerShell in the standard Windows console window looked like a great candidate so I set about the task in my spare time. My colleagues Richy King, Nik…
PNG and Internet Explorer
Oh dear, it seems that even though this is 2007, the most popular web browser on the planet (IE Will change it over to olde worlde JPEGs later, but in the mean time, if you’re using Windows, do yourself a favour and install Firefox or IE7. Update: I’m not entirely…