Thursday, November 3, 2011

California Common

California Common, Dara got this one when she bought the brewing equipment from Norther Brewer. This was our first ever attempt in brewing and it was fun but the instructional video they gave us with the equipment was the biggest help.

Brew day, it took half the day to brew because we wanted to do everything perfect, we even filtered all the water we used.

Bottling day, we tasted it and it has a flat stale beer taste but isn't extremely off putting, there is a tiny bit of carbonation. So far the taste wasn't worth the effort.

Opening day, wow!  I don't drink a lot of Steam beer but I think this is the best Steam beer I have ever had. At the very least this is the best beer I have had in years.

Style: Steam Beer / California Common
Brew date: 9/30/2011
OG: 1.050
Bottle date: 10/21/2011
Open date: 11/3/2011
FG: 1.016
ABV: 5.2%

Monday, August 29, 2011

Selenium 2 WebDriver C# Basic Example

Learning Selenium 2 with WebDriver in C# can be much harder than it should be. When I started using it in version 2.4.0 I tried a bunch of samples pulled from other peoples blogs and none of the samples worked without having to add/edit code sometimes extensively. I quickly identified a couple reasons for this the code samples didn't work out of the box.
1) First they didn't provide the version of selenium used, this was especially a big problem at the beginning because changes and new features were being added all the time to Selenium 2
2) Second (C# != Java) a lot of the C# samples I found were written Java, also a lot of the C# questions on sites like StackOverflow are written in... Java!

So here is my C# sample that I wrote in C#, good luck.
I started with the Selenium libraries

using OpenQA.Selenium;  
using OpenQA.Selenium.Firefox;  
using NUnit.Framework;  
using System;  
namespace BasicWebDriver  
   public class BasicGoogleTest  
     public void SearchForTest()  
       string searchText = "Selenium 2 WebDriver C# Basic Example";  
       using (IWebDriver driver = new FirefoxDriver())  
         driver.Manage().Timeouts().ImplicitlyWait(new TimeSpan(0, 0, 10));  
and don't copy this into Eclipse it might not compile.....

Tuesday, August 16, 2011

Cisco VPN auto logon

How to automate connecting to a Cisco VPN.

Option one DOS batch file: 
"c:\Program Files (x86)\Cisco Systems\VPN Client\vpnclient.exe" connect "NewCo VPN" user "rcasady" pwd "ParisHilton"

If you don’t want to keep your password in a batch file you can prompt the user for the password like below
SET /P PSWD=[Enter your Password]
"c:\Program Files (x86)\Cisco Systems\VPN Client\vpnclient.exe" connect "NewCo VPN" user "rcasady" pwd %PSWD%

Another option is to change the Cisco VPN options to connect on application open and put the “vpnclient.exe” in startup list, this will cause the credential screen to popup after you login.

I prefer to use the batch file because you can use it each time you lose VPN connection witch happens to me alot.

Friday, July 8, 2011

Write .NET "exe" with out Visual Studio installed

Here is a quick step to start compiling C# code from the command prompt and notepad. The other day I spent an hour learning how to do something I already know how to do in C# because I didn't have access to VS.NET. Granted most of that time was spent learning how to over come the limitations of the script language. You'll need to make sure the .NET framework is installed before you start.

1. Create a text file
2. Rename it to Program.cs
3. Open it in a text editor
4. Type your program:

using System;
namespace Example.HelloWorld
 class Program
  static void Main()
   Console.WriteLine("Hello World");

Notes on compiling:
* Find the C# conpiler "csc.exe", there should be several versions my current one is "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe"
- Type at the command-line: C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe c:\yourPath\Program.cs
* Remember to type the full path to both the compiler and the *.cs file, you can add the compiler path to the "path" enviroment variable so you dont have to type it every time.
- Type at the command-line: csc.exe c:\yourPath\Program.cs

The ability to write create a "exe" is powerful....

Friday, July 1, 2011

Tuesday, June 21, 2011

VI Cheat Sheet

VI is a text editor that should not be used unless there is no other option available. VI has a huge learning curve for and minimal amount of functionality. 
VI has two modes; insertion and command.

Command Mode:
:x Exit save changes
:q Exit if there are no changes
:q! Exit ignore changes
ZZ Exit and save changes

Insertion Mode:
i Insert before cursor
I Insert before line 
a Append after cursor 
A Append after line 
Links to VI information:

Monday, May 16, 2011

Useful DOS Commands

Below are some common commands I have used to do simple automation in the past. I find there are alway repetitive tasks like (stop a service and copy a file then start the service) Tasks like these can be automated so it happens in a matter of seconds, on a scheduler and repeatedly. Not to mention it takes all the human error out of the equation.

ROBOCOPY - Robust Copy, good for large copy jobs and can do multithreaded coping.

REM Examples:
Robocopy /E /MT:32 %SOURCE% %DEST%
Robocopy %SOURCE% %DEST% %FILES%

/E  Copy all subdirectories including empty ones
/MT   Multithreaded copy defaulted to 8 threads
%SOURCE% The source directory
%DEST% The destination
%FILES%  The files to be copied, default is *.*

RMDIR - Remove directory, deletes a driectory

REM Examples:

/S Remove all files and directories in the directory
/Q Supress prompting in /S

START - Starts a seprate DOS window
REM Examples:

/WAIT Wait for the window to terminate
%EXEC% Prorgam/Command to run in new window

NET START - Starts a win32 service

REM Examples:

%SERVICE% The name of the service to start

NET STOP - Stops a win32 service

REM Examples:

%SERVICE% The name of the service to stop

NET USE - Map a network drive

REM Examples:

%Drive% Drive letter "Z:"ECHO %PATH% UNC path to map
/USER User other than current logon
%USER% User name
%PSWD% Password

NET USER - Add and remove users from the local system

REM Examples:

%USER% User name
%PSWD% User Password
/ADD Add user
/DELETE Delete user

NBTSTAT - NetBios information for a remote computer

REM Examples:

-A Use the IP address
-a Use computer name
%IP% IP address
%COMP% Computer name

Date Stamp - Create a date stamp to be used as a folder name

for /F "tokens=2-4 delims=/ " %%i in ('date /t') do set tdtd=%%i%%j%%k
for /F "tokens=5-8 delims=:. " %%i in ('echo.^| time ^| find "current" ') do set ttrn=%%i%%j%%k%%l
ECHO %tdtd%%ttrn%

SET - Get User input

SET /P URL=[Please Enter a URL]

Good DOS web sites:

Friday, April 1, 2011

I just traveled through time

I'm not sure what year it is but I'm sure of this I have traveled through time....

The reason I know that I have traveled through time: I just received this cryptic message...

We're sorry. Your browser is not compatible with this application.
Only Microsoft Internet Explorer 6.0 on Windows 95, 98, Me, NT4, 2000, XP, or 2003 is supported.

Based off this message I would guess sometime in the late 1900's