Skip to content

Instantly share code, notes, and snippets.

View aaronlifton's full-sized avatar

Aaron Lifton aaronlifton

View GitHub Profile
aaronlifton /
Created October 21, 2023 16:52 — forked from andersevenrud/
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s >
aaronlifton / deleteAmazonSavedItems.js
Created August 24, 2023 00:38 — forked from MichaelLawton/deleteAmazonSavedItems.js
Removes all Amazon saved for later items on the cart page. It will only remove visible items. You might want to scroll first to make more items visible. To use paste code in developer console (Ctrl+Shift+J or Cmd+Opt+J in Chrome) then press enter.
function deleteSavedItems() {
var query = document.querySelectorAll("#sc-saved-cart input[value=Delete]")
if (query.length) {
if (query.length > 1) {
else {
aaronlifton /
Created July 23, 2023 03:59 — forked from birkin/
chatGPT code-explanation example

cool chatGPT info...

Recently experimenting with rust, I wanted to convert an image to a base64 string. I got some code working via my usual mix of trying stuff and googling. There was a step between loading the image and encoding it to a base64 string that I was curious about. I'd been hearing about copilot-explain, but only have copilot installed, and wanted to move forward. But I'd also recently been experimenting with chatGPT and thought I'd heard that it could explain code. Here's the result...

My prompt...

explain this code...

fn main() {
aaronlifton / karabiner.edn
Created July 10, 2023 02:31 — forked from andrewvmail/karabiner.edn
;; my-goku
;; in hammerspoon console hs.ipc.cliInstall()
;; gokuw
;; gh gist edit d496e18751ddea5a9cb310755535389c -a karabiner.edn /Users/momo/.config/karabiner.edn
:templates {
:open "open \"%s\""
aaronlifton / nextdoor-unsubscribe.js
Last active July 22, 2023 19:49
unsubscribe from next-door emails
async function unsubscribe() {
matchingElementSet = document.evaluate("//span[text()='Email']/parent::div/following-sibling::input[contains(@aria-checked, 'true')]", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
for (let i = 0; i < matchingElementSet.snapshotLength; i++) {
await new Promise(r => setTimeout(r, 1000));
let currentEl = matchingElementSet.snapshotItem(i);
aaronlifton / s3_folder_upload.rb
Last active April 17, 2019 21:23 — forked from fleveque/s3_folder_upload.rb
Upload folder to S3 recursively with ruby, multi threads and aws-sdk v2 gem, based on
#!/usr/bin/env ruby
require 'rubygems'
require 'aws-sdk'
class S3FolderUpload
attr_reader :folder_path, :total_files, :s3_bucket, :include_folder
attr_accessor :files
# Initialize the upload class
aaronlifton / mastodon
Created November 2, 2017 06:38 — forked from skoji/mastodon
Mastodon : execute assets:precompile on a local machine.
# on the mastodon server
cd /home/mastodon/live
git checkout <release tag>
docker-compose pull && docker-compose build && docker-compose stop
# on the local machine
rsync -trzv --delete --rsync-path='sudo rsync' backup # get full backup
cd backup
docker-compose pull && docker-compose build && docker-compose run --rm web rails assets:precompile
cd ..
aaronlifton /
Created September 27, 2017 00:48
describe ec2 instances in all regions
for region in `aws ec2 describe-regions --output text | cut -f3`
echo -e "\nListing Instances in region:'$region'..."
aws ec2 describe-instances --region $region
aaronlifton /
Created September 11, 2017 20:26 — forked from d2s/
Installing Node.js for Ubuntu with nvm