For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
| # app/views/layouts/history.html.arb | |
| panel "Historia" do | |
| table_for assigns[:versions] | |
| end |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
| Enable Redis to Start at Boot | |
| If all of your tests worked, and you would like to start Redis automatically when your server boots, you can enable the systemd service. | |
| To do so, type: | |
| sudo systemctl enable redis | |
| Output | |
| Created symlink from /etc/systemd/system/multi-user.target.wants/redis.service to /etc/systemd/system/redis.service. |
| Rails Asset Pipeline | |
| the basics of how to use the asset pipeline | |
| best practices for structuring where to put your assets | |
| how to use the precompile array to specify what files are processed by the asset pipeline | |
| how Sass and Coffeescript can be leveraged | |
| how to use Rails asset helper methods, and | |
| some gotchas | |
| Short history |
| // I'll explain it again | |
| ```class MyComponent extends React.Component { | |
| myEvent = () => { | |
| console.log('do something') | |
| } | |
| render () { | |
| <button onClick={this.myEvent}> WOW </button> |
Shows git commits on all your local branches, sorted oldest to newest
git for-each-ref --sort=committerdate refs/remotes/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
removing changes from a branch
Git Rebase Onto
git rebase --onto branch_1 old_branch branch_2
| Benchmark.ips do |bm| | |
| bm.report("spy") { spy(User, id: 1) } | |
| bm.report("double") { double(User, id: 1) } | |
| bm.report("verifying double") { instance_double(User, id: 1) } | |
| bm.report("actual object") { User.new(id: 1) } | |
| bm.report("via factorygirl") { FactoryGirl.build(:user, id: 1) } | |
| bm.compare! | |
| end |
| # Concurrency and Parallelism | |
| # https://www.toptal.com/ruby/ruby-concurrency-and-parallelism-a-practical-primer | |
| require 'benchmark' | |
| def fib(n) | |
| n < 2 ? n : fib(n-1) + fib(n-2) | |
| end | |
| puts Benchmark.measure { |