Skip to content

Instantly share code, notes, and snippets.

View prognostic's full-sized avatar

Sergey Krasnodemsky prognostic

View GitHub Profile
\timing
show hba_file; (host-based authentication)
show data_directory;
show search_path;
show timezone;
show work_mem;
@prognostic
prognostic / net_http.md
Last active March 14, 2024 06:43
Net::HTTP
@prognostic
prognostic / ruby.md
Last active February 20, 2024 15:39
@prognostic
prognostic / mongoid.md
Created February 8, 2024 02:31
mongod

Mongoid

https://www.mongodb.com/docs/mongoid/current/reference/associations/
https://mongoid.github.io/old/en/mongoid/docs/documents.html#fields
https://www.rubydoc.info/github/mongoid/mongoid/Mongoid%2FClients%2FStorageOptions%2FClassMethods:store_in
https://docs.mongodb.com/mongoid/current/tutorials/mongoid-documents/#dirty-tracking

Model.where(:total_by_hour_meta.gt => {}).take(5)
# emdedded_in
Model.where('rental_periods.price_per_m2' => {'$gte' => 1 })
@prognostic
prognostic / curl.md
Created November 1, 2023 05:46
curl