Skip to content

Instantly share code, notes, and snippets.

View theendcomplete's full-sized avatar
🎯
Focusing

Nikkie Grom theendcomplete

🎯
Focusing
View GitHub Profile
@theendcomplete
theendcomplete / msi-gtx1060-ubuntu-18.04-deeplearning.md
Created August 11, 2021 12:27 — forked from hereismari/msi-gtx1060-ubuntu-18.04-deeplearning.md
Setting up a MSI laptop with GPU (gtx1060), Installing Ubuntu 18.04, CUDA, CDNN, Pytorch and TensorFlow
require 'sidekiq/api'
Sidekiq::ScheduledSet.new.find_job("61374d5d51db323507376158")
@theendcomplete
theendcomplete / rails_locking.md
Created January 13, 2021 19:55 — forked from ryanermita/rails_locking.md
Optimistic and Pessimistic Locking in Rails

Optimistic Locking assumes that a database transaction conflict is very rare to happen. It uses a version number of the record to track the changes. It raise an error when other user tries to update the record while it is lock.

usage

Just add a lock_version column to the table you want to place the lock and Rails will automatically check this column before updating the record.

Pessimistic locking assumes that database transaction conflict is very likely to happen. It locks the record until the transaction is done. If the record is currently lock and the other user make a transaction, that second transaction will wait until the lock in first transaction is release.

usage

@theendcomplete
theendcomplete / .editorconfig
Created November 6, 2020 07:27 — forked from phanviet/.editorconfig
editorconfig-rails
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@theendcomplete
theendcomplete / README.md
Created December 6, 2019 05:04 — forked from bazzel/README.md
Rails 6 and Bootstrap 4

This blogpost shows how to setup Rails 6 with Bootstrap 4.

This snippet shows a somehow different and less customized approach.

$ rails new rails6-bootstrap4
$ bundle --binstubs
$ yarn add bootstrap jquery popper.js