Skip to content

Instantly share code, notes, and snippets.

View joeypiccola's full-sized avatar
⛰️

Joey Piccola joeypiccola

⛰️
  • Laboratory for Atmospheric and Space Physics
  • Denver, CO
View GitHub Profile
@doctaphred
doctaphred / ntfs-filenames.txt
Last active April 15, 2026 17:49
Invalid characters for Windows filenames
Information from https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file :
Use any character in the current code page for a name, including Unicode
characters and characters in the extended character set (128–255), except
for the following:
- The following reserved characters:
< (less than)
> (greater than)
rem Please set your password to Metadata of the server
@echo off
REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ServerManager" /v DoNotOpenServerManagerAtLogon >> C:\Users\Administrator\Desktop\log.txt
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ServerManager" /v DoNotOpenServerManagerAtLogon /t REG_DWORD /d 1 /f >> C:\Users\Administrator\Desktop\log.txt
REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ServerManager" /v DoNotOpenServerManagerAtLogon >> C:\Users\Administrator\Desktop\log.txt
wget http://fg.v4.download.windowsupdate.com/c/msdownload/update/software/updt/2016/09/lp_9a666295ebc1052c4c5ffbfa18368dfddebcd69a.cab -O "C:\Users\Administrator\Desktop\lp_9a666295ebc1052c4c5ffbfa18368dfddebcd69a.cab"
wget http://api.service.softlayer.com/rest/v3/SoftLayer_Resource_Metadata/UserMetadata.txt -O "C:\Users\Administrator\Desktop\UserMetadata.txt"
ECHO Start-Transcript -path "C:\Users\Administrator\Desktop\ProvScript.log" -append >>C:\Users\Administrator\Desktop\ProvScript.ps1
ECHO [System.Environment]::I
@dcasati
dcasati / export-kubeconfig-from-aks
Created February 6, 2018 15:30
Export KUBECONFIG from AKS
az aks get-credentials --resource-group k8s-demo-ss --name k8s-demo-cluster-ss --file kubeconfig-ss
@brikis98
brikis98 / main.tf
Last active March 14, 2023 23:43
A hacky way to create a dynamic list of maps in Terraform
# The goal: create a list of maps of subnet mappings so we don't have to statically hard-code them in aws_lb
# https://www.terraform.io/docs/providers/aws/r/lb.html#subnet_mapping
locals {
# These represent dynamic data we fetch from somewhere, such as subnet IDs and EIPs from a VPC module
subnet_ids = ["subnet-1", "subnet-2", "subnet-3"]
eips = ["eip-1", "eip-2", "eip-3"]
}
# Here's the hack! The null_resource has a map called triggers that we can set to arbitrary values.
# We can also use count to create a list of null_resources. By accessing the triggers map inside of
@bgelens
bgelens / Convert-PesterResultToJUnitXml.ps1
Created August 13, 2019 05:47
GitLab does not support NUnitXml as provided by Pester. Instead, it supports JUnitXml. This helper function takes the Pester output and generates a JUnitXml from it to be consumed by GitLab pipelines
function Convert-PesterResultToJUnitXml {
[CmdletBinding()]
param (
[Parameter(Mandatory)]
$PesterResult
)
$junit = '<?xml version="1.0" encoding="utf-8"?>'
$junit += "`n" + '<testsuites name="Pester" tests="{0}" failures="{1}" disabled="{2}" time="{3}">' -f @(
$PesterResult.TotalCount,
@sbinlondon
sbinlondon / synthwaveglow.md
Last active May 6, 2026 19:43
Get the synth wave glow theme working for VS Code on Mac

Get the synth wave glow working for VS Code on Mac

These notes are pretty much the same steps as the two extensions list, it's just that I had to collate them together because neither seems to list it fully in the proper order.

  1. Install Synthwave ’84/Synthwave + Fluoromachine theme on VS Code (I used the Fluoromachine one)

  2. Install Custom CSS and JS Loader

  3. Command + Shift + P to open command palette > "Preferences: Open settings (JSON)"

@albatrossflavour
albatrossflavour / auto_patch.pp
Created October 12, 2020 03:28
Example Puppet plan to patch nodes
plan profile::auto_patch_run (
String $patch_group,
Boolean $security_only = false,
Enum['always', 'never', 'patched', 'smart'] $reboot = 'patched',
){
# Query PuppetDB to find nodes that have the patch group,
# are not blocked and have patches to apply
$all_nodes = puppetdb_query("inventory[certname] { facts.pe_patch.patch_group = '${patch_group}'}")
$filtered_nodes = puppetdb_query("inventory[certname] { facts.pe_patch.patch_group = '${patch_group}' and facts.pe_patch.blocked = false and facts.pe_patch.package_update_count > 0}")