Skip to content

Instantly share code, notes, and snippets.


Jason Rudolph jasonrudolph

View GitHub Profile
jasonrudolph /
Last active Dec 22, 2021
Sample timings and costs using various Heroku CI dyno types

Sample timings (in seconds)

Sample timings using Heroku CI for a small-ish Rails 6 app on various Heroku dyno types:

Dyno Type Run 1 Duration Run 2 Duration Run 3 Duration Average Duration
standard-1x 312 213 303 276
standard-2x 227 121 222 190
performance-m 162 164 175 167
performance-l 100 104 107 104
jasonrudolph /
Last active Apr 19, 2022
Preview Repository Redirects in the GitHub API

Repository redirects are coming to the GitHub API, and this functionality is now available for developers to preview. Let's try it out.

First, we need a repository that has been renamed or relocated. Since jasonrudolph/ was previously named jasonrudolph/, we can use it as our guinea pig. 🌍🐖

We'll use curl for all of our examples below, and we'll include the --location option to instruct curl to follow any redirects that it encounters.

The Present

Using the current production version of the GitHub API, when we attempt to [access the repository](

jasonrudolph /
Created Apr 14, 2015
Get `starred_at` timestamp for a repository's stargazers via the GitHub API
curl -H 'Accept: application/'
curl -H "Accept: application/"
jasonrudolph /
Created Apr 15, 2014
Debugging "Reference update failed" error when creating a branch via the GitHub Git Refs API
jasonrudolph /
Last active Apr 1, 2022
5 entertaining things you can find with the GitHub Search API
jasonrudolph / gist:6057563
Last active Jun 7, 2022
GitHub Search API: Get the number of stars for a repository
View gist:6057563

James Sugrue [asked][1], "@GitHubAPI is there a way to find the number of stars for a given repository?"


$ curl -ni "" -H 'Accept: application/vnd.github.preview'
# Search for code containing the term "_cache" in repositories owned by @jasonrudolph
curl -G -H "Accept: application/vnd.github.preview.text-match" \ --data-urlencode "q=@jasonrudolph _cache"
jasonrudolph /
Created Sep 21, 2012
Rough Notes from Strange Loop 2012
View snippet.rb
# A Ruby snippet posted as a comment on
# [ activable?, persisted?, new?, suspended? ]
# =============================================
combinations = [
[ false, false, false, false ],
[ false, false, true, false ],
[ false, false, false, true ],
[ false, true, false, false ],