Skip to content

Instantly share code, notes, and snippets.

View jakenuts's full-sized avatar

James White jakenuts

View GitHub Profile
@jakenuts
jakenuts / Klamath_Plutons.kml
Created November 13, 2024 17:56
KlamathPlutons
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>Klamath Plutons</name>
<description>Pre- and Post-amalgamation plutons in the Klamath region</description>
<!-- Style for Pre-amalgamation plutons -->
<Style id="preAmalgamation">
<IconStyle>
<color>ff0000ff</color>
@jakenuts
jakenuts / RemoveVolute.ps1
Created June 25, 2024 20:54
Removing NhNotifySys & Volute crapware
get-process *nahimic* | Stop-Process -Force
Start-Sleep -Milliseconds 750
Get-Service *nahimic* | Stop-Service -Force
Start-Sleep -Milliseconds 750
Get-Service *nahimic* | Set-Service -StartupType Disabled
get-process *A-Volute* | Stop-Process -Force
Start-Sleep -Milliseconds 750
Get-Service *A-Volute* | Stop-Service -Force
Start-Sleep -Milliseconds 750
@jakenuts
jakenuts / stop-retaining-builds.ps1
Created January 22, 2024 06:12
Delete Old Azure DevOps Builds (One or more builds associated with the requested pipeline(s) are retained by a release. The pipeline(s) and builds will not be deleted)
# https://tenbulls.co.uk/2020/03/25/delete-old-build-definitions-in-azure-devops/
$personalToken = "askjxlkasjxlkasjxsajkxj"
$token = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$($personalToken)"))
$header = @{authorization = "Basic $token"}
$organization = "retracement"
$project = "ACME%20Corp"
#all build definitions
$url = "https://dev.azure.com/$organization/$project/_apis/build/definitions?api-version=6.0-preview.7"
@jakenuts
jakenuts / Format-UrlAcl.ps1
Created December 1, 2023 07:00
A powershell script that calls 'netsh http show urlacl' and formats the url, user, listen and deletgate fields into a table.
# Function to parse the 'netsh http show urlacl' output and format it into a table
function Format-UrlAcl {
# Execute the 'netsh http show urnetsh http show urlacllacl' command
$urlAclOutput =
# Initialize an array to store the formatted objects
$formattedOutput = @()
# Split the output into lines
@jakenuts
jakenuts / 1-setting-up-oh-my-posh.md
Last active January 24, 2025 03:35
Windows Terminal

omp-terminal-screenshot

Setting up OhMyPosh

  1. Install latest Windows Terminal

    winget install --id Microsoft.WindowsTerminal -e
    
    

Running SQL Server in Container

Prereqs:

  • Docker Desktop
  • Windows Terminal (for cmdline on Windows and WSL)
  • WSL2

@jakenuts
jakenuts / vscode-tricks.md
Last active May 20, 2023 22:52
vs-code tips

VS Code Tricks

Always open in Markdown Preview

//-------- Markdown --------        
"workbench.editorAssociations": {
    "*.md": "vscode.markdown.preview.editor" 
 }, 
@jakenuts
jakenuts / OMFG-VsCode-Typescript-Webpack-Debug-launch.json
Created May 19, 2023 04:32
OMFG VsCode Typescript Subfolder Debug
{
"version": "0.2.0",
"configurations": [
{
"type": "msedge",
"request": "launch",
"name": "Launch Edge",
"url": "https://altadmin.dealervision.local/photoadmin/Backgrounds/Manager/54",
"preLaunchTask": "npm: watch",
"webRoot": "${workspaceFolder}/../wwwroot/",
@jakenuts
jakenuts / PipelineTriggers.md
Last active May 18, 2023 17:59
Azure Devops Snippets
@jakenuts
jakenuts / vue-component.vue
Created May 6, 2023 03:00
Code Templates
<template>
<div ref="fooDiv" @click="onClicked">Hello {{ counter }} Clicks</div>
</template>
<script setup lang="ts" >
import { defineProps, ref, onMounted } from 'vue';
const props = defineProps<{ foo?: number }>();
const emit = defineEmits<{ (e: 'update:clicks', clicks: number): void }>();
const counter = ref<number>(props.foo ?? 0);