Skip to content

Instantly share code, notes, and snippets.

View coderberry's full-sized avatar

Eric Berry coderberry

View GitHub Profile
# USAGE: `ruby ask_cpteeves.rb`
# Type "exit" to quit
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'ruby-openai'
gem 'pry'
gem 'tty-prompt'
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby "2.7.6"
# Authorization framework for Ruby/Rails application
# [https://github.com/palkan/action_policy]
gem "action_policy", "~> 0.6.4"
# Action Policy integration for GraphQL-Ruby
# Shared collection of (mostly Arel) class-level helpers for working with advanced
# SQL selections.
#
# Source: https://github.com/ManifoldScholar/manifold/blob/84625d40af628646453668be028dabc2aa249516/api/app/models/concerns/arel_helpers.rb#L313
#
# Required rubygem: 'dux'
#
# rubocop:disable Style/CharacterLiteral
# rubocop:disable Style/StringLiterals
# @see https://www.postgresql.org/docs/9.5/static/functions-json.html JSON functions and operators in PostgreSQL
@coderberry
coderberry / github-review-toggle-checkboxes.js
Created December 15, 2022 19:12
Inserts a button that can toggle the "viewed" checkboxes when reviewing a PR on Github.
const url = document.URL;
class ReviewToggle {
insertButton() {
const parentElement = document.querySelector(".pr-review-tools");
let button = document.querySelector('#boost-toggle-checkboxes');
if (!button) {
button = document.createElement("button");
button.id = "boost-toggle-checkboxes";
}
@coderberry
coderberry / ci.yml
Created August 14, 2020 16:30
Using GitHub Actions for CI (rspec + rubocop)
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
RAILS_ENV: test
### Keybase proof
I hereby claim:
* I am coderberry on github.
* I am coderberry (https://keybase.io/coderberry) on keybase.
* I have a public key ASDxOxY4XXIxGp-zouupDGuL3A-bGhziJZ3e6STSnBQaVwo
To claim this, I am signing this object:
@coderberry
coderberry / codefund-sponsorships-faq.md
Last active October 9, 2019 23:57
CodeFund Sponsorships FAQ

CodeFund Sponsorships FAQ

What is CodeFund Sponsorships?

CodeFund Sponsorships is a way to provide funding to open source projects and maintainers. One of the big misconceptions around open source funding is that funding should come from within the community (such as Patreon, Open Collective, and even GitHub Sponsors).

We takes a different approach to the problem. We provide direct sponsorships to GitHub projects and maintainers from companies that wish to share their products and services to the developer ecosystem. The sponsor will be able to track the results of those sponsorships similar to how they do with other marketing efforts. The sponsor will not only fulfill their altruistic desires to support those projects they love, but will also see a return on this investment similar to that found in advertising. This formula encourages more spending which is good for the community.

How does the matchmaking work? Is the list price fixed or can the sponsor negotiate or bid (either up or down)?

@coderberry
coderberry / codefund-job.md
Last active May 17, 2019 21:54
CodeFund is hiring!

CodeFund - Full Stack Rails Developer

We are seeking an ambitious mid-level to senior full stack Ruby on Rails developer to join our small team. The position is 100% remote.

CodeFund's mission is to help open source creators and contributors find a path to financial sustainability. We accomplish this through our ethical ad platform which strictly respects the privacy of all users. We assert that the current trend of invasive user tracking, so prevalent in today's leading advertising platforms, is unacceptable. We believe that ethical contextual ads provide a meaningful revenue model that can help ensure open source projects remain healthy and viable.

CodeFund is a high growth mid-size Rails application. Our ads appear on over 150 sites worldwide... increasing every day. The platform handles over 2.5 million requests per day with mean response times of less than 150ms on critical endpoints. We anticipate double digit month over month growth for the foreseeable future. Join us and help solve some unique s

did:muport:QmTp214HPBY3VjSrdjiqsdP12ish7PhSCFzEydn5SvGCsQ
@coderberry
coderberry / theclimb.txt
Created February 27, 2019 16:31
The Climb
Inch by inch they pressed forward. Above, they could see the sunlight shining over the summit. “We’re close,” he thought. “We’ve already lost one to the climb. Can’t think about that now.”
A faint path was carved through the rocky slopes. “Others have made it” he remembers. “We can do this.”
Every instinct in his body told him otherwise. There is solace below. A warm fire. Food and shelter. Is it worth the struggle?
“YES!” He cried aloud.
Minutes turned to hours as they neared the summit. An unexpected breeze touched their faces. “We’re close now”.