Skip to content

Instantly share code, notes, and snippets.

@brandondees
brandondees / nginx.conf
Last active December 16, 2021 18:38
How To Configure NGINX for switching TLS certs by domain name for HNS + ICANN dual name support.
server {
server_name starservice *.starservice;
listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /root/ssl/starservice/cert.crt;
ssl_certificate_key /root/ssl/starservice/cert.key;
Verifying that +dees is my blockchain ID. https://onename.com/dees
@brandondees
brandondees / day_6.rb
Created December 16, 2015 15:42
adventofcode.com day 6
require 'pry'
Coord = Struct.new(:x, :y)
class Grid
attr_accessor :lights, :x_min, :x_max, :y_min, :y_max
def initialize
@y_min = 0
@y_max = 999
@x_min = 0
@brandondees
brandondees / authentication_token.rb
Created September 17, 2015 20:06
Stronger Authentication Tokens
# == Schema Information
#
# Table name: authentication_tokens
#
# created_at :datetime
# expires_at :datetime
# hashed_token :string(255)
# id :integer not null, primary key
# ip_address :string(255)
# updated_at :datetime
### Keybase proof
I hereby claim:
* I am brandondees on github.
* I am dees (https://keybase.io/dees) on keybase.
* I have a public key whose fingerprint is 4B37 DCC6 28AA 4AD3 D3FF 49CA 0AF2 BB07 0BD1 4598
To claim this, I am signing this object:
##
# SSL Configuration
#
# This is a strong configuration that will get an A+ on the SSL Labs test as of
# April 5, 2014.
#
# To test your SSL setup against the best standards, see:
# https://www.ssllabs.com/ssltest/
#
SSLEngine on
@brandondees
brandondees / pg-install-probs
Created September 8, 2012 03:37
gem install pg is stubborn on ubuntu 12.04 wth
brandon@dees-VirtualBuntu:~/Projects/2012/client/rietta/bitstream-web$ gem install pg
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /home/brandon/.rvm/gems/ruby-1.9.3-p194@bitstream-web/gems/pg-0.14.1/.gemtest
brandon@dees-VirtualBuntu:~/Projects/2012/client/rietta/bitstream-web$ rvmsudo gem install pg
[sudo] password for brandon:
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.