Skip to content

Instantly share code, notes, and snippets.

John Weldon johnweldon

Block or report user

Report or block johnweldon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@johnweldon
johnweldon / read_xlsx.cs
Created Oct 9, 2012
Read Excel .xlsx file and return first worksheet as a DataTable
View read_xlsx.cs
using System.Data;
using System.Data.OleDb;
using System.Diagnostics;
namespace JW4.DB.Util
{
public static class Excel
{
public static DataTable GetFirstWorksheetAsTable(string filename)
{
View test_12063689.sql
DROP TABLE tempA; CREATE TABLE tempA ( style_cd CHAR(3), id_cd VARCHAR(15) );
DROP TABLE tempB; CREATE TABLE tempB ( item_desc VARCHAR(50), item_num CHAR(4), style_cd CHAR(3), id_cd VARCHAR(15) );
INSERT INTO tempA
SELECT 'A', 123456
UNION SELECT 'A', 654321
UNION SELECT 'B', 321456
UNION SELECT 'A', 654123
UNION SELECT 'C', 424242;
@johnweldon
johnweldon / start-sshagent
Created Dec 20, 2011
powershell script to start the ssh-agent
View start-sshagent
$ gcm start-sshagent | fl
Name : start-sshagent
CommandType : Function
Definition :
if($env:SSH_AGENT_PID) { echo "ssh-agent running"; return }
$private:gp = get-gitbinpath
if($private:gp) {
$private:out = & (join-path $private:gp "ssh-agent")
You can’t perform that action at this time.