Skip to content

Instantly share code, notes, and snippets.

View compwron's full-sized avatar
💭
Hello world

compwron compwron

💭
Hello world
View GitHub Profile
@compwron
compwron / test_coverage_gaps.md
Created March 21, 2026 20:49
CASA test coverage gaps analysis - 2026-03-21

CASA Test Coverage Gaps

High Priority — Complex business logic, no real tests

Area File Gap
Emancipation checklist app/controllers/emancipations_controller.rb JSON API with 5+ action types (ADD/DELETE category/option, SET_OPTION) — zero tests
Placements CRUD app/controllers/placements_controller.rb Full CRUD for youth placement records — only a pending placeholder spec
Admin user creation app/services/create_casa_admin_service.rb Creates admin users with org setup — placeholder spec only
System admin creation app/services/create_all_casa_admin_service.rb Creates system-wide admins — placeholder spec only
@compwron
compwron / feature_flags_timeline.html
Created March 21, 2026 00:17
Feature Flags Timeline - app-workflow flags since 2024
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Feature Flags Timeline</title>
<style>
:root {
--bg: #0d1117;
--surface: #161b22;
namespace :acts_as_paranoid do
desc "Verify that all models using acts_as_paranoid have scopes on their unique indexes and validations"
task lint: :environment do
if Rails.env.test?
currently_probably_buggy_classes_ignored = %w[
# too many things, redacted
]
Zeitwerk::Loader.eager_load_all
errors = []
allows_multiple_deleted = "(deleted_at IS NULL)"
#!/user/bin/env ruby
puts "hi"
my_variable = "hi"
puts my_variable
x = 1
puts x
puts x + 2
names = ["name", "naaaame"]
puts names
data = { name: "name" }
@compwron
compwron / tinytaste.js
Created February 16, 2022 19:05
skillz for tiny taste
1 + 1
console.log("hello")
myFunctionName = () => {console.log("hi")}
myFunctionName()
myFunctionName2 = (x) { return x + 1 }
myFunctionName2(100)
document.body.style.backgroundColor = "red"
window.location.href
@compwron
compwron / LW_draft.txt
Created September 29, 2020 05:47
LessWrong codebase post draft
Notes for a possible blog post about https://github.com/LessWrong2/Lesswrong2 by Oliver Habryka or whoever
I may also use or publish some part of my notes
The codebase has two big tech debts for historical reasons: https://www.mongodb.com/ and https://www.meteor.com/
Typescript is good and helps a lot to make a sturdy codebase. It has also been an essential part of moving away from meteor.
http://vulcanjs.org/ is built on top of meteor, and in fact it helps LW move away from meteor, because it’s an abstraction layer over meteor. Meteor relies on sockets for communication, abstracted via a https://graphql.org/ layer.
@compwron
compwron / slave_in_software_considered_harmful.md
Created June 10, 2020 17:12
slave_in_software_considered_harmful.md

Background

In the world of software development / computer science, there is a technical term "slave" which should be abandoned. This post is intended to be a list of software tools which use "slave" or which have gone through a rename process away from using the word "slave".

More discussion/summary or this topic on Wikipedia

Definitions

@compwron
compwron / live-coding.py
Last active May 21, 2020 15:54
my live-coding answer to some hackerrank problem as I was demoing tech interviewing to a mentee
input = [5,
'Harry',
37.21,
'Berry',
37.21,
'Tina',
37.2,
'Akriti',
41,
'Harsh',
@compwron
compwron / query-counter.py
Created May 8, 2020 22:46
query-counter.py
# USAGE:
# def test_foo:
# stmts = []
# def catch_queries(conn, cursor, statement, a, b, c):
# stmts.append(statement)
# assert most_frequent_queries(...) == ??
def most_frequent_queries(queries, query_count, query_type, query_print_length):
select_sql_statement_groupings = {}
for statement in queries:
@compwron
compwron / relay.py
Created April 5, 2020 05:42
python2 port forward proxy
#!/usr/bin/python
# Thanks https://gist.github.com/gschizas/3731989
# This is a simple port-forward / proxy, written using only the default python
# library. If you want to make a suggestion or fix something you can contact-me
# at voorloop_at_gmail.com
# Distributed over IDC(I Don't Care) license
import socket
import select
import time