Skip to content

Instantly share code, notes, and snippets.

View ryanande's full-sized avatar

Ryan Anderson ryanande

  • Accenture
  • Austin, TEXAS
View GitHub Profile
BEGIN TRY
BEGIN TRANSACTION MEDELETE
DELETE FROM --
COMMIT TRANSACTION MEDELETE
END TRY
# Description: Boxstarter Script
# Author: Ryan Anderson (ported from Jess Frazelle <jess@linux.com>)
# Last Updated: 2019-05-10
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned (or Unrestricted if you cray)
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
#The command to run, built from the raw link of this gist
#START http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/ryanande/cbd31428e548688c33ba/raw/44b9d9d4b04ec71ca938334845a98db7606243c6/boxstarter
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
Set-StartScreenOptions -EnableBootToDesktop
choco install 7zip.install -y
choco install jre8 -y
choco install linqpad -y
DECLARE @XmlFile XML
SELECT @XmlFile = BulkColumn
FROM OPENROWSET(BULK 'C:\projects\mes\build\results\MMM.MES.CoreTest.dll.xml', SINGLE_BLOB) AS x;
SELECT
--[ParentName] = Events1.value('@name', 'varchar(350)'),
--[ParentExecutionTime] = Events1.value('@time', 'decimal(10,3)'),
[Name] = Events2.value('@name', 'varchar(350)'),
@ryanande
ryanande / gitconfig.txt
Last active July 14, 2020 22:05
.gitconfig
[user]
name = Ryan Anderson
[core]
excludesfile = /Users/ryan.m.anderson/.gitignore_global
trustctime = false
editor = code --wait
[push]
default = simple
[color "status"]
changed = cyan normal bold
lg = log --graph --pretty=format:'%C(yellow)%d%Creset %C(cyan)%h%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=short --all
@ryanande
ryanande / gist:8c0d2486c6f590713131
Last active August 29, 2015 14:04
MongoDb C# GetCollection<T>() Extension method
using MongoDB.Driver;
public static class DataExtensions
{
public static MongoCollection<T> GetCollection<T>(this MongoDatabase db)
{
return db.GetCollection<T>(typeof(T).Name);
}
}