News

 Subscribe Add to Technorati Favorites

 

 

 

 


 

 

Search My Blog:

 

 

My Stats

  • Posts - 472
  • Comments - 275
  • Trackbacks - 265

Twitter












Tag Cloud


Recent Comments


Recent Posts


Archives


Post Categories


Blogs


Miscellanous


Noteworthy Stuff


Popular Posts


September 2008 Entries

Giving Google Reader a 2nd Try…


I have been a long time user of FeedDemon, which I think is an excellent product.  Unfortunately I do not feel the same way about NewsGator’s online reader, and its sync with FeedDemon on my desktop leaves much to be desired.  In an effort to be able to read my subscriptions from anywhere, I’ve decided to make the switch to Google Reader.  I tried GR a long time ago, when it first came out, and I didn’t like the interface, but they have cleaned that up.  Thankfully.  :)  Also, I do plan to keep FeedDemon around on my desktop for certain local feeds that I keep that GR cannot access.

So my experience this time is MUCH improved.  I like it a lot.  Here is what I am missing:

  1. There is a feature to mark articles as read once I scroll past them.  There is one problems with this, though:
    1. Sometimes when there is only one article, which does not require scrolling to read, and I shouldn’t have to scroll just to mark it read.  I’m missing an option to mark articles read as soon as I click on the source and load the articles.
  2. Per subscription viewing options.  This is one of my favorite features of FeedDemon.  Some feeds are best viewed in what Google Reader calls “List view”, and others are best viewed in what Google Reader calls “Expanded view”.  FeedDemon actually provides a dozen or so different display styles that any feed can use.  With Google Reader, its all or nothing.  All feeds display as either a list of titles, or an expanded title + full description.  Big hole here.
  3. Use of attention data – FeedDemon will show me the feeds I pay the most attention to, the feeds I pay the least attention to, and “newspaper” displays of posts from my favorite feeds.  Google Reader has a similar “Trends” page, but the “Home” page of Google Reader doesn’t appear to take this information into account when choosing what stories to highlight.  But I should give this more time because maybe it just needs to catch up with my habits.
  4. Editing of Feeds.  I can rename or trash subscriptions, but I cannot edit their urls.   Not a huge feature, I realize, but useful for me.
  5. updated 10/1/2008: I’d love the Gmail “Labels” feature here.  I need some way of “flagging”/”starring” items that I want to pay attention to later, but I want them to be separated in the display by category/tag/label.

What I like about Google Reader:

  1. I love the way I can choose whether or not to show all my feeds, or only the ones that have updates.  This eliminates a lot of the clutter that I feel with FeedDemon.
  2. I love the Google Reader gadget that I can add to my iGoogle page, even though it also doesn’t take advantage of attention data.
  3. The speed is quite impressive.  Not just for a web app, but for any app.  Shockingly fast, almost.
  4. Of course, that good ole’ built-in Google search that I love so much is there for my feeds as well.

Hmm…let me explore some more…

Technorati Tags:

posted @ Tuesday, September 30, 2008 4:49 PM | Feedback (2) |


Help save Internet radio!


Good news from Pandora yesterday – The Webcaster Settlement Act of 2008 was passed in the House, enabling Internet radio to exist without paying ridiculous per listener fees.  Here’s the email from Pandora:

Hi, it's Tim from Pandora;
Today, thanks to the extraordinary support of many Pandora listeners, we took a giant step forward when the House of Representatives supported Pandora and Internet radio and passed the Webcaster Settlement Act of 2008.  Now we need your help so that the Senate will pass it also - and quickly... The finish line is in sight!
After a yearlong negotiation, Pandora, SoundExchange and the RIAA are finally optimistic about reaching an agreement on royalties that would save Pandora and Internet radio.  The legislation would give us the extra time we need to finalize the deal.
Please call your Senators Monday morning starting at 9:00 (Eastern) and ask them to support the Webcaster Settlement Act of 2008.
The person who answers the phone in your Senator's office may ask for the bill number - it's H.R. 7084 (if they ask for a Senate bill number, you can assure them that in this unusual case, the Senate is actually voting on the House bill number).
Senator Richard Burr: (202) 224-3154
Senator Elizabeth Dole: (202) 224-6342
If the phone is busy, please try again until you get through. These calls really do make a difference.
Thanks so much for you ongoing support.
Tim

The senators listed there are from North Carolina.  Find your own senator contact #’s here.  There you have it.

