Skip to content

Instantly share code, notes, and snippets.

View ryanwjackson's full-sized avatar

Ryan ryanwjackson

  • Paid
  • San Francisco, CA
View GitHub Profile
@ryanwjackson
ryanwjackson / gh
Created May 14, 2026 19:33
gh shim: caches cmux PR polling to survive GitHub's 5000/hr GraphQL rate limit
#!/bin/bash
# ============================================================================
# gh wrapper — caches cmux's PR-polling calls to survive GitHub's 5000/hr cap
# ============================================================================
#
# WHY THIS EXISTS
# ---------------
# The cmux terminal multiplexer (/Applications/cmux.app) has a native Swift
# TabManager poller that continuously runs `gh pr checks` and `gh pr list`
# for every PR and branch in its sidebar — selected workspace every ~5s,
@ryanwjackson
ryanwjackson / copyable.html
Created February 9, 2021 15:01
Copyable text element
<html>
<head>
<style>
.copyable {
display: inline-block;
padding: 4px;
border-radius: 4px;
border: 1px solid #ccc;
}
class ImagemagickAT6 < Formula
desc "Tools and libraries to manipulate images in many formats"
homepage "https://www.imagemagick.org/"
# Please always keep the Homebrew mirror as the primary URL as the
# ImageMagick site removes tarballs regularly which means we get issues
# unnecessarily and older versions of the formula are broken.
url "https://dl.bintray.com/homebrew/mirror/imagemagick%406-6.9.8-10.tar.xz"
mirror "https://www.imagemagick.org/download/ImageMagick-6.9.8-10.tar.xz"
sha256 "8fc268f6e1bc514b41620e0f3f6c5dd33bfc5169db679e9a5c0455c6edd11810"
@ryanwjackson
ryanwjackson / test.rb
Last active August 31, 2017 20:20
Test
puts '1234'
@ryanwjackson
ryanwjackson / postgres_queries_and_commands.sql
Last active April 18, 2017 20:53 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'

Keybase proof

I hereby claim:

  • I am ryanwjackson on github.
  • I am ryanwjackson (https://keybase.io/ryanwjackson) on keybase.
  • I have a public key whose fingerprint is 3CFD CD47 46A8 EB8C 9C75 C5E1 7F23 995D 67A9 B320

To claim this, I am signing this object:

#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name="$inputline"
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url="$inputline"
def wrap_in_transaction
ActiveRecord::Base.transaction do
current_account.with_lock('FOR UPDATE') do
begin
yield
ensure
raise ActiveRecord::Rollback
end
end
end