Project Insomnia is many things, but in this context it is simply a "braindump" of whatever I happen to be thinking/reading/watching/doing at the moment. Parental guidance suggested.
// ==UserScript==
// @name SFGate-NoComments
// @namespace http://www.userscripts.org
// @description Hide comments on SFGate.com articles
// @version 0.2
// @include http://www.sfgate.com/*
// @copyright 2010+, Andrew Rich (http://www.project-insomnia.com)
// @license (CC) Attribution Non-Commercial Share Alike; http://creativecommons.org/licenses/by-nc-sa/3.0/
// ==/UserScript==
var commentsDiv = document.getElementById('commentspage');
commentsDiv.style.display = 'none';
var commentslinksSpan = document.getElementById('commentslinks');
commentslinksSpan.style.display = 'none';
var commentBoxWrapperDiv = document.getElementById('articlePageCommentBoxWrapper');
commentBoxWrapperDiv.style.display = 'none';
var recCommentsDiv = document.getElementById('sfgate_recommended_comments');
recCommentsDiv.style.display = 'none';
var commentsListDiv = document.getElementById('commentslist');
commentsListDiv.style.display = 'none';
var commentsContainerDivAttrs = document.getElementById('Comments_Container_viewall').attributes;
commentsContainerDivAttrs.getNamedItem('class').value = '';
var commentsContainerDiv = document.getElementById('Comments_Container_viewall');
commentsContainerDiv.style.visibility = 'hidden';
Labels: code monkeying, comments, safari, sfgate, userscript
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: AddToPath.cmd ::
:: Written by Andrew Rich (andrew.rich@project-insomnia.com) ::
:: Copyright (c) Andrew Rich under GPL (http://gnu.org/licenses/gpl.html) ::
:: Based on code by "/\/\o\/\/" at http://bit.ly/58hYYh ::
:: ::
:: This command script adds an Explorer shell extension which, when ::
:: selected on right-clicking a folder, will add it to the system PATH. The ::
:: change takes effect immediately for new CMD or PowerShell instances ::
:: started after adding the folder to the PATH. CMD or PowerShell instances ::
:: started adding the folder will continue to use the PATH in effect at the ::
:: time they were started. ::
:: ::
:: Usage: ::
:: Double-click AddToPath.cmd or execute AddToPath.cmd from a CMD session. ::
:: The only command-line parameter available is /? which shows this text. ::
:: ::
:: Requirements: ::
:: - Windows XP SP3 or later. Not tested on Vista or Windows 7 BUT should ::
:: work unaltered. Please send feedback if you run AddToPath on Vista or ::
:: Windows 7. ::
:: - The user executing the command script must be a local Administrator. ::
:: However, the PATH update will affect all users. ::
:: - reg.exe must be on the system PATH. This should be the case for any ::
:: properly functioning Windows machine. ::
:: - Microsoft PowerShell must be properly installed. This should be the ::
:: case for any Windows machine which is current on Windows updates. The ::
:: command script will verify that PowerShell is installed. If the script ::
:: reports that PowerShell is not installed, download and install it from ::
:: http://bit.ly/mYzg4. ::
:: ::
:: Uninstall/remove: ::
:: Just run AddToPath.cmd again. If the "Add To Path" shell extension ::
:: installed by AddToPath.cmd exists, running the command script a second ::
:: time will cause the shell extension to be removed. ::
:: ::
:: Manual uninstall: ::
:: From a CMD session, type: ::
:: ::
:: reg delete HKCR\Folder\Shell\Add_To_Path ::
:: ::
:: Note that uninstalling only removes the Explorer shell extension, and ::
:: does not affect any system PATH entries which may have been added. ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::ENDHEADERCOMMENT
@Echo Off
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
:: setup
SET ShellExtKey=HKCR\Folder\Shell\Add_To_Path
SET ShellExtKeyText="Add to Path"
SET PSPathKey=HKLM\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell
:: check command params
IF [%1]==[] GOTO CmdParamsDone
IF /I %1 EQU --help GOTO ShowHelp
IF /I %1 EQU /? GOTO ShowHelp
IF /I %1 EQU -? GOTO ShowHelp
GOTO ErrBadParam
:ShowHelp
ECHO.
FOR /F "delims=" %%A IN (%~fs0) DO (
IF /I %%A EQU ::ENDHEADERCOMMENT GOTO :EOF
ECHO %%A
)
PAUSE
GOTO :EOF
:ErrBadParam
ECHO.
ECHO "%1" is not a recognized command-line parameter for %0.
ECHO Type %0 /? for help.
ECHO.
PAUSE
GOTO :EOF
:CmdParamsDone
:: check overall prerequisite: reg.exe must be on the system PATH
reg 2>>NUL 1>>&2
IF NOT [%ERRORLEVEL%]==[0] GOTO ErrNoRegExe
:: is the Add_To_Path shell extension already installed?
:: if the reg query fails (errorlevel=1) then it's not installed
reg query %ShellExtKey% 2>>NUL 1>>&2
IF [%ERRORLEVEL%]==[1] GOTO Install
GOTO UnInstall
:Install
:: check install prerequisite: PowerShell must be installed
:: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell should contain the full path to powershell.exe
:: e.g. C:\WINNT\system32\WindowsPowerShell\v1.0\powershell.exe
FOR /F "usebackq tokens=3" %%a IN (`reg query %PSPathKey% /v Path ^| FIND "powershell.exe"`) DO SET PSPATH=%%a
IF NOT DEFINED PSPATH GOTO :ErrNoPowerShell
IF [%PSPATH%] EQU [] GOTO :ErrNoPowerShell
:: build the shell extension's command line
:: does powershell.exe's full path include spaces? if so, add quotes
FOR /F "tokens=2" %%a IN ("%PSPATH%") DO SET s=%%a
IF DEFINED s (
SET AddToPathCmd="%PSPATH%"
) ELSE (
SET AddToPathCmd=%PSPATH%
)
SET AddToPathCmd=%AddToPathCmd% -NonInteractive -NoProfile -Command [system.environment]::setEnvironmentVariable('path',$env:path + ';%%1','machine')
:: create the shell extension's base key under Folder\Shell
reg add %ShellExtKey% /ve /d %ShellExtKeyText% /f 2>>NUL 1>>&2
IF NOT [%ERRORLEVEL%] EQU [0] GOTO ErrRegAdd1
:: add the command line
reg add %ShellExtKey%\Command /ve /d "%AddToPathCmd%" /f 2>>NUL 1>>&2
IF NOT [%ERRORLEVEL%] EQU [0] GOTO ErrRegAdd2
ECHO Installed. Right-click on a folder in Explorer to add it to the system PATH.
PAUSE
GOTO :EOF
:UnInstall
reg delete %ShellExtKey% /f 2>>NUL 1>>&2
IF NOT [%ERRORLEVEL%] EQU [0] GOTO ErrRegDel
ECHO UnInstalled.
PAUSE
GOTO :EOF
:ErrNoRegExe
ECHO Error: reg.exe was not found on the system PATH.
PAUSE
GOTO :EOF
:ErrNoPowerShell
ECHO Error: Windows PowerShell is not installed (or is not installed correctly).
ECHO Go to http://bit.ly/mYzg4 to download and install Windows PowerShell.
PAUSE
GOTO :EOF
:ErrRegAdd1
ECHO Error creating the shell extension's base key.
ECHO Run %0 again to back out any changes.
PAUSE
GOTO :EOF
:ErrRegAdd2
ECHO Error adding the shell extension's command line.
ECHO Run %0 again to back out any changes.
PAUSE
GOTO :EOF
:ErrRegDel
ECHO Error removing the shell extension's registry entry.
ECHO To remove manually, type the following at the CMD prompt:
ECHO reg delete HKCR\Folder\Shell\Add_To_Path
PAUSE
GOTO :EOF
Labels: CMD, code monkeying, path, PowerShell, Windows
It's been a cold winter here in the Bay Area. Yes, it's been colder on the east coast (even in Florida!) and for some people, low-40s isn't cold at all, but it's been cold FOR ME.
My preferred method of staying warm during the winter is lighting a fire in the fireplace and curling up under a blanket with one or more cats. I'll turn on the central heat if necessary but prefer not to.
Coffee
Coffee brings me back to life in the morning. It's not just a preference, it's a requirement. I usually like it with milk or half-and-half and sugar (real "raw" sugar, please) but if it's the good stuff I might forgo the milk.
Pancakes
I've always liked pancakes though I don't smother them in butter and syrup like most people. A little butter and, hold your breath, a little salt is all I need. A friend sent us a "breakfast kit" from LL Bean that includes buttermilk pancake mix, coffee (see above), real maple syrup and blueberry jam.
Bagel with lox, cream cheese and veggies
A meal in itself, but the bagel had better be nicely toasted and the smoked salmon had better be very very fresh. Appropriate veggies include red onions, capers, cucumbers and perhaps a little mesclun salad.
I have long hair. Really long hair. I don't get it cut often (or as some would say, often enough) but the second-to-last time was on our 2008 cruise on the Disney Magic. The lead hairdresser in the onboard Vista Spa, Alex, took care of me personally and did a terrific job.
I don't recommend booking a Disney Cruise just to get your hair done, but if you are on the Magic and it's due (or overdue) then you can't go wrong with Alex.
The time: early 2000s, probably mid 2001.
The place: Cerritos Pontiac, Cerritos, California.
We were on our way down to Disneyland for MouseAdventure, and a strange and troubling noise had started coming from my car, a 1999 Pontiac Grand Prix GTP, as we went through Kettleman City. The mechanic at a local gas station said it was a transmission problem but they couldn't do anything unless I wanted to leave the car for a few days. In Kettleman City.
View Larger Map
We had (and have) AAA Plus service, so elected to keep going and hope we'd make it to Southern California, knowing that if the car failed we could get a tow pretty much all the way. We made it to Cerritos Pontiac, where I'd originally bought the car a few years before, an hour or so before the service department closed.
The service professionals there took a quick look and determined that the transmission was toast and needed to be replaced. The service coordinator, a woman named Solange (memorable name), looked over my warranty details and informed me that although I was still within the 36 month period, I'd gone just a bit over the 36,000 miles and therefore the repair wouldn't be covered.
And then she said, "But we'll cover it anyway, because clearly a three year old transmission shouldn't just fail like this."
We rented a car to drive home and I drove back down a week later to pick up my car, fully repaired and good as new.
I don't know if Solange is still at Cerritos Pontiac, and given GM's troubles I don't even know if they still sell Pontiacs, but this is definitely the nicest thing a stranger has ever done for me and I wish her the best in whatever she's doing.
Chinese take-out
Like many dishes that are combinations of many ingredients, a day or so in the refrigerator gives the flavors a chance to meld and deepen. One day later, it's better than it was when we brought it home.
My favorite local Chinese take-out place is Jing Jing, on Emerson St in downtown Palo Alto. They specialize in hot-and-spicy Szechwan Hunan‎ cuisine and, barring a couple of missteps, almost everything I've tried has been very tasty and well executed.
View Larger Map
Back before MouseAdventure got to its current maximum size of 200 teams / 700 players, we occasionally had actual "scavenger hunts" as some of the quests. These days having 200 teams actually bringing us things during the event would be... a little more difficult to deal with.
Tabasco sauce packet

Having teams bring us Tabasco packets was just part of one of the quests, but it did ensure that we had a ready supply of travel-size seasoning whenever we needed it. For a year.
Invalid FastPass

To get an invalid FastPass, you first have to have a valid one. Most teams figured this out quickly and just hit the same FastPass machine twice in succession to get an invalid one.
Whiz ticket
I couldn't find a picture of this, and it's part of the history shared by just a very few people who played the first two a.d.d-quests. One of the items Kevin asked us to find, without explaining, was a "whiz ticket". I don't remember how we thought to ask at City Hall, but as it turns out a "whiz ticket" was used, back in the days before ubiquitous credit card terminals, for Disneyland cash handling paperwork. Needless to say City Hall would not let our team have one, but they would let me take a picture and Kevin accepted that.
...but that's only because "half a day" wasn't an available option. Of possible mini-OCDs/fetishes, needing to be clean (take showers) and wear clean clothes is surely among the least disruptive or difficult. And that's how Andrew "C"s it.
"Project Insomnia" and "project-insomnia.com" ™ & SM; site contents © Andrew Rich except where noted.