Skip to content

Instantly share code, notes, and snippets.

View benoror's full-sized avatar
🌀
In a quantum state between coding and procrastinating

Ben Orozco benoror

🌀
In a quantum state between coding and procrastinating
View GitHub Profile
@benoror
benoror / long_query.rb
Created October 5, 2023 16:08
Modularize a long/complex SQL query in Ruby
def my_big_ish_report
my_long_query = ```sql
SELECT a,b,c FROM ... AS q_a
JOIN (
SELECT ... ' Sub-query 1
WHERE client_id = 'foobar'
) sq_1 ON q_a.fkey_id = sq_1.id
INNER JOIN (
SELECT x,y,z FROM ... ' Sub-query 2
JOIN (
@benoror
benoror / export_base_meta_from_airtable.js
Created December 10, 2020 05:37 — forked from wassim/export_base_meta_from_airtable.js
Export base meta data from Airtable
const fda = ( fields ) => {
let data = []
for(const f of fields ){
data.push(fd(f))
}
return data
}
const fd = ( field ) => {
let data = {
@wassim
wassim / export_base_meta_from_airtable.js
Last active December 10, 2020 05:37
Export base meta data from Airtable
const fda = ( fields ) => {
let data = []
for(const f of fields ){
data.push(fd(f))
}
return data
}
const fd = ( field ) => {
let data = {
@ggondim
ggondim / README.md
Created May 18, 2020 23:31
Airtable schema API request

Airtable Schema API

Replace the variables below in the script

  • YOURBASEID: your Airtable base ID starting with 'app...'
  • YOURCOOKIESFORAIRTABLEDOMAIN your browser cookie for airtable.com domain
@benoror
benoror / cover_letter.md
Last active March 27, 2026 23:11
Cover Letter - Ben Orozco - benoror.com

Hi, my name is Ben Orozco. I am a Computer Science Engineer specialized in Full Stack web development, passionate on making and launching software products, leading engineering teams and leveraging technology to tackle big real-world problems. Portfolio: https://benoror.com/portfolio

I am passionate of full stack development (APIs, backend, DevOps, front-end, UI/UX) for the past 9+ years, mainly in Ruby on Rails, Node.js, Elixir and Javascipt frameworks (React, Angular, Ember).

I am ready for my next career challenge! Some fun projects I have been part of that might be relevant:

  • Helped planning, architecture design and hands-on programming of a full AuthN/AuthZ identity provider based on OAuth2/OpenID standards, to support SSO (Single Sign-on) and User Management across many EdTech applications.

  • Launched a Node.js Tax/Invoicing lambda micro-service in record time that ended up replacing a big chunk of a Java monolith codebase and serving 1000's or requests per minute by relying on minimal footprint

@IanColdwater
IanColdwater / twittermute.txt
Last active May 26, 2026 05:44
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@benoror
benoror / latency.markdown
Created September 1, 2019 04:48 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@tannerlinsley
tannerlinsley / remove-linkin-connections.js
Created July 12, 2019 15:43
A script for removing LinkedIn connections automatically
function removeFirstConnection () {
$('[type=ellipsis-horizontal-icon]').first().click()
setTimeout(() => {
$('.js-mn-connection-card__dropdown-delete-btn > button').click()
setTimeout(() => {
$('[data-control-name="confirm_removed"]').click()
}, 250)
}, 250)
}
@benoror
benoror / xor_validation.md
Last active March 27, 2026 23:11
Rails Model XOR Validation for "Custom" fields

XOR Validation

validate :disease_or_custom_disease

#...

private
def disease_or_custom_disease
  custom_disease.blank? ^ disease_id.blank?
@stevenharman
stevenharman / 00_Heroku-Release-Phase-Review-Apps-Rails_README.md
Last active June 4, 2025 20:13
Heroku Release Phase script for managing Rails DB migrations, and playing nice with Review Apps and postdeploy scripts

Heroku Release Phase + Review Apps + Rails

This is a simplified, but fairly thorough, set of scripts and configuration to enable Heroku Release Phase for Rails apps. Further, this particular set up plays nicely with Heroku Review Apps in that the release phase script will:

  1. Fail, loudly, if the DB does not yet exist.
  2. Load the DB schema if the current schema version (as determined by bin/rails db:version) is 0.
  3. Run DB migrations otherwise.

For a "normal" app that usually means it will run the DB migrations.