Skip to content

Instantly share code, notes, and snippets.

@lunohodov
lunohodov / installation.md
Created March 5, 2023 12:35
Latest Ruby (3.2.1) on Apple Silicone
  • Apple Silicone machine (M2, Ventura 13.2.1)
  • Homebrew-installed asdf-vm

Installing latest Ruby via asdf or ruby-build failed with errors:

~ % asdf install ruby latest
To follow progress, use 'tail -f /var/folders/gy/rg1mbc9x6l52qwswzr5gbcjr0000gn/T/ruby-build.20230305121529.66351.log' or pass --verbose
Downloading ruby-3.2.1.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.1.tar.gz
@lunohodov
lunohodov / README.md
Last active August 25, 2021 05:48
A scheduler script to locally mimic Heroku's Scheduler

./bin/scheduler

A scheduler script to locally mimic Heroku's Scheduler.

You may find the script useful if

  • you have a Rails app and deploy on Heroku
  • during development, you need to locally run jobs at scheduled time intervals
  • you use a Procfile-based app manager such as Foreman
@lunohodov
lunohodov / tailwind.config.js
Created August 23, 2021 11:10
Tell TailwindCSS not to purge form elements
module.exports = {
purge: {
content: [
'./app/**/*.html.erb',
'./app/**/*.js',
],
safelist: [
'form-input',
'form-textarea',
'form-select',
# config/routes.rb
resources :documents do
scope module: 'documents' do
resources :versions do
post :restore, on: :member
end
resource :lock
end
end
@lunohodov
lunohodov / ors.md
Created June 16, 2018 06:26
Object Role Stereotypes

Object Role Stereotypes are a set of general, pre-established roles which commonly occur across object-oriented architectures. By establishing a set of role stereotypes, developers can provide themselves with a set of templates which they can use as they go through the mental exercise of decomposing behavior into cohesive components.

The concept of Object Role Stereotypes is discussed in the book Object Design: Roles, Responsibilies, and Collaborations by Rebecca Wirfs-Brock and Alan McKean.

The book presents the following stereotypes:

  • Information holder – an object designed to know certain information and provide that information to other objects.
  • Structurer – an object that maintains relationships between objects and information about those relationships.

Keybase proof

I hereby claim:

  • I am lunohodov on github.
  • I am lunohodov (https://keybase.io/lunohodov) on keybase.
  • I have a public key whose fingerprint is 2064 1D1D 54EC FC0F 018D 8992 5275 40C0 92F3 A1A6

To claim this, I am signing this object:

@lunohodov
lunohodov / ral_classic.csv
Last active December 20, 2024 06:13
RAL Classic color table (CSV)
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 11 columns, instead of 4 in line 9.
RAL,RGB,HEX,CMYK,LRV,English,German,French,Spanish,Italian,Dutch
RAL 1000,205-186-136,#CDBA88,0-9-34-20,51.79,Green beige,Grünbeige,Beige vert,Beige verdoso,Beige verdastro,Groenbeige
RAL 1001,208-176-132,#D0B084,0-15-37-18,48.09,Beige,Beige,Beige,Beige,Beige,Beige
RAL 1002,210-170-109,#D2AA6D,0-19-48-18,45.07,Sand yellow,Sandgelb,Jaune sable,Amarillo arena,Giallo sabbia,Zandgeel
RAL 1003,249-169-0,#F9A900,0-32-100-2,49.05,Signal yellow,Signalgelb,Jaune de sécurité,Amarillo señales,Giallo segnale,Signaalgeel
RAL 1004,228-158-0,#E49E00,0-31-100-11,42.13,Golden yellow,Goldgelb,Jaune or,Amarillo oro,Giallo oro,Goudgeel
RAL 1005,203-143-0,#CB8F00,0-30-100-20,34.15,Honey yellow,Honiggelb,Jaune miel,Amarillo miel,Giallo miele,Honinggeel
RAL 1006,225-144-0,#E19000,0-36-100-12,37.45,Maize yellow,Maisgelb,Jaune maïs,Amarillo maíz,Giallo polenta,Maisgeel
RAL 1007,232-140-0,#E88C00,0-40-100-9,37.63,Daffodil yellow,Narzissengelb,Jaune narcisse,Amarillo narciso,Giallo narciso,Narcissengeel
RAL 1011,175-128-80,#AF8050,0-27
# Hey coops..
#
# Imagine yourself on the other side of the table: two job openings, hundreds of resumes,
# _all of which_ look friggin' identical. Yeah, the HR departments at your MegaCorp XYZ are using
# automated tools to scan for keywords, and the coop department at your school is trying to beat
# you into submission to follow some "predefined template".. But, unless what you're aspiring to
# is to be an automaton at MegaCorp XYZ, relegated to writing test harnesses for code that will
# never see the light of day.. please do yourself a favor, and _be different_! Be bold, dammit.
#
# (Frankly, I'm falling asleep while reading your resumes.. Wake me up! Srsly.)