Skip to content

Instantly share code, notes, and snippets.

View brendanstennett's full-sized avatar

Brendan Stennett brendanstennett

  • ThinkData Works
  • Toronto, ON
View GitHub Profile
# convert PuTTY's public ssh key file into OpenSSH public key
ssh-keygen -i -f id_rsa_putty.pub > id_rsa.pub
@brendanstennett
brendanstennett / gce-vpn-install.sh
Last active February 25, 2016 20:39 — forked from greenido/gce-vpn-install.sh
Installing vpn on GCE
#!/bin/sh
#
# Automatic configuration of a VPN on GCE debian-7-wheezy server.
# Tested only on debian-7-wheezy.
#
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
# Unported License: http://creativecommons.org/licenses/by-sa/3.0/
#
# Thx to: https://github.com/sarfata/voodooprivacy/blob/master/voodoo-vpn.sh for the code/idea
#
@brendanstennett
brendanstennett / Gemfile
Created November 27, 2013 20:36 — forked from pcreux/Gemfile
Heroku + Unicorn
group :production do
gem 'unicorn'
# Enable gzip compression on heroku, but don't compress images.
gem 'heroku-deflater'
# Heroku injects it if it's not in there already
gem 'rails_12factor'
end
@brendanstennett
brendanstennett / steps
Last active December 19, 2019 12:08 — forked from trcarden/gist:3295935
Setting up SSL with Nginx and Unicorn
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
#!/usr/bin/env bash
apt-get update
apt-get -y upgrade outdated
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make