This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$random = [System.Security.Cryptography.RandomNumberGenerator]::Create(); | |
$buffer = New-Object byte[] 32; | |
$random.GetBytes($buffer); | |
[BitConverter]::ToString($buffer).Replace("-", [string]::Empty); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[core] | |
excludesfile = ~/.gitignore | |
autocrlf = input | |
editor = ~/tools/sublime_text_3/sublime_text | |
[user] | |
name = Daniel Fisher | |
email = info@lennybacon.com | |
[push] | |
default = tracking | |
[http] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$tfsUrl = "https://domain.tld/"; | |
$tfsCollection = "DefaultCollection"; | |
$tfsProject = "projectName"; | |
$nugetSourceName = "Libraries"; | |
$nugetFeedUrl = "$tfsUrl/$tfsCollection/_packaging/Libraries/nuget/v3/index.json"; | |
$nugetUserName = "TfsBuild"; | |
$nugetPassword = "*******"; | |
$ErrorActionPreference="Stop"; | |
If(-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent() ).IsInRole( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set WshShell = CreateObject("WScript.Shell") | |
InputBox "Windows Product Key", "Product Key", ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId")) | |
Set WshShell = Nothing | |
Function ConvertToKey(Key) | |
Const KeyOffset = 52 | |
i = 28 | |
Chars = "BCDFGHJKMPQRTVWXY2346789" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ==UserStyle== | |
@name IETF Dark | |
@namespace https://gist.github.com/lennybacon | |
@version 1.0.1 | |
@description Dark theme for IETF | |
@author lennybacon | |
@homepageURL https://gist.github.com/lennybacon/aa4b520e6a04e17c820b70fca793db6a | |
@updateURL https://gist.githubusercontent.com/lennybacon/aa4b520e6a04e17c820b70fca793db6a/raw/355f11c3c3f4e4aa2103e2fe9754d61f41e07ced/ietf-dark.css | |
@license CC-BY-SA-4.0 | |
==/UserStyle== */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html{ | |
background-color: #343434; | |
font-size: 14px; | |
color: #404040; | |
} | |
body{ | |
width:700px; | |
background-color: #e6e6e6; | |
margin: auto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ==UserStyle== | |
@name JSONView Dark | |
@namespace https://gist.github.com/lennybacon | |
@version 1.0.1 | |
@description Dark theme for JsonView Extension | |
@author lennybacon | |
@homepageURL https://gist.github.com/lennybacon/cb700cee27601e7473dd | |
@updateURL https://gist.githubusercontent.com/lennybacon/cb700cee27601e7473dd/raw/7cfb8b250a8067122a0f138e4f00ab463b9d59d4/userstyle_jsonview.css | |
@license CC-BY-SA-4.0 | |
==/UserStyle== */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Host "Update Visual Studio Installer" -ForegroundColor Cyan | |
# [Microsoft Developer community](https://developercommunity.visualstudio.com/content/problem/307261/unattend-self-update-of-vs-installer.html) | |
$vsCommunityDownloadUrl = "https://download.visualstudio.microsoft.com/download/pr/8a973d5d-2ccb-428c-8204-290a15d30e2c/be8c694b12879a8f47f34369d55d453c/vs_community.exe"; | |
$vsSetupDirectory = "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Setup" | |
$vsCommunitySetupPath = "$vsSetupDirectory\vs_community.exe"; | |
if((Test-Path -Path $vsSetupDirectory) -eq $false){ | |
$r = md $vsSetupDirectory | |
} | |
if((Test-Path -Path $vsCommunitySetupPath) -eq $false){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Disable-CodeAnalysis(){ | |
ForEach ($project in $dte.Solution.Projects) { | |
Set-CodeAnalysis($project, $false) | |
} | |
} | |
function Enable-CodeAnalysis(){ | |
ForEach ($project in $dte.Solution.Projects) { | |
Set-CodeAnalysis($project, $true) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#@ template debug="false" hostspecific="true" language="C#" #> | |
<#@ output extension=".g.cs" #> | |
<#@ assembly name="EnvDTE" #> | |
<#@ assembly name="System.Text.Json" #> | |
<#@ assembly name="System.Memory" #> | |
<#@ assembly name="netstandard" #> | |
<#@ import namespace="System.IO" #> | |
<#@ import namespace="System.Net" #> | |
<#@ import namespace="System.Text.Json" #> | |
<# |
NewerOlder