Skip to content

Instantly share code, notes, and snippets.

View jaredcnance's full-sized avatar

Jared Nance jaredcnance

  • Amazon Web Services
  • Seattle
View GitHub Profile
@jaredcnance
jaredcnance / cd-alias.ps1
Created May 16, 2018 17:12
Powershell 'cd' alias
# usage: . ./cd-alias.ps1
# cd ..
function CheckLastExitCode {
param ([int[]]$SuccessCodes = @(0), [scriptblock]$CleanupScript=$null)
if ($SuccessCodes -notcontains $LastExitCode) {
$msg = "EXE RETURNED EXIT CODE $LastExitCode"
throw $msg
}
}
@jaredcnance
jaredcnance / boxstarter.ps1
Created July 7, 2018 15:27 — forked from bitcrazed/boxstarter.ps1
Boxstarter script
# Description: Boxstarter Script
# Author: Rich Turner <rich@bitcrazed.com>
# Last Updated: 2017-06-07
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
# start http://boxstarter.org/package/nr/url?<URL-TO-RAW-GIST>
#---- TEMPORARY ---
Disable-UAC
@jaredcnance
jaredcnance / ProjectPackageSwitchExample.props
Last active August 8, 2018 17:57
Example for switching between Package and Project References
<!--
export WORKSPACE_PATH=~/dev
- figure out if it is possible to create delimited lists in msbuild properties
e.g. export WORKSPACE_PROJECT_PATHS=~/dev/Bar/src/Bar.csproj;~/dev/Foo/Foo.csproj
-->
<PropertyGroup>
<JsonApiDotNetCoreRelativePath>/JsonApiDotNetCore/src/JsonApiDotNetCore.csproj<JsonApiDotNetCoreRelativePath>
</PropertyGroup>