Skip to content

Instantly share code, notes, and snippets.


Ash Furrow ashfurrow

View GitHub Profile
ashfurrow / Fresh macOS
Last active Aug 9, 2021
All the stuff I do on a fresh macOS Installation
View Fresh macOS

Apps to install from macOS App Store:

  • Pastebot
  • GIF Brewery
  • Slack
  • Keynote/Pages/Numbers
  • 1Password
  • OmniFocus 3
  • Airmail 3
  • iA Writer
View remove_old_followers.rb
# Remove old followers
account = Account.find(1) # that's me babey
scope = account.followers.eager_load(:account_stat).reorder(nil)
scope.merge! Account.by_recent_status
scope.merge! Account.local
scope.merge! AccountStat.where(last_status_at: nil).or(AccountStat.where(AccountStat.arel_table[:last_status_at].lt(6.months.ago)))
scope.count # 13146
View Mastodon cleanup
View periodic instance downtime

Database looks fine. Ends with this:

{"log":"LOG:  could not send data to client: Broken pipe\n","stream":"stderr","time":"2020-04-01T21:09:16.86734608Z"}
{"log":"FATAL:  connection to client lost\n","stream":"stderr","time":"2020-04-01T21:09:16.867349505Z"}
{"log":"FATAL:  canceling authentication due to timeout\n","stream":"stderr","time":"2020-04-01T21:09:16.867352182Z"}
{"log":"FATAL:  canceling authentication due to timeout\n","stream":"stderr","time":"2020-04-01T21:09:16.867354895Z"}
{"log":"FATAL:  canceling authentication due to timeout\n","stream":"stderr","time":"2020-04-01T21:09:16.867357632Z"}
ashfurrow / user stats.csv
Last active Mar 17, 2020
Historical user stats from
View user stats.csv
Date Collected Logged in with 1 week Logged in with 2 weeks
May 31, 2017 262 322
Jul 2, 2017 303 442
Aug 5, 2017 227 321
Sep 2, 2017 208 289
Oct 3, 2017 231 285
Nov 1, 2017 212 433
Dec 5, 2017 242 302
Jan 7, 2018 316 400
Feb 4, 2018 262 314
ashfurrow / gist:5976579
Last active Feb 29, 2020
Image Blurring – Accelerate vs. CoreImage
View gist:5976579

1.3MB png 640x1136

  • Accelerate 179ms every time
  • CoreImage 298ms first time 147ms subsequent times @1x scale
  • CoreImage 262ms first time 126ms subsequent times @0.5x scale
  • CoreImage 260ms first time 118ms subsequent times @0.25x scale

(Lower on 0.5x probably because of whole number for blur radius)

View Goodbye.ts
// Hope you had a nice day!
ashfurrow / convert.rb
Created Feb 18, 2019
Converting TextExpander Exports to macOS shortcuts
View convert.rb
# Instructions:
# Go to and download all the CSVs into the same directory as this script.
# TextExpander's Export doesn't produce valid CSV files (lol) so make sure to open them with Numbers and re-export them.
require 'csv'
plist = <<~PLIST
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
View May 12 2018 Outage

May 12 2018 Intermittent Outage Retrospective

On May 12, for about five hours in the afternoon EDT, experienced intermittent outages, lasting from twenty seconds to five minutes. The outages were caused in the course of an investigation into a failure to backup the database. The database is fine, and turned out that the backup method itself wasn't working properly.


March 10, 2018: I upgrade the instance to Mastodon 2.3.0, from 2.1.x. After the upgrade, I notice Sidekiq keeps segfaulting and dropping jobs. I investigate and open an issue, which is later resolved. However, in the process of investigation, I upgrade my host's Docker version.

May 12, 2018, Around Noon EDT: I notice that local backups are not nearly as large as they should be. The offsite backups on S3 indicate the problem started on the March 11. I reproduce the failure to run pg_dump, which hangs every time. It gets stuck around the same table