I hereby claim:
- I am jnunemaker on github.
- I am jnunemaker (https://keybase.io/jnunemaker) on keybase.
- I have a public key whose fingerprint is 2F06 D8EA 2B19 8EAB 40C2 7379 7BF1 39D1 EC76 CA82
To claim this, I am signing this object:
| <?xml version="1.0" encoding="UTF-8"?> | |
| <rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:atom="http://www.w3.org/2005/Atom/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:podcast="https://podcastindex.org/namespace/1.0" xmlns:fireside="https://fireside.fm/modules/rss/fireside" version="2.0" encoding="UTF-8"> | |
| <channel> | |
| <fireside:hostname>feed03.fireside.fm</fireside:hostname> | |
| <fireside:genDate>Mon, 15 Dec 2025 02:46:05 -0600</fireside:genDate> | |
| <generator>Fireside (https://fireside.fm)</generator> | |
| <title>The Bible in a Year (with Fr. Mike Schmitz)</title> | |
| <link>https://bibleinayear.fireside.fm</link> | |
| <pubDate>Mon, 15 Dec 2025 03:45:05 -0500</pubDate> | |
| <description>In The Bible in a Year podca |
| # Set HONEYBADGER_FOO_BAR_JOB=asdf where asdf is the check in value Honeybadger gives you. | |
| class ApplicationJob < ActiveJob::Base | |
| after_perform { |job| job.honeybadger_checkin } | |
| # Check in with Honeybadger to let us know that the job was performed | |
| # if there is an identifier configured for the job. | |
| def honeybadger_checkin | |
| identifier = honeybadger_checkin_identifier | |
| return unless identifier.present? |
| -- https://www.postgresql.org/docs/current/fuzzystrmatch.html#id-1.11.7.26.7 | |
| -- Calculates the distance between two strings. | |
| SELECT levenshtein('New York', 'New York'); -- 0 | |
| SELECT levenshtein('New York', 'New Jersey'); -- 5 | |
| SELECT levenshtein('New York', 'Dallas'); -- 8 | |
| -- find the opponent with the name closest to 'New York' | |
| SELECT * FROM opponents WHERE team_id = 1 | |
| ORDER BY levenshtein(name, 'New York') |
| diff --git a/Gemfile b/Gemfile | |
| index e3a71e1..34ba75c 100644 | |
| --- a/Gemfile | |
| +++ b/Gemfile | |
| @@ -107,3 +107,4 @@ gem "pundit" | |
| gem "rack-canonical-host" | |
| gem "ruby-readability" | |
| gem "rinku", require: "rails_rinku" | |
| +gem "virtus" | |
| diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb |
| module BoxOutSports | |
| def self.kv | |
| @kv ||= KeyValueJsonb.new(use_local_time: Rails.env.test?) { | |
| ActiveRecord::Base.connection | |
| } | |
| end | |
| end |
| # https://www.postgresql.org/docs/13/ddl-partitioning.html#DDL-PARTITIONING-DECLARATIVE | |
| class PartitionByDay | |
| class Row | |
| include Virtus.model | |
| attribute :name, String | |
| attribute :expression, String | |
| end | |
| def self.all(table) |
| # Shorcut because typing GitHub everywhere gets old | |
| SQL = GitHub::SQL | |
| module GitHub | |
| class SQL | |
| private | |
| # Overwrite interpolate to be ok with postgres casting (::regclass, etc.). | |
| def interpolate(sql, extras = nil) | |
| sql.gsub(/(:?):([a-z][a-z0-9_]*)/) do |match| |
| irb(main):001:0> require "digest" | |
| => true | |
| irb(main):002:0> Digest::SHA256.hexdigest("asdf") | |
| => "f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b" | |
| irb(main):003:0> Digest::SHA256.hexdigest("asdf").to_i(16) | |
| => 108959270400061671294053818573968651411470832267186275529291850190552309358907 | |
| irb(main):004:0> Digest::SHA256.hexdigest("asdf").to_i(16).to_s(16) | |
| => "f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b" | |
| irb(main):005:0> Digest::SHA256.hexdigest("asdf").to_i(16) % 10 | |
| => 7 |
I hereby claim:
To claim this, I am signing this object:
| $('li.unread button.mute-note').each(function() { this.click() }); |