Skip to content

Instantly share code, notes, and snippets.

@natekford
natekford / ToggleMuteMicrophone.ahk
Last active November 1, 2025 06:15
Toggle mute via Windows for a microphone using AHK v2.
#Requires AutoHotkey v2+
#SingleInstance Force
global MIC := "FIFINE T669"
SetTray(SoundGetMute(, MIC))
SetTimer(CheckExes, 1000)
*F24::ToggleMuteAndNotify()
*F23::SetMuteAndNotify(1)
@natekford
natekford / GenerateContainsQuery.cs
Last active December 26, 2021 23:18
Why is searching for an arbitrary number of strings so hard in Google Sheets?
using System.Text;
const string SHEET = "Notes";
const char COLUMN_START = 'A';
const char COLUMN_END = 'D';
const int ROW = 2;
var formula = new StringBuilder($"= QUERY(\n\t{SHEET}!{COLUMN_START}{ROW}:{COLUMN_END},\n\t\"select ");
formula.AppendJoin(", ", Enumerable.Range(COLUMN_START, COLUMN_END - COLUMN_START + 1).Select(x => (char)x));
formula.Append(" where 1=1\"\n");
@natekford
natekford / DiscordProfileGifResizer.bat
Last active February 26, 2018 00:40
Discord gif profile picture resizer
@echo off
set "filters=fps=30,scale=120:120:force_original_aspect_ratio=increase:flags=lanczos"
set "input="%~1""
set "output="%~dp1Output - %~n1.gif""
ffmpeg -y -i %input% -vf %filters%,palettegen -f image2pipe pipe:1 | ffmpeg -y -i %input% -f image2pipe -i pipe:0 -filter_complex %filters%[x];[x][1:v]paletteuse %output%
echo Saved to %output%