Searching for a String in Environmental Variables in Powershell

I’ve updated the post through feedback in the comments: Regex compare on strings for Get-Variable is Where-Object -Match. So, the closest parallel to the following bash code: set | grep “Users” is the following Powershell: Get-Variable | Where-Object { $_.Value -Match “Users” } or shortened: gv | ? {$_.Value -Match “Users”} Original Post, with Updates […]

Using Escape Codes and Setting Window Title on PS1 for ksh (Korn Shell)

I set up the following in my ~/.profile for my ksh login: export HOST=$(hostname) export PS1=$(perl -e ‘printf “33]0;${USER}@${HOST}:${PWD}07$”‘) Unfortunately, ksh doesn’t understand escape codes, so perl or awk is necessary to pull this off–or you can enter them literally via your editor. I like the perl route just for ease of maintenance. This was […]

Count Outlook Inbox Unread / Total From Ruby

Well, Track your unread items/total items count in Outlook on startup, except for the pesky Outlook Macro disabled security problem. Besides, I never restarted Outlook often enough for it to track much of anything. Instead, I decided to create a Ruby script to track the count. I’ve left reference URLs and test notes in place […]

Date formatting for Single Unix Specification(R) versions of “date”

The date command is wonderful for formatting dates, as such date –date=”2010-01-01″ +%Y%j But what happens when you’re on a system whose date command only supports the -u [UTC] and + [for formatting] options? Below is a quick hack in straight C that provides the ability to format a date that you provide. This is […]

Perl Documentation Bookmarklets

Below are some bookmarklets to quick link to CPAN documentation… Click and drag the links to your bookmark bar or use the included source code to create the bookmarklets. They will generate a prompt something like this when clicked: Bookmarklet to search for a keyword in CPAN documentation: Search CPAN Source: javascript:{x=prompt(“Search%20for%20module”);window.location=’;query=’+x;} Bookmarklet to bring […]

How to disable “There are unused items on your desktop”

Right-click on your desktop background and select [Properties]. From the “Display Properties” window, select the [Desktop] tab. Select the [Customize Desktop…] button at the bottom. Uncheck the “Run Desktop Cleanup Wizard every 60 days” box and click the [OK] button, and then click the [OK] button on the display properties window. That should be it!