Skip to content

Instantly share code, notes, and snippets.

@katelovescode
katelovescode / App.js
Created January 27, 2022 15:58
useEffect for Rack Mini Profiler in a React SPA on top of Rails
View App.js
import React, { useEffect } from 'react'
import './App.css'
const App = () => {
useEffect(() => {
const script = document.createElement('script')
script.async = true
script.src =
'/mini-profiler-resources/includes.js?v=12b4b45a3c42e6e15503d7a03810ff33'
script.type = 'text/javascript'
@katelovescode
katelovescode / pr_template.md
Last active December 28, 2021 16:19
PR Template
View pr_template.md

🔙 Backend tests

If you wrote 'em, or if this doesn't touch backend code, delete this section.

Frontend tests

If you wrote 'em, or if this doesn't touch frontend code, delete this section.

📋 Summary

A summary of your changes here (can defer to commit messages too).

Steps to set up locally (optional)

A list of things you need to change to get the code going.

  • Any new environment variables
  • Any build steps
@katelovescode
katelovescode / earned_revenue
Last active October 19, 2021 15:17
Sequence Diagram - Earned Revenue
View earned_revenue
sequenceDiagram
User->>+ServiceDay: earned_revenue
loop attendances
Attendance-->>ServiceDay: time_in_care, absence
end
ServiceDay->>+ServiceDay: duration(attendances.time_in_care)
ServiceDay->>+StateDurationRules: duration_type(self)
StateDurationRules-->>ServiceDay: duration_type
ServiceDay->>+ChildCasePeriod: authorized_units(duration_type)
ChildCasePeriod-->>ServiceDay: authorized_units
@katelovescode
katelovescode / ruby-tricks.rb
Last active September 22, 2020 14:22
Ruby Tricks
View ruby-tricks.rb
Hash.key(value) # returns key by its value
View keybase.md

Keybase proof

I hereby claim:

  • I am katelovescode on github.
  • I am katelovescode (https://keybase.io/katelovescode) on keybase.
  • I have a public key ASBnoQBWeQzuWR3kBXkATJuoopmG5H42x4d-ZOT4PR-JMgo

To claim this, I am signing this object:

@katelovescode
katelovescode / job-hunt-questions.md
Last active September 20, 2018 17:03
Questions I'm asking on the job hunt
View job-hunt-questions.md

Round 1

  • Tell me about the state of your current product and where you'd like to see it go in the next two years. What are your engineering goals?
  • What responsibilities would I have in the role I'm being considered for?
  • What would you say are the top two personality traits someone needs to do this job well?
  • Why are you hiring for this position?
  • How are you currently making product decisions? What are you hoping to change about that process, if anything?

Round 2

@katelovescode
katelovescode / roman_numeral_converter.rb
Created September 7, 2018 22:20
Convert from Roman Numerals to Arabic
View roman_numeral_converter.rb
require "pry"
ROMAN_NUMBERS = {
"m": 1000,
"d": 500,
"c": 100,
"l": 50,
"x": 10,
"v": 5,
"i": 1
@katelovescode
katelovescode / facebook.css
Last active September 16, 2018 15:43
User Stylesheet to stop Facebook from displaying chat windows
View facebook.css
# Use the User CSS Chrome extension, navigate to facebook, double click the User CSS icon to
# display the slide-out CSS window, and add the following code to the page so your Facebook
# messenger chat windows don't display
# https://chrome.google.com/webstore/detail/user-css/okpjlejfhacmgjkmknjhadmkdbcldfcb
#pagelet_dock, #pagelet_sidebar {
display: none;
}
@katelovescode
katelovescode / get_marginalized_folks_in_tech.md
Last active September 19, 2019 18:30
Get Marginalized Folks in Tech and Keep Them There
View get_marginalized_folks_in_tech.md