Skip to content

Instantly share code, notes, and snippets.

View riverssteve's full-sized avatar

Steve Rivers riverssteve

View GitHub Profile
@montasaurus
montasaurus / llmc.sh
Last active February 18, 2025 21:43
AI Shell Command Generator
llmc() {
local system_prompt='Output a command that I can run in a ZSH terminal on macOS to accomplish the following task. Try to make the command self-documenting, using the long version of flags where possible. Output the command first enclosed in a "```zsh" codeblock followed by a concise explanation of how it accomplishes it.'
local temp_file=$(mktemp)
local capturing=true
local command_buffer=""
local first_line=true
local cleaned_up=false # Flag to indicate whether cleanup has been run
cleanup() {
# Only run cleanup if it hasn't been done yet
@netsensei
netsensei / gist:7c71b3215bbf440746151aafc4cfd84f
Last active January 18, 2025 02:44
Setting up a PI-Hole FTL DNS on a local network

Setuping PI-Hole FTL DNS on a local network

pihole comes with it's own lightweight DNS server called FTL. It's geared towards easy of use. Even so, setting up this feature can be hard. Here are some lessons I've learned.

In this example:

  • Your network is setup on 192.168.1.0/24
  • 192.168.1.1 is your DHCP server and IP gateway. (usually your router)
  • 192.168.1.254 is the host running pi-hole
@Prakasaka
Prakasaka / bash-colors.md
Created July 25, 2020 09:14 — forked from JBlond/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@jsit
jsit / sieve.sieve
Last active November 19, 2024 23:48
Notifications / mailing lists / bulk email sieve code (for e.g. Fastmail et al.)
if
# Tests for "Mailing Lists"
anyof(
header :is "X-ME-VSCategory" "community:mailing-list",
header :contains "X-Mailer" "Sympa",
exists [
"List-Id",
"List-Help",
"List-Subscribe",
"List-Unsubscribe",
@addyosmani
addyosmani / README.md
Last active March 4, 2025 06:13 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version