Skip to content

Instantly share code, notes, and snippets.

View jbinto's full-sized avatar

Jesse Buchanan jbinto

View GitHub Profile
@jbinto
jbinto / istanbul-report.diff
Created January 9, 2016 01:59
Diff: istanbul initial report vs re-run report
--- coverage/lcov.info 2016-01-08 20:51:59.000000000 -0500
+++ coverage/rerun/lcov.info 2016-01-08 20:44:13.000000000 -0500
@@ -1,26 +1,29 @@
TN:
-SF:src/constants.js
+SF:/Users/jbinto/dev/thirtyone-server/src/constants.js
FNF:0
FNH:0
-DA:1,1
-LF:1
@jbinto
jbinto / index.jsx
Created November 28, 2015 22:15
Egghead tutorial - Getting Started with Redux - JSBin implementation
/* global ReactRedux, Redux, ReactDOM */
// "Getting Started with Redux" (by Dan Abramov)
// https://egghead.io/series/getting-started-with-redux
// This file on JSBin (by Jesse Buchanan):
// http://jsbin.com/wuwezo/74/edit?js,console,output
////////////////////////////////////////////////
//
@jbinto
jbinto / cloudflare-migration.md
Last active July 27, 2018 10:29
Cloudflare migration

Migrating an SSL site to CloudFlare

Overview

jessebuchanan.ca has run on AWS CloudFront for the past year. Today I renewed the certificate, and while I waited for the manual approval, I wondered whether I could get CloudFlare running in "5 minutes" as advertised.

Signing up

I signed up for an account, and entered the jessebuchanan.ca domain.

@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
@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;