Skip to content

Instantly share code, notes, and snippets.

View ctolkien's full-sized avatar
👋

Chad Tolkien ctolkien

👋
View GitHub Profile
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
# $env:AZ_ENABLED = $true
@ctolkien
ctolkien / omp.json
Created November 4, 2021 00:58
jandedobbeleer.omp.json
{
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "session",
"style": "diamond",
"foreground": "#ffffff",
name: DotNet
on: [pull_request]
jobs:
format:
runs-on: ubuntu-latest
name: Format
steps:
- uses: actions/checkout@v2
@ctolkien
ctolkien / extensions.vsext
Created January 29, 2019 22:38
List of my Visual Studio Extensions, install with the VS Extension Manager
{
"id": "031d2246-f34f-4ef0-8372-1cf4dee3f03a",
"name": "My Visual Studio extensions",
"description": "A collection of my Visual Studio extensions",
"version": "1.0",
"extensions": [
{
"name": ".ignore",
"vsixId": "7ac24965-ea21-4108-9cac-6e46394aaaef"
},
@ctolkien
ctolkien / SSMS17and17-HiDPI.ps1
Created July 6, 2018 04:34 — forked from NickCraver/SSMS17and17-HiDPI.ps1
PowerShell: SSMS 16 & 17 HiDPI Enable
$xml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"><asmv3:application><asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"><dpiAware>True</dpiAware></asmv3:windowsSettings></asmv3:application><dependency><dependentAssembly><assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" /></dependentAssembly></dependency><dependency><dependentAssembly><assemblyIdentity type="win32" name="debuggerproxy.dll" processorArchitecture="X86" version="1.0.0.0"></assemblyIdentity></dependentAssembly></dependency></assembly>';
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide" -Name PreferExternalManifest -Value 1 -Type DWord;
$ssms16 = "C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\Ssms.exe";
if ((
@ctolkien
ctolkien / gist:2bca8a7eac9a4c3cba5ccbbcb45e5ac9
Created July 3, 2018 01:55
Git Remove Branches Merged Upstream
function Git-RemoveBranchesMergedUpStream {
git fetch -p | git remote prune origin | git branch -vv |
select-string ": gone]" |
ForEach-Object { $_.Line.Substring(2, $_.Line.IndexOf(' ', 2)) } |
ForEach-Object { git branch -d $_ }
}
@ctolkien
ctolkien / .editorconfig
Created May 7, 2018 23:38 — forked from NickCraver/.editorconfig
Stack Overflow's .editorconfig
# editorconfig.org
root = true
# Don't use tabs for indentation.
[*]
indent_style = space
[*.less]
charset = utf-8
end_of_line = lf
@ctolkien
ctolkien / AppVeyorReleaseBits.ps1
Created May 22, 2017 00:21
Release bits for AppVeyor
if ($env:APPVEYOR_REPO_TAG -eq $true -and $env:APPVEYOR_REPO_TAG_NAME -match "^v\d+\.\d+\.\d+(-(?<prerelease>[\w\d]+))?$")
{
$env:TaggedForRelease = $true
$env:TaggedForPreRelease = $matches.prerelease -ne $null
$relName = if ($env:TaggedForPreRelease) { "PreRelease" } else { "Release" }
Add-AppveyorMessage "Tagged For $($relName): $($env:APPVEYOR_REPO_TAG_NAME)" -details $env:APPVEYOR_REPO_COMMIT
Update-AppveyorBuild -Version "$env:APPVEYOR_REPO_TAG_NAME".Substring(1)
}
@ctolkien
ctolkien / AppVeyorReleaseTagging.ps1
Created May 8, 2017 10:22
AppVeyorReleaseTagging
if ($env:APPVEYOR_REPO_TAG -eq $true -and $env:APPVEYOR_REPO_TAG_NAME -match "^v\d+\.\d+\.\d+(-(?<prerelease>[\w\d]+))?$")
{
$env:TaggedForRelease = $true
$env:TaggedForPreRelease = $matches.prerelease -ne $null
$relName = if ($env:TaggedForPreRelease) { "PreRelease" } else { "Release" }
Add-AppveyorMessage "Tagged For $($relName): $($env:APPVEYOR_REPO_TAG_NAME)" -details $env:APPVEYOR_REPO_COMMIT
Update-AppveyorBuild -Version "$env:APPVEYOR_REPO_TAG_NAME".Substring(1)
}
class Car
{
string Name {get; set;}
string Colour {get; set;}
DateTime Manufactured {get; set;}
}
//----------------
var car = myApiClient.Cars.Get(123);