Skip to content

Instantly share code, notes, and snippets.

@michaeltlombardi
michaeltlombardi / CustomTypeExample.psd1
Created November 2, 2023 14:26
PowerShell module with accelerated and usable custom types.
@{
RootModule = 'CustomTypeExample.psm1'
ModuleVersion = '0.1.0'
GUID = '2779fa60-0b3b-4236-b592-9060c0661ac2'
Author = 'mikey'
CompanyName = 'Unknown'
Copyright = '(c) mikey. All rights reserved.'
FunctionsToExport = @(
'New-AcceleratedClass'
'New-UsableClass'
@jimbrig
jimbrig / iOS Shortcuts Catalog.md
Created October 27, 2023 21:31 — forked from brucebentley/iOS Shortcuts Catalog.md
This is a public resource designed to help people get started with Siri Shortcuts & the Shortcuts app. It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.

Bruce's iOS Shortcut Catalog

Hello and welcome to my Shortcuts Catalog!

This is a public resource designed to help people get started with Siri Shortcuts and the Shortcuts app.

It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.

Enjoy!

@jimbrig
jimbrig / edge-search-engine-export-import.js
Created October 25, 2023 18:27 — forked from karlmayer/edge-search-engine-export-import.js
Edge browser search engine export & import function
// export search engines
// based on https://superuser.com/a/1626575
// visit edge://settings/searchEngines, run in Developer Tools (F12)
(function exportSEs() {
// auxiliary function to download a file with the exported data
function downloadData(filename, data) {
const file = new File([data], { type: 'text/json' });
const elem = document.createElement('a');
elem.href = URL.createObjectURL(file);
elem.download = filename;
@HeyItsGilbert
HeyItsGilbert / resume.json
Last active August 22, 2025 23:35
resume.json
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"meta": {
"version": "v1.0.0",
"canonical": "https://github.com/jsonresume/resume-schema/blob/v1.0.0/schema.json",
"theme": "elegant"
},
"basics": {
"name": "Gilbert Sanchez",
"label": "Señor Systems Engineer",
@murrahjm
murrahjm / gist:b2a7af0b54583342579b6445bde81afc
Created October 19, 2023 15:41
Sample template for writing ansible modules in Powershell 7 for use on linux and windows
#!/usr/bin/pwsh
#WANT_JSON
#sample module for using powershell core instead of python for module code
#biggest different is that the legacy windows powershell functions are not available
#example uses a 'main' function as the primary executing code, providing parameter validation and error handling in a powershell-y way
$ErrorActionPreference = "Stop"
$ProgressPreference = "SilentlyContinue"
@Sp5rky
Sp5rky / wingetinstall.ps1
Created October 7, 2023 00:32
Winget Installation
# Fetch the URI of the latest version of the winget-cli from GitHub releases
$latestWingetMsixBundleUri = $(Invoke-RestMethod https://api.github.com/repos/microsoft/winget-cli/releases/latest).assets.browser_download_url | Where-Object { $_.EndsWith('.msixbundle') }
# Extract the name of the .msixbundle file from the URI
$latestWingetMsixBundle = $latestWingetMsixBundleUri.Split('/')[-1]
# Show a progress message for the first download step
Write-Progress -Activity 'Installing Winget CLI' -Status 'Downloading Step 1 of 2'
# Temporarily set the ProgressPreference variable to SilentlyContinue to suppress progress bars
@craigloewen-msft
craigloewen-msft / autoMemoryReclaim.sh
Created September 18, 2023 20:01
Auto memory reclaim shell script
#!/bin/bash
# Put under /etc/autoMemoryReclaim.sh
# set variables at the top
low_cpu_usage=50 # Note: We work with integer percentages (e.g., 50%)
idle_time=2 # Minutes
cached_memory_limit=1000 # MB
percent_memory_to_reclaim=5 # Percentage as an integer
wait_period=3
@manzt
manzt / my-ts-monorepo.md
Last active October 22, 2025 14:45
A minimal setup for TypeScript monorepo libraries

My Minimal TypeScript Monorepo Setup for ESM Libraries

After a deep dive looking up best practices for TypeScript monorepos recently, I couldn't find anything that suited my needs:

  1. Publish individual (typed) packages to NPM with minimal config.
  2. Supports fast unit testing that spans the entire project (e.g., via Vitest)
  3. Ability to have an interactive playground to experiment with the API in a real-time (e.g., via Vite)

Most solutions point to TypeScript project references,

@asheroto
asheroto / Get-OSInfo.ps1
Last active October 30, 2025 01:13
Get-OSInfo is a PowerShell function that retrieves key details about the Windows OS, including Release ID, Display Version, Name, Type (Workstation/Server), Numeric Version, Edition ID, Version (an object that includes major, minor, and build numbers), and Architecture (OS architecture, not processor architecture).
function Get-OSInfo {
<#
.SYNOPSIS
Retrieves detailed information about the operating system version and architecture.
.DESCRIPTION
This function queries both the Windows registry and the Win32_OperatingSystem class to gather comprehensive information about the operating system. It returns details such as the release ID, display version, name, type (Workstation/Server), numeric version, edition ID, version (object that includes major, minor, and build numbers), and architecture (OS architecture, not processor architecture).
.EXAMPLE
Get-OSInfo
@Aetopia
Aetopia / Get-SCEWIN.ps1
Created August 16, 2023 13:46
Get the latest version of SCEWIN.
& {
Add-Type -AssemblyName System.Web.Extensions
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.Web.Script.Serialization.JavaScriptSerializer]$JavaScriptSerializer = New-Object System.Web.Script.Serialization.JavaScriptSerializer
[System.Net.WebClient]$WebClient = New-Object System.Net.WebClient
$WebClient.Headers.Add("user-agent", "request")
$WebClient.DownloadFile(($JavaScriptSerializer.DeserializeObject(
$WebClient.DownloadString(
"https://api.github.com/repos/dscharrer/innoextract/releases/latest"