Skip to content

Instantly share code, notes, and snippets.

@irabinovitch
irabinovitch / monitorama2018.md
Last active June 3, 2019 13:50
Monitorama 2018 Talks
@johanndt
johanndt / upgrade-postgres-9.3-to-9.5.md
Last active July 15, 2022 12:35 — forked from dideler/upgrade-postgres-9.3-to-9.4.md
Upgrading PostgreSQL from 9.3 to 9.5 on Ubuntu

TL;DR

Install Postgres 9.5, and then:

sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
anonymous
anonymous / gist:e5cb46b87bf2dfa47745
Created April 13, 2015 04:20
HARRISON BERGERON by Kurt Vonnegut, Jr.
Full text of "Harrison Bergeron (& Activity)"
HARRISON BERGERON by Kurt Vonnegut, Jr.
THE YEAR WAS 2081, and everybody was finally equal. They weren't only equal
before God and the law. They were equal every which way. Nobody was smarter
than anybody else. Nobody was better looking than anybody else. Nobody was
stronger or quicker than anybody else. All this equality was due to the
211th, 212th, and 213 th Amendments to the Constitution, and to the unceasing
vigilance of agents of the United States Handicapper General.

I highly suspect that the RSpec core team all use black backgrounds in their terminals because sometimes the colors aren’t so nice on my white terminal

I certainly use a black background. I'm not sure about the other RSpec core folks. Regardless, if there are some color changes we can make that would make output look good on a larger variety of backgrounds, we'll certainly consider that (do you have some suggested changes?). In the meantime, the colors are configurable, so you can change the colors to fit your preferences on your machine. First, create a file at

Installing Docker (Virtualbox, boot2docker, docker)

  1. Download and install the latest boot2docker for OS X.
  2. Open a new Terminal and enter boot2docker init
  3. Run boot2docker start
  4. You will be given an environment variable to export export DOCKER_HOST=tcp://192.168.59.103:2375. Add that to your bash_profile or equivalent.
  5. You have a successful environment when the output of docker version is clean (exits 0). The output should look a bit like:
Client version: 1.1.0
@plentz
plentz / nginx.conf
Last active May 10, 2024 03:20
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@aaronfeng
aaronfeng / etc-nginx-nginx.conf
Created July 30, 2012 14:15
nginx json log format
# /etc/nginx/nginx.conf
log_format main '{'
'"remote_addr": "$remote_addr",'
'"remote_user": "$remote_user",'
'"time_local": "$time_local",'
'"request": "$request",'
'"status": "$status",'
'"body_bytes_sent": "$body_bytes_sent",'
'"http_referer": "$http_referer",'
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 11, 2024 07:10
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
##### this would be correct if the cloudant addon didn't seem to be broken
# heroku create <app-name> --addons cloudant:oxygen,cron:daily,hoptoad:basic,newrelic:standard,pgbackups:auto-month
#####
# create a cloudant account for the app
# create the heroku app with the necessary add-ons
heroku create <app-name> --addons cron:daily,hoptoad:basic,newrelic:standard,pgbackups:auto-month
# add the CLOUDANT_URL environment variable to the new instance
heroku config:add CLOUDANT_URL=https://username:password@username.cloudant.com