Skip to content

Instantly share code, notes, and snippets.

@jimcavoli
jimcavoli / daft_prompt.bashrc
Last active June 23, 2016 19:24
Change your bash prompt to an abbreviated PWD, followed by a lyric from Daft Punk's Technologic. Works best with Powerline-patched fonts (sub out the unicode characters if you're not that cool).
bash_prompt_command() {
prompts=("buy it" "use it" "break it" "fix it" "trash it" "change it" "melt/upgrade it"\
"charge it" "pawn it" "zoom it" "press it" "snap it" "work it" "quick/erase it"\
"write it" "get it" "paste it" "save it" "load it" "check it" "quick/rewrite it"\
"plug it" "play it" "burn it" "rip it" "drag and drop it" "zip/unzip it"\
"lock it" "fill it" "curl it" "find it" "view it" "curl it" "jam/unlock it"\
"surf it" "scroll it" "pose it" "click it" "cross it" "crack it" "twitch/update it"\
"name it" "read it" "tune it" "print it" "scan it" "send it" "fax/rename it"\
"touch it" "bring it" "pay it" "watch it" "turn it" "leave it" "stop/format it")

Keybase proof

I hereby claim:

  • I am jimcavoli on github.
  • I am jimcavoli (https://keybase.io/jimcavoli) on keybase.
  • I have a public key ASBioLWHNpgxERARLG_Dto00I-2lCzxfxO6VGPuhSQjX4wo

To claim this, I am signing this object:

@jimcavoli
jimcavoli / Changelog-ruby_2_2_5-from-ruby_2_0_0.md
Created September 14, 2016 04:38
A simplified changelog extracted from ruby/ruby for version 2.0.0 to 2.2.5 upgrades

Ruby 2.0.0 to Ruby 2.2.5 NEWS-noted changes

These changes were reported in the high-level summary NEWS changelog provided by the Ruby project. They are a synthesis of changes from the NEWS logs of the changes from 2.0.0 to 2.1.0 and from 2.1.0 to 2.2.5 (there were no NEWS notes from 2.2.4 to 2.2.5 that changed). Any C API updates have been omitted, and changes have been compressed to include updates and compatibility changes for each class together. Ordering may also vary from the official NEWS changelog.

Language

@jimcavoli
jimcavoli / relation_sizes_desc.sql
Created June 17, 2018 16:57
Handy PostgreSQL maintenance queries
-- Lists the size of all relations in the current 'public' schema in descending order
SELECT
nspname||'.'||relname AS relation,
pg_size_pretty(pg_total_relation_size(nspname||'.'||relname)) as pretty_size,
pg_total_relation_size(nspname||'.'||relname) as raw_size
FROM
pg_class, pg_namespace
WHERE
relnamespace = pg_namespace.oid
AND
@jimcavoli
jimcavoli / release.yml
Created November 11, 2020 00:56
GitHub Actions workflows for custom Cloudron Apps
# Custom Cloudron App build/update workflow
#
# To use this template, ensure the following secrets
# * DOCKER_USERNAME
# * A Docker Hub account username
# * DOCKER_PASSWORD
# * The Docker Hub password for DOCKER_USERNAME
# * DOCKER_REPONAME
# * The repository belonging to DOCKER_USERNAME to push updates to
# * CLOUDRON_HOST