posted @ Monday, September 29, 2008 11:12 AM | Feedback (0) |


Deleting emails from PowerShell


The question was posed on the newsgroup: how do I delete emails (over POP or IMAP) on a remote mail server through PowerShell?

Here’s an example of one way to do it – through the use of the get-imap, set-imap, and get-pop cmdlets that are included in NetCmdlets.

## deleteemail.ps1: Delete all email from a particular sender ## deletes emails from an IMAP or POP server. ## Returns a collection of objects containing information about deleted emails (from, to, subject) or mailboxes (name, flags) in a mail server. ##  ## By default, IMAP will be used.  To use pop, add set the pop argument to 1.  param( [string] $server = "",
[System.Management.Automation.PSCredential] $cred,
[string] $sender = "someperson@somewhere.com",
[int] $pop = 0,
[int] $imapexpunge = 0
)

function get-emailaddress($header) {
[int]$index = $header.IndexOf("<")
if ($index -gt -1) {
$retval = $header.Substring($index+1)
$index = $retval.IndexOf(">")
$retval = $retval.Remove($index)
return $retval;
}
else {
return $header;
}
}

if ($server -eq "") {
$server = read-host "Mail Server [localhost]" if ($server -eq "") { $server = "localhost" }
}

if ($pop -eq 1) {
$msgs = (get-pop -server $server -cred $cred)
}
else {
$msgs = (get-imap -server $server -cred $cred)
}

Foreach ($msg in $msgs) {
$address = get-emailaddress($msg.From)
if ($address -eq $sender) {
$msg
if ($pop) {
get-pop -server $server -cred $cred -deletemessage $msg.Id
}
else {
set-imap -server $server -cred $cred -message $msg.Id -expunge:$imapexpunge -delete
}
}
}

trap{
write-host "Exception occurred (please find more information below), script execution was terminated." break }

There you are.  First I have defined a function to take a sender address and parse out the email address (in case the sender address includes a friendly name – if you’re not familiar with this, its not really important anyway).  Then I check to make sure we have a server to connect to, and depending on whether or not we’re using POP or IMAP, I connect to the server and get a list of waiting messages using get-pop or get-imap.  Finally, I loop through each message, and if the sender address matches the one I’m looking for, I output and then delete the message.  

 

 

 

 

 

 

 

Technorati Tags: , , , ,

posted @ Wednesday, September 24, 2008 3:44 PM | Feedback (0) |


93x faster .NET Image Loading


I was looking around for how to load images faster than the .NET System.Drawing.Image class and found this awesome finding from Omar Shahine.  The .NET 1.1 SP1 update included a new signature for System.Drawing.Image.FromStream that takes a boolean “validateImageData”.  If you set this to true, the loading time is *much* faster.  Does anybody know what validation is actually performed when this parameter is true?

posted @ Friday, September 19, 2008 4:29 PM | Feedback (1) |


BrewzKey


 Every once in a while its good for all of us, after a hard work day, to enjoy a tasty cold beverage.  In these times of enjoyment, you should never be caught without the means to open said tasty beverage.  Enter the BrewzKey.  Your key to bottled goodness.

posted @ Friday, September 19, 2008 4:14 PM | Feedback (0) |


PowerScripting Podcast


If you’re into PowerShell at all and you haven’t listened to the PowerScripting Podcast, you should definitely check it out.  I know you’ve seen me write about the show before, but I also know that alot of us don’t have time to listen.  Try downloading a copy and burning it onto a cd for your drive home, or copy it onto your mp3 player.  The show is done by Hal Rottenberg and Jonathan Walz, two great guys who are a big part of the PowerShell community and who work hard putting together a great show.

The show is great – heck even the advertisements are interesting.  IMO, the best things about the show are the interviews and the Ustream channel.  The interviews are always with very interesting people who are doing interesting things, and listeners can ask questions in advance or even from the Ustream chatroom.  

They post excellent show notes on their blog, and you can listen to previous episodes there too, or subscribe to their feed to get the podcasts in your podcast client (like the Primetime Podcast Receiver.  Have I mentioned that I hate iTunes?  And iPods?).

Technorati Tags:

posted @ Friday, September 19, 2008 10:08 AM | Feedback (0) |


An Actual link to AWSLink


In my last post I described AWSLink, my bookmarklet for generating Amazon Associates product links.  It helps if I provide a link to AWSLink, huh?  Here it is!

posted @ Tuesday, September 16, 2008 8:38 AM | Feedback (0) |


