Skip to content

Instantly share code, notes, and snippets.

View jbinto's full-sized avatar

Jesse Buchanan jbinto

View GitHub Profile
@jbinto
jbinto / ssl-cert-upgrade-cloudfront.md
Last active February 20, 2020 08:28
Upgrading SSL certificate on Cloudfront

Upgrading SSL certificate on Cloudfront

Last year I set up jessebuchanan.ca with an SSL certificate on Amazon S3 / CloudFront.

Now, it's time to renew the certificate.

The first time was fraught with peril, but I eventually got it working.

This time I will document the steps to renew the cert. Most steps for a new installation would be omitted.

@jbinto
jbinto / ruby-versions-chruby.md
Created May 5, 2015 19:21
Dealing with Ruby versions - chruby

Dealing with Ruby versions - chruby

Every time I sit down to code, it seems like a new Ruby version is available.

When I first learned ruby I used rvm on my Mac. In production on linux, I use rbenv, likely due to its Capistrano integration.

When I set up my current machine, I found rvm had fallen out of fashion in favour of something called chruby.

Install new ruby

@jbinto
jbinto / fix_pythonpath.sh
Last active August 29, 2015 14:10
ansible, dopy, homebrew, python, pip, PYTHON_PATH madness
# situation:
# * Installed python+pip from homebrew.
# * Installed ansible from homebrew, then un/reinstalled with pip+git (requirements.txt)
# * Ansible cannot see `dopy` module installed via requirements.txt.
# solution:
# see https://github.com/jlund/streisand/issues/12
mkdir -p ~/Library/Python/2.7/lib/python/site-packages
echo '/usr/local/lib/python2.7/site-packages' > ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth
[ ] router:main ................................................ multiverse/main/router
vendor-5ca4ffb34d25585cca2282f42bb15971.js:7 [ ] router:main ................................................ multiverse/router
vendor-5ca4ffb34d25585cca2282f42bb15971.js:7 [✓] router:main ................................................ multiverse/router
vendor-5ca4ffb34d25585cca2282f42bb15971.js:7 [✓] router:main ................................................ multiverse/router
vendor-5ca4ffb34d25585cca2282f42bb15971.js:7 [✓] router:main ................................................ multiverse/router
vendor-5ca4ffb34d25585cca2282f42bb15971.js:7 [ ] -bucket-cache:main ......................................... multiverse/main/-bucket-cache
vendor-5ca4ffb34d25585cca2282f42bb15971.js:7 [ ] -bucket-cache:main ......................................... undefined
vendor-5ca4ffb34d25585cca2282f42bb15971.js:7 [ ] -bucket-cache:main ......................................... multiverse/-bucket-cache
vendor-5ca4ffb34d25585cca2282

iTerm2

http://www.iterm2.com/#/section/downloads

Get the iTerm color settings

https://raw.github.com/altercation/solarized/master/iterm2-colors-solarized/Solarized%20Dark.itermcolors

Apply them in iTerm through iTerm -> preferences -> profiles -> -> colors -> load presets -> import. You can create a different profile, other than Default if you wish to do so.

@jbinto
jbinto / dokku-notes.md
Last active August 29, 2015 14:09
dokku

Notes

Installing:

  • DigitalOcean NYC3 Dokku 0.2.3 on 14.04 with Docker 1.2.0) - create droplet with public key, get an IP address
  • Set up DNS for jbinto.ca: A records for jbinto.ca and *.jbinto.ca
  • DNS won't propogate immediately, so edit /etc/hosts for now
  • Go to http://jbinto.ca, check "Use virtual hosts", verify public key and hostname, finish setup

Deploying

@jbinto
jbinto / upgrading-ruby.md
Last active August 29, 2015 14:09
Upgrading Ruby

Upgrading Ruby

"If something is painful, do it more often."

  • 2.1.5: Nov 13 2014

OS X

I am using chruby and ruby-install.

@jbinto
jbinto / index.html
Created November 2, 2014 07:40
[add your bin description] // source http://jsbin.com/begojepigu
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]" />
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
select {
display: block;
[blocked] The page at 'https://railsapps.github.io/' was loaded over HTTPS, but ran insecure content from 'http://railsapps.github.io/css/landing.css': this content should also be loaded over HTTPS.
railsapps.github.io/:1
The page at 'https://railsapps.github.io/' was loaded over HTTPS, but displayed insecure content from 'http://railsapps.github.io/images/landing/rickquantz.png': this content should also be loaded over HTTPS.
railsapps.github.io/:1
The page at 'https://railsapps.github.io/' was loaded over HTTPS, but displayed insecure content from 'http://railsapps.github.io/images/landing/josephmay.png': this content should also be loaded over HTTPS.
railsapps.github.io/:1
The page at 'https://railsapps.github.io/' was loaded over HTTPS, but displayed insecure content from 'http://railsapps.github.io/images/landing/justin.png': this content should also be loaded over HTTPS.
railsapps.github.io/:1
The page at 'https://railsapps.github.io/' was loaded over HTTPS, but displayed insecure content from 'http
@jbinto
jbinto / bikeway_segment.rb
Last active August 29, 2015 14:07
FeatureWalker - algorithm to walk through bikeway data. Replaced by single PostGIS query.
require 'gis_tools'
# == Schema Information
#
# Table name: bikeway_segments
#
# id :integer not null, primary key
# city_rid :integer
# city_geo_id :integer
# city_linear_feature_name_id :integer
# city_object_id :integer