Skip to content

Instantly share code, notes, and snippets.

View williamrowell's full-sized avatar
🙃

Billy Rowell williamrowell

🙃
View GitHub Profile
@montasaurus
montasaurus / llmc.sh
Last active April 20, 2024 21:32
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
@amiorin
amiorin / README.md
Last active May 21, 2024 18:53
How to configure Home Row Mods with KMonad on macOS

Intro

Karabiner and KMonad are great open source software. Don't forget to support the authors and contributors.

If you want to try home row mods on OSX, don't use Karabiner but KMonad. KMonad is harder at the beginning but then it is easier than Karabiner. Creating layers in KMonad is trivial and without drawbacks, while it is impossible in Karabiner without drawbacks.

You need to compile a PR of the project. Install https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice/releases/download/v2.1.0/Karabiner-DriverKit-VirtualHIDDevice-2.1.0.pkg

@merlinmann
merlinmann / sous-vide-tests.md
Last active March 17, 2023 06:16
sous vide cooking times

Sous Vide Cooking Times

Good? FOOD TIME TEMP COMMENT
CANON! pork chops, MED 1:30 143°
CANON! prime rib roast, MR 6:00 129.5 Works every time!
CANON! pork chops SUPER thick 1:45 142° solid MR+
YES ribeye, frozen, R 1:30 126° Awesome at low temp
YES thick pork chops, MR 1:30 142° SO good
XXX filet mignon, MR 1:30 130° XX
@pmbaumgartner
pmbaumgartner / docx-cli-search.md
Created July 19, 2021 15:17
Search the contents of Word docs via CLI

Search Contents of Word Documents from the Terminal

You'll need ripgrep and pandoc to get started. You can read more about ripgrep here and pandoc here. I use both of these frequently and they're quite helpful.

You can install them both with homebrew:

brew install pandoc ripgrep
@dbdness
dbdness / digispark-attiny85-mac-setup.md
Last active May 8, 2024 13:45
DigiSpark Kickstarter ATTINY85 Setup on macOS + Hello World

Digispark ATTINY85 Initial Setup on macOS + Hello World

Originally written in January 2021.

Originally written for macOS Big Sur 11.1

Step 1: Acquire a DigiSpark ATTINY85 Board

Board used for this guide is the Kickstarter version.

Step 2: Download the Arduino IDE

Version at the time of writing is 1.8.13

@sinamajidian
sinamajidian / README.md
Last active March 31, 2022 22:33
Extracting the high coverage region (as bed file) from a BAM file

A simpe code for extracting the regions with high coverage (>depth_treshold) from a bed file. The input of the code is a bed file containing rows of regions with its depth as following format

21	9424000	9424500	69.00
21	9424500	9425000	69.00
21	9425000	9425500	67.00
21	9425500	9426000	66.00
21	9426000	9426500	65.00
21	9426500	9427000	66.00
@Prukutu
Prukutu / cbar_subplot.py
Created May 20, 2020 18:37
Create a matplotlib figure with a colorbar using gridspec.
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
from numpy.random import randint
# Generate array of random values
data = randint(0,
high=100,
size=(100, 100))
# GridSpec object. second column will hold colorbar
@afrendeiro
afrendeiro / seaborn_clustermap_with_effortless_colorbars_decorator.ipynb
Last active May 14, 2020 23:56
Seaborn clustermap with effortless row and column colorbars
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@IanColdwater
IanColdwater / twittermute.txt
Last active May 23, 2024 18:37
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
# If you, like me, have all of your various source-code-like projects in ~/src/
# this is how to give yourself per-project shell history.
#
# I wish I'd done this years ago.
#
# First, in your .bashrc file, you redefine the cd, pushd and popd builtins to be "do the builtin bit,
# then do one other thing (set_src_history.sh, below) like so:
cd () {