Quickly create Amazon Associates links


I don’t know if there is already an easy way to do this that I just don’t know about, or what…but it sure seems like there should be.  I always find it a pain in the ass to create Amazon Associates links – I’ve always had to go to their website, click “Build Links”, click “Text Links’, paste in the URL to the product page, etc.  Annoying.  The URL isn’t that difficult to build, so I just created a little bookmarklet that will do it for me.  You can use it with your own Amazon Associates tag if you like.  Just go to AWSLink, type in your Associates tag, click “Generate Bookmarklet”, and drag the link into your bookmarks.  Then when you’re on an Amazon product page you’d like to link to, just click the bookmarklet and grab the URL.

posted @ Monday, September 15, 2008 11:32 AM | Feedback (3) |


Awesome Birthday


I had an awesome 32nd birthday yesterday.  I had some family in from out of town and we had a great time.  Then I headed to the pool with the gf to enjoy a few tasty beverages and an awesome afternoon in the sun.  After that we headed out to a secret dinner destination, which turned out to be the famous Angus Barn restaurant in Raleigh, where I devoured a 24 ounce t-bone and we enjoyed some nice wine.  Here’s the awesome camera that Lauren got me.  I’d been talking about buying a new, smaller camera that I’d be able to easily slip in my pocket!  I love it!

posted @ Monday, September 15, 2008 11:24 AM | Feedback (2) |


PowerShell: ESPN-Download


“Quintas" was another of the winners of the PowerScripting Podcast’s NetCmdlets scripting contest.

Quintas submitted an espn-download script, which retrieves podcast feeds from espn.com and downloads the mp3 files for later listening.

Here is Quintas’ script:

# ESPN-Download  param($DownloadDir=$(throw "Usage:  ESPN-Download.ps1 DownloadDirectory Show LatestorAllDownloaded`nShows`n1. Mike & Mike`n2. PTI`n3. Around The Horn`n`n[L] for latestshow or [ A ] for All shows`n"),
[string]$ESPNShow=$(Read-Host "Enter number of the ESPN Radio Show you want to download: `n1. Mike & Mike`n2. PTI`n3. Around The Horn`n"),
[string]$numberDownloads=$(Read-Host "Enter [ L ] to download just the latest show or [ A ] to download all in the feed`n") )

