Skip to content

Instantly share code, notes, and snippets.

Public Sub InsertRangeDropdown() ' bind me to a macro key or something
Dim rangeList As String
' Adding visual separators
rangeList = "---CAPS---,F,mF,uF,nF,pF,---RES---,Ohm,KiloOhm,MegaOhm,GigaOhm"
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Formula1:=rangeList
.IgnoreBlank = True
.InCellDropdown = True
@tomfleet
tomfleet / KiCAD_CopperSpiral_v4.py
Created November 28, 2025 14:04 — forked from observative/KiCAD_CopperSpiral_v4.py
v4 with spin direction and increasing amount of segments per turn for smoother result in outer circles
import sys, os
import shutil
import math
import itertools
from copy import deepcopy
# 0 1 2 3 4 5 6
LIST_elmt = [" ("," (start ",") (end ",") "," (layer ",") ","))"]
#LIST_elmt = [" (gr_line (start 131.571908 182.314571) (end 112.874456 120.68499) (angle 90) (layer Dwgs.User) (width 0.1))"]
#LIST_elmt = [" (segment (start 118.7 106.7) (end 119.4 106.7) (width 0.25) (layer B.Cu) (net 0))"]
// ==UserScript==
// @name Google AI-less Search
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Appends "-ai" to your Google search queries to help filter out AI-generated content.
// @author You
// @match *://*.google.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
@tomfleet
tomfleet / RGBCELLS.bas
Last active May 16, 2024 00:49
Colour your excel cell backgrounds based on values.
Public Function myRGB(r, g, b)
Dim clr As Long, src As Range, sht As String, f, v
If IsEmpty(r) Or IsEmpty(g) Or IsEmpty(b) Then
clr = vbWhite
Else
clr = RGB(r, g, b)
End If
loading pri to 0x00100000
jumping to 0x00100000 ...
_____ ___. .__ .__
/ _ \ _____\_ |__ _____ _______ ____ | | | | _____
/ /_\ \ / \| __ \\__ \\_ __ \_/ __ \| | | | \__ \
/ | \ Y Y \ \_\ \/ __ \| | \/\ ___/| |_| |__/ __ \_
\____|__ /__|_| /___ (____ /__| \___ >____/____(____ /
\/ \/ \/ \/ \/ \/
@tomfleet
tomfleet / yta.sh
Created April 8, 2021 21:09
yta.sh
##!/bin/bash
# Ask the user for login details
read -p 'YouTubeMusic Link: ' uservar
read -p 'Artist? - Leave Blank to auto... ' foldName
if [-z $foldName]
then
echo "No Artist Supplied, will guess..."
foldName="%(artist)s"
baseLocation="/media/sf_Music/%(artist)s/"