Monthly Archives: July 2010

Gunnar Optik’s Review


So I got some of those Gunnar Optiks about a month ago. I had read a bunch of stuff on them and I was torn on if they were a scam or not, but it seemed like short money ($80-$120 USD The price is set by Gunnar, i.e. couldn’t find any deals really). I had asked my eye doctor about them and I didn’t get much of a response from him, basically saying they aren’t all that great, but probably not a waste either.

So here is my experience with them.

The bad

  • Frames: I ended up getting the expensive ones because they were the only frames that weren’t really horrible looking. the cheaper ones have bulky heavy frames and there is nothing special about them. personally I would have liked to see a better quality frame.
  • Glare: So when I first toss them on, the blue anti-glare coating is pretty obvious and some times i can even notice my eye, on the plus side, my eyes typically focus past that in a couple of seconds. The other thing about the anti-glare coating is that in a very dark room you tend to notice it more.

The Good

  • The biggest plus I feel is the .25 magnification. I use 4 monitors at work and I feel like I can visually move around them much faster and read quicker. Everything just seems much sharper.
  • Also I like the yellow tint, I think it might be part of the reason things are a tad more clear. The tint just seems comfortable to my eyes.
  • Even though I have a small problem with the glare coating, I find over all its very helpful.

One of the main reasons I decided to get these glasses was that I just got laser eye surgery (PRK) and had to go back to work fairly soon and figured if these help relieve strain even a little its probably worth it. I don’t think I’d spend the $300 to get these in a prescription, just too much for what they do.

Along the lines of eye strain its really hard to say if they help with that or not. I rarely notice eye strain so it would be hard to say if they prevent it or not. I typically notice it if I’ve had a lack of sleep and after I got back to work, I had had a long week, so maybe they help? Hard to say though.

About the dark room and glare thing above. I like to play COD some times when i get home from work, and sure, the glasses help a little, but I typically play in a very dark room and i notice the blue from the anti-glare coating and its rather annoying. Don’t normally wear the glasses while playing because of that. If I turn the lights on low (dimmer switch) it helps, but I’d rather have no light while I play. I’m not a serious player and I rarely play long, so, not a big deal.

Also because of the eye surgery I’ve gone to the Dr a few times lately, so I can safely say that I like the .25 magnification and I have 20/20 sight now, so in some of the conversations/reviews I’ve read people say ‘you probably like it because you’re eyes are off’, that’s not the case, it just makes things sharper.

So, Overall, I’d say I really like them. They were worth the money to me.

Justin

UPDATE: It’s been several months and I still wear them every day at work.  I almost never notice the glare reflection any more and I still hate the cheap frames. I’d still buy them again.

Update: Creating a profile for a remote session


So not too long ago I found a way to create a remote profile but there was one problem with it, it was a little sloppy in that it wouldn’t close the sessions. I haven’t found a way for it to close the sessions yet, and I’m not sure I want to. What I have done is get it to manage it’s sessions a little better. Here is the updated script.

function connect ($hname){
    #clean out non-open connections
    gsn | Where-Object {$_.state -ne "Opened"} | rsn
    #Check for Open Sessions

    if($session = gsn | Where-Object {$_.computername -eq $hname})
    {
        Write-Host "Reusing Connection!"
    }
    else
    {   
        Write-Host "Creating New Connection!"
        $session = new-pssession $hname
        icm -session $session -scriptblock{
       
####START REMOTE PROFILE####

            function prompt
            {
                Write-Host $(Get-Date -Format [HH:mm:ss])  -NoNewline -ForegroundColor Blue
                write-host $(get-location) -nonewline -foregroundcolor white
                return ">"
            }
        ####END REMOTE PROFILE####
        }
    }
    enter-pssession $session
}

As you can see there is a section marked Remote profile. I have only created a remote prompt but you can get it to do other things, for example load Quest modules or whatever it is you have in your normal profile.

Note To Self: using PowerShell to manage IIS 6


So since I always forget these neat things I learn, I’ve decided to make little notes to myself that can maybe help some others…

If you’d like to manage IIS using powershell its pretty easy if its version 7 since powershell is supported for that. If you have 6 or below, its not as straight forward, but still pretty easy using WMI.

The namespace you want is root\microsoftiisv2 (I’ve only tested this with iis 6, not sure if its different for older versions)

I recently needed to modify the username and passwords on a bunch of virtual directories and I found this to be a good way to update them all.

 

$vds = gwmi –namespace root\microsoftiisv2 –class iiswebvirtualdirsetting

This is the class for the virtual directory settings. A list of available classes can be found on MSDN Network or you can do it by asking gwmi

gwmi –namespace root\microsoftiisv2 -list

Personally I like MSDN for this.

Now once you get the data you need loaded up you can modify it easily enough, in my case i wanted to change the unc username and password, and luckily the virtual directories i needed to modify were in order so it was array indexes 24 through 157.

 

foreach ($i in 24..157){

$vds[$i].UNCUserName = “name”

$vds[$i].UNCPassword = “password”

$vds[$i].put()

}

 

and done!

to verify this you can do this:

 

$vds | ft name, path, uncusername, uncpassword

 

scary that’s saved in clear text huh?

Creating a profile for a remote session


 

This has been updated, check out the newer post!

 

I’ve been trying to find a way to create a profile for when I remote in to servers with winrm, and even though its documented, it doesn’t seem to be possible.

http://technet.microsoft.com/en-us/library/dd315384.aspx

"– When you use Enter-PSSession, your user profile on the remote computer is used for the interactive session. The commands in the remote user profile, including commands to add Windows PowerShell snap-ins and to change the command prompt, run before the remote prompt is displayed."

 

So, apparently they forgot to add a few bits of code… I’ve posted a bug report on this (you should go vote on this) but for the time being, I’ve come up with a fairly simple way around this.

In your profile on your local machine we’re going to create a function called connect which will do this for us. In this example I’ll only modify the prompt, but obviously you can add more in.

function connect ($hname){
    $session = new-pssession $hname
    icm -session $session -scriptblock{
    #remote profile script

        function prompt
        {
            Write-Host $(Get-Date -Format [HH:mm:ss])  -NoNewline -ForegroundColor Blue
            write-host $(get-location) -nonewline -foregroundcolor green
            return ">"
        }

    }
    enter-pssession $session
}

 

This creates the session via New-PSSession and then uses the invoke command to push your profile (that script block) to it and then enters the session for interactive use.

There is one problem with this and that is when you do Enter-PSSession from the prompt, and then Exit-PSSession from the remote session, it closes out the session, when you do it this way, the Exit-PSSession keeps the session open.

To visualize this try this code bit

gsn
etsn $server
Exit
gsn
nsn $server | etsn
exit
gsn

You’ll notice the first gsn (Get-PSSession) returns nothing because the session was closed, the second gsn shows that the session is still open..

I’m going to work on a better Connect function, but for the time being, this will work, just don’t forget the connections are staying open!