SSH into Root
$ ssh root@123.123.123.123
Change Root Password
| # As used with CanCan and Devise | |
| class ApplicationController < ActionController::Base | |
| protect_from_forgery | |
| include ErrorResponseActions | |
| rescue_from CanCan::AccessDenied, :with => :authorization_error | |
| rescue_from ActiveRecord::RecordNotFound, :with => :resource_not_found | |
| before_filter :authenticate! |
SSH into Root
$ ssh root@123.123.123.123
Change Root Password
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| # | |
| # Name: nginx-tls.conf | |
| # Auth: Gavin Lloyd <gavinhungry@gmail.com> | |
| # Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating | |
| # | |
| # Enables SPDY, PFS, HSTS and OCSP stapling. Configuration options not related | |
| # to SSL/TLS are omitted here. | |
| # | |
| # Example: https://www.ssllabs.com/ssltest/analyze.html?d=gavinhungry.io | |
| # |
| def snail(array) | |
| result = Array.new | |
| n = array.length | |
| runs = n.downto(0).each_cons(2).to_a.flatten | |
| delta = [[1,0], [0,1], [-1,0], [0,-1]].cycle | |
| x, y = -1, 0 | |
| for run in runs | |
| dx,dy = delta.next | |
| run.times do |i| | |
| x += dx |
####Assumptions
We will use the Electoral District and Polling Division shapefiles found on the Elections Ontario site:
| # enable Docker for your repository | |
| options: | |
| docker: true | |
| pipelines: | |
| branches: | |
| development: | |
| - step: | |
| # python image with aws-cli installed |
| def fill_stripe_elements(card: '4242424242424242', expiry: '1234', cvc: '123', postal: '12345') | |
| using_wait_time(10) { | |
| frame = find('#card-element > div > iframe') | |
| within_frame(frame) do | |
| card.to_s.chars.each do |piece| | |
| find_field('cardnumber').send_keys(piece) | |
| end | |
| find_field('exp-date').send_keys expiry | |
| find_field('cvc').send_keys cvc |