Skip to content

Instantly share code, notes, and snippets.

@shuckster
shuckster / conker.sh
Last active May 12, 2022
Run many shell commands concurrently, up to a limit.
View conker.sh
#!/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 / publish.sh
Last active Jan 23, 2022
Publish a new version of an npm package
View publish.sh
#!/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 / backup-bookmarks.sh
Last active Dec 22, 2022
Backup Google Chrome bookmarks across all Chrome Profiles
View backup-bookmarks.sh
#!/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
@shuckster
shuckster / readme.md
Last active May 9, 2021 — forked from jb510/readme.md
Exclude vcs (git, svn, hg) and node_modules from Backblaze backups on Mac
View readme.md

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 / itunes-festival.sh
Last active Sep 25, 2015 — forked from badboy/HOWTO.md
Download iTunes Festival streams
View itunes-festival.sh
#!/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.