Skip to content

Instantly share code, notes, and snippets.

@shuckster
shuckster / itunes-festival.sh
Last active September 25, 2015 04:51 — forked from badboy/HOWTO.md
Download iTunes Festival streams
#!/bin/bash
#
# Download iTunes Festival streams
#
# 1. Open Wireshark, start a new Capture, filter by "http.cookie"
#
# 2. Open iTunes and play the Festival show you want
#
# 3. Look for "/auth/" items in your capture list.
@shuckster
shuckster / readme.md
Last active May 9, 2021 01:56 — forked from jb510/readme.md
Exclude vcs (git, svn, hg) and node_modules from Backblaze backups on Mac

Backblaze's bztransmit process loads a file called bzfileids.dat into RAM. This file is a list of all files Backblaze has previously uploaded, including a unique identifier for each file. On most systems, this files is under 100MB in size (paraphrased from Backblaze support rep Zack).

Mine had grown to 6GB. This means that anytime bztransmit runs, it will load this 6GB file into RAM while it is backing up. In doing so it was purging massive ammounts of memory causing behavior like Chrome (usign 10GB of memory on it's own) to hang/beachball for 30 seconds and then refresh all it's windows.

There is no way to alter this behavior once it's begun, aside from starting over with some files excluded. The index needs to be rebuilt from scratch without the excessibe file count, that also means you can't restart and "inherit" a previous backup.

In my case the biggest culprits were .git and node_modules, so I excluded those, started a new backup (transfered licnese) and spent a week hunting for fast internet I could

@shuckster
shuckster / publish.sh
Last active January 23, 2022 17:20
Publish a new version of an npm package
#!/bin/sh
#
# Publish a new version of an npm package.
#
# - Runs linter, tests
# - Asks if next version is major, minor or patch
# - Calculates the next version from this
# - Checks that the CHANGELOG references the new version
# - Tags/publishes the new version via git/npm
@shuckster
shuckster / play-youtube-playlist-in-reverse.meta.js
Last active May 21, 2023 04:58
Play a YouTube Playlist in reverse which, for most playlists, means "Play in chronological order".
// ==UserScript==
// @name Play YouTube Playlist in Reverse
// @namespace https://gist.github.com/shuckster
// @downloadURL https://gist.githubusercontent.com/shuckster/707a852599b226ec8d2591bd32cd663c/raw/play-youtube-playlist-in-reverse.user.js
// @updateURL https://gist.githubusercontent.com/shuckster/707a852599b226ec8d2591bd32cd663c/raw/play-youtube-playlist-in-reverse.meta.js
// @version 0.4
// @description Play a YouTube Playlist backwards which, for most playlists, means "play in chronological order".
// @author Conan Theobald
// @match https://www.youtube.com/*
// @grant none
@shuckster
shuckster / conker.sh
Last active October 5, 2023 07:47
Run many shell commands concurrently, up to a limit. Written before I knew about GNU parallel.
#!/bin/sh
#
# Run many shell commands concurrently, up to a limit.
#
# - Commands are specified in a file, one per line
# - Single-line comments allowed with # at the start
# - Ensure the last line of the file is empty
#
# Originally written to download NML episodes from Archive.org. I found
@shuckster
shuckster / backup-bookmarks.sh
Last active February 26, 2024 07:16
Backup Google Chrome bookmarks across all Chrome Profiles
#!/bin/sh
#
# Backup Google Chrome bookmarks across all Chrome Profiles.
# Tested on macOS, but should work on other *nix systems.
#
# Download and install:
#
# curl -s https://gist.githubusercontent.com/shuckster/a91724adf5db1897ef07a69165b40e44/raw/backup-bookmarks.sh -o ./backup-bookmarks.sh
# chmod +x ./backup-bookmarks.sh