Skip to content

Instantly share code, notes, and snippets.

@kdmurray
kdmurray / node-modules-cleanup.ps1
Created October 19, 2023 05:54
node-modules-cleanup.ps1
Get-ChildItem -Directory | ForEach-Object {
if (Test-Path "$($_.FullName)\node_modules")
{
Remove-Item "$($_.FullName)\node_modules" -Recurse -Force
}
}
@kdmurray
kdmurray / baseline-install.ps1
Created April 10, 2023 23:45
Powershell script for a baseline system install with my most commonly used applcations
#install chocolatey
Set-ExecutionPolicy AllSigned
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install chocolateygui -y
# @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
function main {
@kdmurray
kdmurray / pick
Last active April 11, 2023 00:05
/minecraft:give kdmurz netherite_pickaxe{display:{Name:'[{"text":"A Regular Pickaxe","italic":false}]'},Enchantments:[{id:efficiency,lvl:5},{id:mending,lvl:1},{id:silk_touch,lvl:1},{id:unbreaking,lvl:3}]} 1
@kdmurray
kdmurray / compare.html
Created July 30, 2021 18:07
compare.html
OLD HTML
<div class="card mb-3">
<a href="imgs/rev1/2020-06-06_18.47.26.png" title="click to open image">
<img class="card-img-top" src="imgs/rev1/2020-06-06_18.47.26.png" alt="caption">
</a>
<div class="card-body">
<h5 class="card-title">&#x1F9D1;&#x200D;&#x2696;&#xFE0F; The Trial</h5>
<h6 class="card-subtitle mb-2 text-muted">Wahrheit, _bryantkelley, assert_h, & others</h6>
<p class="card-text">A player was put on mock-trial for idling at a farm, and won their case!</p>
@kdmurray
kdmurray / organize-photos.py
Created May 17, 2015 06:26
Photo management script to move folders from a generic import location to a hierarchical set of folders organized by year and month.This script was originally written by Dr. Drang: http://www.leancrew.com/all-this/2013/10/photo-management-via-the-finder/ I've added support to detect Nikon Raw (.nef) files and to create the directories it needs i…
#!/usr/bin/python
import os, shutil
import subprocess
import os.path
from datetime import datetime
######################## Functions #########################
def photoDate(f):
@kdmurray
kdmurray / update-dns.sh
Last active December 20, 2015 13:19 — forked from mhussain/update-dns.sh
#!/bin/sh
# Modified by kdmurray from the source at https://gist.github.com/mhussain/2634050
# - Removed the comparison to the old WAN IP, forces an update each time the script is run
# - Added the touch command to an empty hidden file (~/.last-linode-ddns-refresh) to show
# when the last DDNS update took place.
LINODE_API_KEY=your-linode-api-key
DOMAIN_ID=your-domainid
RESOURCE_ID=your-domain-resourceid