Thursday, September 21, 2017

Git cloning

A previous post described how to create a repository for the first time.  If your repository has been pushed to a remote repository, such as on Assembla, you will need to clone the repository to pull it down to your local PC.  This is pretty simple (at least with Assembla).

  • If you don't already have a folder where you keep all your git projects, the create one.
  • Open up Git Bash.
  • cd to the folder (using double slashes) like so:  
cd c:\\gitprojects
  • Sign into the Assembla site.
  • Select your git project.
  • Choose the Git menu option.
  • In the upper right corner, you'll see a drop down arrow next to the word Clone.
  • Clicking on the drop down will reveal a box with three options.
  • Choose HTTPS, and copy the URL that appears in the box.
Then, back in Git Bash, type:

git clone http://git.assembla.com/NAMEOFPROJECT.git

Notice, that I typed http instead of https. If you choose https, you have to do some additional configuration with a certificate, that can get a little hairy. I have found that for my purposes I don't need the encryption of https.

Thursday, July 27, 2017

Potentiometers Explained

A potentiometer or "pot" has three terminals.  There are two different configurations for two different users.
  1. Variable Resistor.  If only an end terminal and the middle terminal are used, then the pot acts as a resistor that can very from 0 resistance to the resistance rating of the pot.
  2. Voltage Divider.  If and end terminal is connected to a power source, and the other end terminal is connected to ground, then the middle terminal will vary the voltage from the full voltage from the power source down to 0.
A pot can be thought as containing two resistors (R1 and R2) with the middle terminal between the two.  As the knob is turned, R1 increases resistance while R2 decreases resistance.  All voltage divider circuits work this way whether they use a pot or not.  The equation to determine the output voltage is illustrated below.  




Monday, July 10, 2017

Sign in as a different user in SharePoint 2013

Microsoft took away the menu option to Sign in as a different user.  This was invaluable to test sites to make sure everything looked right for different users or to test access.  There are a couple of ways you can still do this.  You can append this to the site address:

/_layouts/closeConnection.aspx?loginasanotheruser=true

Or you can hold down shift while right clicking the Internet Explorer option.  Then choose Run as different user.  Then navigate to the site.

Thursday, May 4, 2017

Use Visual Basic functions in a LINQPad query

Occasionally, you want to include a Visual Basic (or C#) function such as IIF or Chr() in a LINQ query using LINQPad.  There is two steps to this:


  1. In the Query menu, choose Query Properties.
  2. In the Additional References tab, choose Add, and type Microsoft.VisualBasic.
  3. Then in the Additional Namespace Imports tab, choose the Pick from assemblies link.  Choose the Microsoft.VisualBasic.dll assembly, select the Microsoft.VisualBasic namespace, and then click Add Selected Namespace.

Tuesday, April 11, 2017

Force a site to NOT render in compatibility view

In IE, compatibility view is great.  It forces the newer versions of IE to render a site like it did back when IE 7 was around.  However, sometimes you have an older site that needs compatibility running on the same domain as a newer site that doesn't need compatibility.  You can force the newer site to NOT run in compatibility view by inserting this in the head tag of your page:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
UPDATE: Make sure this line is the first line under the head tag.

Thursday, January 5, 2017

View folders first in File Explorer

I often view my files in descending Modified Date order so that the most recent files are at the top.  However, by default the folders appear last when I do this.  The solution is to first sort by Modified Date, and then Shift and click the Name column.