1. Giving Yourself a Job

    In 1950 in New York, looking for a job consisted of catching a subway at 6:30 to pick up a copy of the New York Times, searching the classifieds, and then pursuing the most promising opportunities.

    After doing this for forty weeks straight, Bill still didn't have a job …

    read more

    There are comments.

  2. Call a web service with PowerShell

    I recently used a PowerShell script like the following to troubleshoot the details of a third-party web service our code was using. I thought the script was something worth noting here for future reference.

    $url = "https://path/to/Service.asmx"
    $parameters = '<?xml version="1.0" encoding="utf-8"?>' + "`n"
       + '<soap12:Envelope …
    read more

    There are comments.

  3. Force a SQL Restore

    Really tired of having to google this and piece it together every time I want it, so I'm posting it here.

    alter database DbName
        set single_user
        with rollback immediate
    go
    
    restore database DbName
        from disk = 'path/to/backup.bak'
        with file = 1, replace
    

    Notables:

    • Works best to run against the …
    read more

    There are comments.

  4. User Experience: Find the Send Button

    I typically use Gmail; I do have a Hotmail account and needed to use that for something the other day. I typed up my new message, and had to hunt for the Send button. It took about 5-10 seconds.

    image

    I found the obscurity of the Send button annoying. "There's got …

    read more

    There are comments.

  5. NDesk.Options

    Parsing command-line arguments can be deceptively tricky. Often it starts as something very simple to do manually, but as more arguments and formats and flexibility are desired, the effort required to do it well can explode.

    So there are several nuget packages for libraries to help with this. I chose …

    read more

    There are comments.

  6. Write MSMQ Messages from PowerShell

    This PowerShell script sends a message to an MSMQ. I did it this particular way because NServiceBus can consume messages sent like this.

    [Reflection.Assembly]::LoadWithPartialName("System.Messaging");
    
    $queueName = '.\Private$\your.queue.name';
    $queue = new-object System.Messaging.MessageQueue $queueName;
    $utf8 = new-object System.Text.UTF8Encoding;
    
    $tran = new-object System.Messaging.MessageQueueTransaction;
    $tran …
    read more

    There are comments.

  7. Read MSMQ Messages from PowerShell

    This script dumps the contents of an MSMQ to the console. This one dumps the Journal contents of a private queue; of course you'll have to adjust that line for your queue.

    [Reflection.Assembly]::LoadWithPartialName("System.Messaging")
    
    $queueName = '.\Private$\your.queue.name\Journal$';
    $queue = new-object System.Messaging.MessageQueue $queueName;
    $utf8 …
    read more

    There are comments.

« Page 3 / 6 »

links

social