This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install PG skip tests skip webpacker install | |
rails new app_name -T --database=postgresql --skip-webpack-install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// After an API call to delete, refresh the state with Filter. | |
var NewThings = this.state.things.filter((x) => { return x.id != id;}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ch-ruby alt besides rbenv | |
cd ~/src && wget -O chruby-0.3.9.tar.gz https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz && tar -xzvf chruby-0.3.9.tar.gz && cd chruby-0.3.9/ && sudo make install && ruby-install ruby 2.6.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reduce the load of MODEL_NAME.rb with shoulda_matchers | |
context "Associations" do | |
%w(users books authors comments topics emails stories tasks reminders notes todos computers games homes pages).each do |attr| | |
it { should have_many(attr) } | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ruby 2.6.4 | |
sudo apt update && sudo apt -y upgrade && sudo apt -y install build-essential libpq-dev git memcached cifs-utils nginx redis-server nodejs imagemagick libtiff-dev ghostscript | |
sudo apt-get install graphicsmagick-imagemagick-compat | |
## Machine | |
sudo apt-get install git | |
# ruby-install https://github.com/postmodern/ruby-install | |
mkdir -p ~/src |