Skip to content

Instantly share code, notes, and snippets.


Ꮹανiη Ꮐaмвoα protrolium

View GitHub Profile
protrolium /
Created Aug 13, 2022
jq commands and syntax

Remove sections of a string, filtering out all that contain "RT"

cat tweets.json | jq '.[].text | select(contains("RT") | not)'

protrolium /
Last active May 28, 2022
using ghostscript to compress PDF filesize

$ gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook \ -dNOPAUSE -dBATCH -dColorImageResolution=150 \ -sOutputFile=output.pdf someBigFile.pdf

protrolium /
Created May 16, 2022
working command for turning dir of jpegs into pdf

$ img2pdf --first-frame-only *.jpg -o document.pdf

protrolium /
Last active Dec 7, 2021
ways of clearing local hd of unwanted storage build-up

tmutil listlocalsnapshotdates / |grep 20|while read f; do tmutil deletelocalsnapshots $f; done

Wait until it's done deleting the local snapshots. Restart your computer and it will create a new local snapshot.


tmutil listlocalsnapshots /

and with


GCP Cloudshell

$ gcloud projects list

troubleshoot ssh
$ gcloud alpha compute ssh "tikapi" --zone=us-west2-a --troubleshoot

$ gcloud compute config-ssh

initialize configuration

protrolium /
Last active Jul 29, 2022
various keyboard shortcuts for controlling Bitwig Studio DAW

Bitwig Studio Keyboard Shortcuts

1-5 - Tools
ctrl + enter - commander
0 - deactivate clip (Toggle Active)
b - insert from library
shift + f - follow playhead
/ - toggle adaptive beat grid


protrolium /
Last active Jun 11, 2021
reference sheet for python / virtual environments / jupyter notebooks

find all virtual environments

find ~ -type f -name "activate" -exec egrep -l nondestructive /dev/null {} \; 2>/dev/null

alternative (more broad):
find ~ -d -name "site-packages" 2>/dev/null

protrolium /
Last active Jul 17, 2021
Troubleshooting why Jupyter notebook wasn't finding installed python packages

Tried creating and installing needed packages into a virtual python environment, but Jupyter notebook would still throw Module not found errors, even after pip, pip3 on base installation, as well as pip, pip3 install method into the virtual environment.

conda create -n my-conda-env         # creates new virtual env
source activate my-conda-env         # activate environment in terminal
conda install jupyter                # install jupyter + notebook
jupyter notebook                     # start server + kernel

To solve, in jupyter notebook, run:


TiddlyWiki: Getting Started with digital gardens, networked thinking and non-linear research

4 April 2021
Gavin Gamboa


We will be diving into the Tiddlywiki framework (TW), which is an open-source tool great for compiling notes, research, bookmarking, and making non-linear and personalized knowledge maps. In my case I used it to build a virtual portfolio and bookcase for logging my reading notes and keeping track of my projects.


protrolium /
Last active Mar 5, 2021
rename command utility

rename | syntax and examples

brew install rename
to install

rename "s/SEARCH/REPLACE/g" *

This will replace the string SEARCH with REPLACE in every file (that is, *). The /g means global, so if you had a SEARCH_SEARCH.jpg, it would be renamed REPLACE_REPLACE.jpg. If you didn't have /g, it would have only done substitution once, and thus now named REPLACE_SEARCH.jpg. If you want case-insensitive, add /i (that would be, /gi or /ig at the end).