Skip to content

Instantly share code, notes, and snippets.

@MProuts
MProuts / gist:e40950da99bf2941fcfde4ff2c5c80c5
Created April 15, 2022 07:07
Local markdown server (replacement for grip)

$ python3 -m ReadEm.serve

@MProuts
MProuts / runbook-new-rails-react-app.md
Last active December 29, 2022 02:16
Runbook for creating a new rails/react app from scratch

Runbook for creating a new rails/react app from scratch

  • rvm get stable
  • check here for latest stable release
  • rvm install <latest stable version>
  • rvm --create --ruby-version <x.x.x>@<project> #creates a gemset and dotfiles
  • gem install bundler
  • bundle init
  • bundle add rails
  • bundle add bootsnap (workaround for issue with rails new)
@MProuts
MProuts / excel_column_name.rb
Created March 8, 2016 20:31
Ruby method to convert zero-based indices into excel column names (like, "AAB").
require 'minitest/autorun'
# Turns an zero-based index into an excel column name
def excel_column_name(i)
digits = ("A".."Z").to_a
return digits[i] if i < 26
"#{excel_column_name(i/26 - 1)}#{excel_column_name(i % 26)}"
end