Skip to content

Instantly share code, notes, and snippets.

@nachozt
nachozt / BootstrapToRails6.md
Last active November 8, 2022 23:26
Bootstrap to Rails 6 with webpacker

Step 1:

Add bootstrap and its dependencies:

yarn add bootstrap jquery popper.js

Step 2:

in config/webpack/environment.js add the following:

Ruby Version Manager

  • RVM: which is the most established, but also the most intrusive in terms of shell modifications. It manages gemsets and installs different ruby versions. Most of that functionality has been surpassed by Bundler.
  • rbenv: which is lower impact. Does not install ruby versions. It only manages different ruby versions. But it also do things like overriding cd so that it can switch rubies “magically”. They also install shims of commands like gem, ruby, and others that dynamically look up the available Rubies.
  • chruby: even lighter than rbenv.
  • frum: https://www.sitepoint.com/ruby-version-managers-macos/

Now using FRUM

@nachozt
nachozt / machine.js
Last active September 21, 2020 17:39
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@nachozt
nachozt / payments_endpont.js
Last active June 19, 2020 11:45
unit test sample medium
@public
function create_payment(args) {
validateArgs(args);
findUser();
OtherModule.validatePayment();
createPayment();
return payment;
}