Skip to content

Instantly share code, notes, and snippets.

View tobyjsullivan's full-sized avatar

Toby Sullivan tobyjsullivan

View GitHub Profile
@tobyjsullivan
tobyjsullivan / .zshrc
Last active April 1, 2025 19:29
.zshrc
# share history across sessions
setopt inc_append_history
setopt share_history
# Setup tab completion
autoload -Uz compinit
compinit
# fix opt+backspace on paths
autoload -U select-word-style
@tobyjsullivan
tobyjsullivan / TOOLING.md
Created November 29, 2024 16:48
Learn Software Dev

Learn Software Dev

A list of tools to help software engineers, new and old, get better at their craft.

This document is a work-in-progress, and currently still in its seedling stage. I hope to grow it as I remember things that have helped me. Please comment with your own suggestions.

I've decided to offer a single list, ordered from most valuable to least according to my subjective experience.

  1. https://learngitbranching.js.org/
  2. https://www.rubykoans.com/

New MacBook Checklist

Setup to adjust macbook to my personal preferences.

System Settings

General

  • About > Name: (change default hostname)

Keyboard

@tobyjsullivan
tobyjsullivan / print_pdf.md
Last active January 9, 2021 19:52
How to print any Adobe doc to PDF

How to print to PDF from Adobe Reader (on a mac)

Motivation

Adobe has introduced some obnoxious new PDF form technology which I am seeing more commonly in the wild. These PDF forms can only be used with the official Adobe Reader® software.

You will know you've hit one of these documents when you try to open a PDF in your web browser or Preview and you only see this text.

Please wait...
@tobyjsullivan
tobyjsullivan / beautifulFilesize.js
Created November 20, 2020 20:38
Format File Sizes in JavaScript
const UNITS = ['byte', 'kilobyte', 'megabyte', 'gigabyte', 'terabyte', 'petabyte'];
function beautifulFilesize(filesizeBytes) {
let unitIdx = 0;
let magnitude = filesizeBytes;
while (magnitude > 1000 && unitIdx < UNITS.length - 1) {
unitIdx++;
magnitude /= 1000.0;
}
const numberFmt = new Intl.NumberFormat('en', {
@tobyjsullivan
tobyjsullivan / adblock_comment_filter.txt
Last active July 28, 2017 00:41
Block comment sections via AdBlock
[Adblock Plus 2.0]
news.ycombinator.com##table.comment-tree
@tobyjsullivan
tobyjsullivan / abbreviateNum.js
Created May 31, 2017 00:57
Abbreviate large numbers in Javascript
// Iterated from: https://stackoverflow.com/questions/10599933/convert-long-number-into-abbreviated-string-in-javascript-with-a-special-shortn
function abbreviateNumber(value) {
let newValue = value;
const suffixes = ["", "K", "M", "B","T"];
let suffixNum = 0;
while (newValue >= 1000) {
newValue /= 1000;
suffixNum++;
}
@tobyjsullivan
tobyjsullivan / personality-insights.json
Created January 6, 2017 23:15
1 year of my own tweets, run through IBM Watson's Personality Insights service
{
"word_count": 5054,
"processed_language": "en",
"personality": [
{
"trait_id": "big5_openness",
"name": "Openness",
"category": "personality",
"percentile": 0.79548652792948,
"children": [

Keybase proof

I hereby claim:

  • I am tobyjsullivan on github.
  • I am tobyjsullivan (https://keybase.io/tobyjsullivan) on keybase.
  • I have a public key whose fingerprint is 83B7 3260 0458 4279 4822 08B3 6841 6B6A C3FD 5E88

To claim this, I am signing this object:

@tobyjsullivan
tobyjsullivan / format-preserving-scrubber.sql
Created July 6, 2016 21:23
The Worst FP-scrubber ever
select
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(