Emulating Grep in Powershell

Emulating Grep in Powershell. The option presented is to perform a grep on several files.

For a search in one file, with results going to output.txt

select-string -pattern "{pattern}" -caseSensitive c:pathtofile.txt > output.txt

One note: The lines wrapped at the width of the command window, even when redirected to a file.

Can you hear me now, #SPRINT?

After following @sprint, they heard me:

Original tirade of mine:

Breaking down Tweetdeck configuration and storage.

I decided to look at the possibility of eventually exporting the configuration data contained in TweetDeck:

You can find the groups, friends, and columns settings in a SQLite database file in a path like:
C:Documents and Settings{USERNAME}Application DataTweetDeckFast.{some hideously long hex string}Local Storetd_{version?}_{twitter username}.db

I used SQLite database browser to look at this file. (I copied it first, of course.) The data storage is pretty simple.

CREATE TABLE columns (cID INTEGER PRIMARY KEY, cName TEXT, cOrder INTEGER, cType INTEGER, cTerm TEXT);
CREATE TABLE friends (fUserID INTEGER PRIMARY KEY, fName TEXT, fScreenName TEXT, fScreenNameHTML TEXT, fLocation TEXT, fDescription TEXT, fProfileImageURL TEXT, fUrl TEXT, fProtected TEXT, fFollowers INTEGER);
CREATE TABLE groups (gID INTEGER PRIMARY KEY, gCID INTEGER, gUserID INTEGER);
CREATE TABLE queue (qID INTEGER PRIMARY KEY, qText TEXT);
CREATE TABLE sinceID (sID INTEGER PRIMARY KEY, sService TEXT, sType TEXT, sTerm TEXT, sTID INTEGER);

The columns table actually defines the groups, group names, and group displays.

The groups table provides the linkage between the columns and friends tables.

There is a preferences_{username}.xml in this same directory as well, for colors, positioning, etc...

Mobile Billing Meter

Billing Meter bit.ly link or Billing Meter tech0x20 link.

This isn't perfect. First of all, some connections are just too slow for a constant refresh rate of less than 20-30 seconds. Secondly, I think many mobile browsers have a refresh cut-off at which point they will ask you if you really want to keep refreshing.

The first page, index.php, allows you to enter parameters:

Billing Meter












Billing Rate per Hour
Update Interval (in seconds)
Press Submit to start the counter.


The second file, meter.php, does the display, calculation and refresh:
";

$netseconds = time()-$_SESSION["STARTTIME"];
$cost = sprintf("%10.2lf", round($_SESSION["BILLINGRATE"]*((double)$netseconds)/3600.0,2));
?>

Billing meter

Time spent:

".$time_counter[$i]."

";
}
?>

Your bill:

".$cost[$i]."

";
}
}
?>

$  

Two page mobile magic 8-ball

Two page mobile magic 8-ball

Had to use random numbers to prevent caching of pages by mobile web browsers. It's entirely possible that I made this workaround too complicated, as I had a file version problem on my local drive (I was updating the wrong file.)

The first page uses a random number in a hidden field with the POST method:

Magic 8-ball

Ask your question, and click the button for an answer.
";
?>

The second page appends a random number to the URL:


Magic 8-Ball

Magic 8-ball

The magic 8-ball says:

";
echo "Ask another question";

?>

32,770 lb machine workout

I dropped the tricep extension and crunch machine because of the potential back strain involved with both.  I'm doing much better now.  I'm starting to think any form of crunches are too dangerous to the back to bother messing with.  I'll have to do the alternative ab exercises in the future.

RunningAHEAD - Strings_n_88keys's log: View Workout.

MACHINE Sets Reps Weight "Total Weight"
Seated Chest 4 11 175 7700
Butterfly 4 10 100 4000
Lat Pull 4 11 100 4400
Dips 4 11 130 5720
Dips 1 10 175 1750
Leg Curl 4 10 115 4600
Leg Extension 4 10 115 4600
32770

Automatic Save Folder Extension for Firefox

As found in the LifeHacker article Four Experimental Firefox Extensions We're Into.

Automatic Save Folder allows you to specify a place to automatically save files by doman and file name to certain folders.  I can never remember which download location is used by which computer, much less find my preferred location for each specific type of file.  It would be nice to not have to play hide-and-seek my downloaded files, or fish for the location that I really wanted them to go to in the first place.

Ditch Your Extensions for Bookmarklets

From Lifehacker:  Bookmarklets: Ditch Your Extensions for Bookmarklets.

This is something I've been doing more and more of recently, mainly because I don't have a separate Firefox extension for everything blog or web 2.0 site that I use.  I've also ditched the delicious.com extension in favor of bookmarklets that post to two of my own blogs.

There's a side benefit to this strategy:  You can switch web browsers and not have to worry about your extensions not being offered in the new browser (i.e., Google Chrome).

Happy 150000, Toyota Corolla

My 1997 Toyota Corolla DX hit 150,000
My 1997 Toyota Corolla DX hit 150,000

Yesterday, on the way home from work (on Fairground Rd in the neighborhood, actually) my car hit 150,000 miles.  I bought it in 1998 with about 12,000 miles on it.