Skip to content

Instantly share code, notes, and snippets.

View mimicscott's full-sized avatar

SuS Scott Goodwin mimicscott

View GitHub Profile
@mimicscott
mimicscott / slmgr.bat
Last active October 20, 2024 10:42 — forked from cchitsiang/slmgr.bat
Reset Windows Activation to pre-key state
:: Open a command prompt as an Administrator.
:: Enter slmgr /upk and wait for this to complete. This will uninstall the current product key from Windows and put it into an unlicensed state.
:: Enter slmgr /cpky and wait for this to complete. This will remove the product key from the registry if it's still there.
:: Enter slmgr /rearm and wait for this to complete. This is to reset the Windows activation timers so the new users will be prompted to activate Windows when they put in the key
slmgr /upk
pause
slmgr /cpky
pause
@mimicscott
mimicscott / NuGet Snippets.md
Last active August 21, 2024 19:36
NuGet Snippets.md

NuGet.exe option dotnet option MSBuild equivalent option Description -UseLockFile --use-lock-file RestorePackagesWithLockFile Opts into the usage of a lock file. -LockedMode --locked-mode RestoreLockedMode Enables locked mode for restore. This is useful in CI/CD scenarios where you want repeatable builds. -ForceEvaluate --force-evaluate RestoreForceEvaluate This option is useful with packages with floating version defined in the project. By default, NuGet restore will not update the package version automatically upon each restore unless you run restore with this option. -LockFilePath --lock-file-path NuGetLockFilePath Defines a custom lock file location for a project. By default, NuGet supports packages.lock.json at the root directory. If you have multiple projects in the same directory, NuGet supports project specific lock file

@mimicscott
mimicscott / bootstrapwindows10.ps1
Created March 12, 2024 07:39 — forked from zloeber/bootstrapwindows10.ps1
Boxstarter Windows 10 Configuration
<#
The command to run, built from the raw link of this gist
Win+R
iexplore http://boxstarter.org/package/url?<RAW GIST LINK>
OR (if you don't like the way the web launcher force re-installs everything)
@mimicscott
mimicscott / boxstarter-bare-v3.ps1
Created March 2, 2024 06:28 — forked from flcdrg/boxstarter-bare-v3.ps1
My BoxStarter Scripts
# 1. Install Chocolatey
<#
Set-ExecutionPolicy RemoteSigned -Force
# Create empty profile (so profile-integration scripts have something to append to)
if (-not (Test-Path $PROFILE)) {
$directory = [IO.Path]::GetDirectoryName($PROFILE)
if (-not (Test-Path $directory)) {
New-Item -ItemType Directory $directory | Out-Null
}
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.AspNetCore.StaticFiles;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Nuke.Common;
using Nuke.Common.IO;
using Nuke.Common.Tools.GitHub;
@mimicscott
mimicscott / jenkins_delete_builds.groovy
Created January 15, 2021 19:50 — forked from kumbasar/jenkins_delete_builds.groovy
Jenkins - Delete old builds script
MAX_BUILDS = 10 // max builds to keep
def jobs = Jenkins.instance.items;
for (job in jobs) {
println "Job: " + job.name
try {
if(job instanceof jenkins.branch.MultiBranchProject) {
println "Multibranch"
job = job.getJob("master")
@mimicscott
mimicscott / mimicPerforce.groovy
Last active December 9, 2020 04:39 — forked from guykisel/riotPerforce.groovy
simplified jenkins p4-plugin wrapper
import groovy.transform.Field
// we want this to be global so that we can consistently
// sync the same changelist over the course of our pipeline
@Field currentChangelist = ''
def riotP4Sync(Map config = [:]) {
def humanReadableName = safePath("${JOB_NAME}-${STAGE_NAME}")
def jenkinsWorkspaceName = safePath("${JOB_NAME}-") + workspaceShortname(env.STAGE_NAME)