Skip to content

Instantly share code, notes, and snippets.

@matt17r
matt17r / config.rb
Created November 2, 2023 02:56
Options to prevent overly long socket length https://github.com/ruby/debug/issues/982
# shorten user to max 20 characters
def self.create_unix_domain_socket_name_prefix(base_dir = unix_domain_socket_dir)
user = ENV['USER'] || 'UnknownUser'
user.slice![0-19]
File.join(base_dir, "ruby-debug-#{user}")
end
@matt17r
matt17r / bump.sh
Created November 18, 2021 18:00
Helper script for [Bumpr](getbumpr.com) to send emails via Gmail
#!/bin/sh
# URL encode mailto link using Perl
url="$(perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$2")"
# Then send email via one of the following Gmail accounts
# 1) Default (first logged in) Gmail/Workspace account
open -u "https://mail.google.com/mail/?extsrc=mailto&url=${url}"
@matt17r
matt17r / (Sample) Map of Shared Drive.md
Last active February 5, 2021 07:53
Generate a tree view of Google Shared Drives in Markdown format