Skip to content

Instantly share code, notes, and snippets.

Avatar

Calvin Metcalf calvinmetcalf

View GitHub Profile
@xPaw
xPaw / github_whitespace_button.user.js
Last active May 10, 2019
Adds a button in GitHub UI to ignore whitespace changes in commits
View github_whitespace_button.user.js
// ==UserScript==
// @name Ignore whitespace button on GitHub
// @description Adds a button in GitHub UI to ignore whitespace changes in commits
// @author xPaw
// @namespace https://gist.github.com/xPaw/de6ee132a2e267ef6960
// @updateURL https://gist.github.com/xPaw/de6ee132a2e267ef6960/raw/github_whitespace_button.user.js
// @match https://github.com/*
// @version 1.6.1
// @run-at document-end
// @grant none
@hsribei
hsribei / can-nat-traversal-be-tor-s-killer-feature.md
Last active Jul 12, 2018
Can NAT traversal be Tor's killer feature?
View can-nat-traversal-be-tor-s-killer-feature.md

Can NAT traversal be Tor's killer feature?

tl;dr: how about a virtual global flat LAN that maps static IPs to onion addresses?

[We all know the story][1]. Random feature gets unintentionally picked up as the main reason for buying/using a certain product, despite the creator's intention being different or more general. (PC: spreadsheets; Internet: porn; smartphones: messaging.)

View README.md
@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active Jun 22, 2021
How to set up stress-free SSL on an OS X development machine
View how-to-set-up-stress-free-ssl-on-os-x.md

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@springmeyer
springmeyer / install-mapnik-amazon-ami.sh
Last active Dec 24, 2020
Mapnik on Amazon Linux AMI (Fedora)
View install-mapnik-amazon-ami.sh
# http://aws.amazon.com/amazon-linux-ami/
# http://aws.amazon.com/amazon-linux-ami/faqs/
# Boot up a machine with at least 1.5 to 2 GB Ram
# login
chmod 600 key.pem
ssh -i key.pem ec2-user@ec2...compute.amazonaws.com
# update