switch ($ESPNShow)
{
1 { $rss = get-rss -Feed http://sports.espn.go.com/espnradio/podcast/feeds/itunes/podCast?id=2445552 }
2 { $rss = get-rss -Feed http://sports.espn.go.com/espnradio/podcast/feeds/itunes/podCast?id=2406595 }
3 { $rss = get-rss -Feed http://sports.espn.go.com/espnradio/podcast/feeds/itunes/podCast?id=2839445 }
}

switch ($numberDownloads)
{
"A" {
Foreach ($feed in $rss)
{
$title = $feed.Title
$title = $title.Replace('/','-')
$title = $title.Replace(':','-')
$fname = "$title.mp3" $filename = "$DownloadDir\$fname" Write-Output "Downloading $filename" (New-Object System.Net.WebClient).DownloadFile($url,"$filename")
}# Foreach } default {
$title = $rss[0].Title
$title = $title.Replace('/','-')
$title = $title.Replace(':','-')
$title = $title.Replace(" ","")
$fname = "$title.mp3" $filename = "$DownloadDir\$fname" Write-Output "Downloading $filename" (New-Object System.Net.WebClient).DownloadFile($url,"$filename")
}
}
Technorati Tags: ,

posted @ Thursday, September 11, 2008 4:46 PM | Feedback (0) |


PowerShell NetCmdlets -debug


Its easy to forget about the –debug parameter, but a lot of times it can be very helpful, especially with NetCmdlets where in many cases –debug will output the protocol interface (the “PITrail” as we call it at /n software) of the connection.  The PITrail includes a trail of communication between the cmdlet and the remote host it is talking to.

Rob emailed me to ask for help diagnosing a 425 error he was getting when using the NetCmdlets get-ftp cmdlet.  As I described to Rob, in a nutshell the 425 problem happens because the FTP client (the cmdlet in this case) is unable to open a TCP data connection (for transferring data like file directory listings or file contents) on the ip and port that the server told it to use. 

Adding the -debug parameter to the get-ftp call, I can see what ip and port the server is telling me to connect to:

PS C:\> get-ftp -server 10.0.1.1 -user myusername –password ******* -debug                                                    
DEBUG: VerbsCommon.Get-FTP started processing.

Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): a
DEBUG: Info: Connecting to FTP server.
DEBUG: Server: 220 (vsFTPd 2.0.4)
DEBUG: Client: USER myusername
DEBUG: Server: 331 Please specify the password.
DEBUG: Client: PASS *******
DEBUG: Server: 230 Login successful.
DEBUG: Client: PASV
DEBUG: Server: 227 Entering Passive Mode (10,0,1,1,225,79)
DEBUG: Client: LIST
DEBUG: Server: 150 Here comes the directory listing.

DirEntry : drwx------ 2 1036 100 144 Nov 16 2007 test.txt
FileName : test.txt
FileSize : 144
FileTime : Nov 16 2007
IsDir : True

DirEntry : -rw------- 1 1036 100 14 Jun 20 14:56 test2.txt
FileName : test2.txt
FileSize : 14
FileTime : Jun 20 14:56
IsDir : False
In Rob's case, his 415 error happened right after the LIST command.  By using –debug, we were able to see without a doubt that the server was actually sending a valid ip and port in its response, but that port simply wasn’t open on the firewall guarding the server machine. 

The firewall *should* have been able to see the port that the server chose and open it up, but I guess this particular firewall just isn’t that smart.  Anyway, Rob was able to correctly configure a smaller passive port range in IIS FTP and sync that range with his firewall.

Related:  FTP Error 425,
FTPS Through NAT

posted @ Thursday, September 11, 2008 4:41 PM | Feedback (0) |


PowerShell: tweet-im


Mark Schill was another of the winners of the PowerScripting Podcast’s NetCmdlets scripting contest.

Mark submitted a tweet-im script, which sends an instant message about new tweets found in the Twitter RSS feed.  They explained on the podcast that Twitter used to have an IM-bot feature which went away, so Mark created this script himself to meet this need.  The script simply sits and fetches your Twitter friends timeline feed every x seconds, checks to see if the items it finds are newer than the last check, and if so sends out an IM (jabber/xmpp) containing the content of the tweet.

Here is Mark’s script:

# Here is a script that interrogates the Twitter RSS feed and sends an IM for each posting. 
# It starts out with all of the postings in the feed and then posts each subsequent posting as it is added.
# Author: Mark Schill

$TwitterUsername = "user"
$TwitterPassword = "password"

$IMServer = "server"
$IMRecipient = "recipient"
$IMCredential = get-credential

$ThisPath = $MyInvocation.MyCommand.Path | split-path
$TempFile = "$ThisPath\twitterstatus.txt"

$PreviousContent = ""

while ($TRUE)
{
    $CurrentContent = ""
    [xml]$Feed = (Get-HTTP -user $TwitterUsername -password $TwitterPassword https://twitter.com/statuses/friends_timeline.atom).Text
    $Entries = $Feed.feed.entry
    foreach ( $Entry in $Entries )
{
        $PublishTime = New-Object System.DateTime( $Entry.published.Substring(0,4),
        $Entry.published.Substring(5,2),
        $Entry.published.Substring(8,2),
        $Entry.published.Substring(11,2),
        $Entry.published.Substring(14,2),
        $Entry.published.Substring(17,2),
        [SYstem.DateTimeKind]::Utc
        )
        $CurrentContent += "($($PublishTime.ToLocalTime())) $($Entry.title)`n"
    }

    Compare-Object -referenceobject ($PreviousContent -split "`n" ) -differenceobject ( $CurrentContent -split "`n" ) | % {
        if ( $_.SideIndicator -eq "=>" )
{
            Send-IM -Server "im.flosoft.biz" -Credential $IMCredential -Recipient $IMRecipient -Message $_.InputObject
            Write-Host $_.InputObject
        }
    }

    $PreviousContent = $CurrentContent
    #Sleep for 5 minutes
    Start-Sleep 60
}
Technorati Tags: ,

posted @ Thursday, September 11, 2008 10:56 AM | Feedback (0) |


PowerShell: send-gmail


Over at the PowerScripting Podcast, the winners of the NetCmdlets scripting contest were announced. Meanwhile I was having some awesome vacation time in the beautiful Outer Banks of North Carolina.

Winners for the /n software Netcmdlets contest are:

  1. Steve Hiner - Wrote a wrapper for Send-Email script to send email using Gmail's SMTP server
  2. Mark Schill - Sent in two entries, the one we've chosen to highlight is his Twitter IM client bot thingy. It uses Send-IM and Get-Http
  3. Quintus - A script to download an ESPN podcast using the Get-Rss cmdlet

Here's one of the winning scripts, from Steve Hiner:

The script is very straightforward, it takes details about the email on the command line (or prompts for them if they are not specified there), and calls NetCmdlets send-email cmdlet to securely connect to the GMail SMTP server and send the email.
param(
      [string]$recipient=$(read-host "Who gets it")
    , [string]$subject=$(read-host "What's it about")
    , [string]$message=$(read-host "What do you want to say")
    , [string]$userid="GMAIL_USER_ID" #replace this with your ID or pass it on the command line
    , [System.Security.SecureString]$password=$(read-host -AsSecureString "Gmail Password")
)

function Extract-SecureString {
    param([System.Security.SecureString]$secstring)
    $ptr=[System.Runtime.InteropServices.Marshal]::SecureStringToCoTaskMemUnicode($secstring)
    [System.Runtime.InteropServices.Marshal]::PtrToStringUni($ptr)
    [System.Runtime.InteropServices.Marshal]::ZeroFreeCoTaskMemUnicode($ptr)
}

if (!(Get-PSSnapin NetCmdlets -ErrorAction SilentlyContinue)) {
     Add-PSSnapin NetCmdlets
}

$GmailServer = "smtp.gmail.com"
$Me = "$userid@gmail.com"

Send-Email -server $GmailServer -from $Me -to $recipient -subject $subject -message $message -SSL automatic -User $userid -Password $(Extract-SecureString($password))
Technorati Tags: ,

posted @ Wednesday, September 10, 2008 5:28 PM | Feedback (0) |


No, &Registry.find_name;, we don't install anything else on your machine.


The FAQ at freeas2.com is funny.  :)  I love it when software companies put on this sort of laid back front.

Q: Spyware! You have some sort of spyware that accompanies your install. You're harvesting information about me, aren't you?

No, &Registry.find_name;, we don't install anything else on your machine.

Technorati Tags: ,

posted @ Wednesday, September 10, 2008 1:11 PM | Feedback (0) |


Building Enterprise Mashups using RSSBus


Microsoft MVP Richard Seroter started a series of posts on building enterprise mashups using RSSBus.  Part 1, and Part 2.

A few weeks ago our Executive Director / Chief Architect / Technology Overlord recently asked me to build a real, live enterprise mashup application to demonstrate for our IT leadership group. Our goal was to show that RSSBus could be used to quickly and efficiently aggregate data in compelling new ways.   In the next few posts, I’m going to walk through our use case, and how I built a solution to solve this.

In this first post, Richard provides an outline of his problem, the solution he decided on, and how he would use RSSBus to help accomplish his goal.

In the second post, he demonstrates how he built feeds for his Excel sheets, his database, and a Google search.  One thing he didn’t mention is the guid for the items in the feed.  If the connector/script doesn’t create its own custom guid, the RSSBus engine will generate one itself by hashing all the attribute values.  This means that if anything about one of Richard’s customers changes, a new guid will be generated for the item pushed for that customer.  Sometimes this sort of automatic guid generation is not desired.  If Richard wanted to kill that behavior, he’d simply need to generate his own rss:guid in his script prior to pushing the item to the response stream.

I’ve talked about using RSSBus to build mashups before:
RSSBus: Simple Ways to Connect Data
RSSBus as a mashup tool
You can connect all sorts of data and systems together using RSS
Connecting sources of data, online or off

Technorati Tags: , ,

posted @ Tuesday, September 09, 2008 10:09 AM | Feedback (0) |


RSS to iCal Converter


Here is an RSS to iCal converter that I published last week.  All it does it take your RSS url, and give you back another one that calls RSSBus, and asks RSSBus to retrieve your URL and convert it to iCAL for you! 

Recently I came across several RSS feeds of schedules.  One was a product release schedule, another a football schedule (go pack!).  I was slightly annoyed that RSS was chosen for schedules since no feed readers really know how to handle a future pubDate, but I quickly realized it would be easy to convert to an iCalendar with RSSBus’ iCAL feed formatter (note:  RSSBus also includes feed formatters that transform RSS into csv, kml, atom, html table, and mediaRSS.  The feed formatter  API is open and anybody can create their own custom feed formatters).

Technorati Tags: , , ,

posted @ Monday, September 08, 2008 10:32 AM | Feedback (1) |