####Assumptions
- QGIS installed (if not: http://qgis.com/)
We will use the Electoral District and Polling Division shapefiles found on the Elections Ontario site:
####Assumptions
We will use the Electoral District and Polling Division shapefiles found on the Elections Ontario site:
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 |
# | |
# 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 | |
# |
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.
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! |