Skip to content

Instantly share code, notes, and snippets.

View jcanfield's full-sized avatar
💭
If I do not respond quickly, try me on Twitter at @creativeboulder.

Joshua Canfield jcanfield

💭
If I do not respond quickly, try me on Twitter at @creativeboulder.
View GitHub Profile
@jcanfield
jcanfield / how-to-set-up-stress-free-ssl-on-os-x.md
Created December 9, 2015 10:39 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
How to set up stress-free SSL on an OS X development machine

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

#!/usr/bin/env sh
# Download lists, unpack and filter, write to gzipped file
curl -s https://www.iblocklist.com/lists.php \
| grep -A 2 Bluetack \
| sed -n "s/.*value='\(http:.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#' \
| gzip - > bt_blocklist.gz
@jcanfield
jcanfield / blocklist-update.sh
Created November 15, 2015 04:50 — forked from raidzero/blocklist-update.sh
Script to update transmission blocklists using a list of blocklists from iblocklist.com
#!/bin/sh
:<<END_DOC
blocklist updater - for transmission
Written by raidzero for linux
BLOCKLIST_HOME is the directory where transmission keeps its blocklists
END_DOC
BLOCKLIST_HOME=~/.config/transmission/blocklists
@jcanfield
jcanfield / bash_profile.md
Created October 30, 2015 13:55 — forked from irazasyed/bash_profile.md
Terminal: Mac OS X Terminal Aliases & How-To - .bash_profile / .profile

Mac OS X Terminal Aliases & How-To

Collection of some of my fav terminal aliases that i use often & collected from the web. This file will be updated with more aliases as i find more. Feel free to comment and share your fav aliases you use :)

###Follow these simple steps to add the following aliases:###


  1. Within the Terminal, run:
@jcanfield
jcanfield / .bash_profile
Created October 30, 2015 10:55 — forked from natelandau/.bash_profile
Mac OSX Bash Profile - Sections: # 1. Environment Configuration # 2. Make Terminal Better (remapping defaults and adding functionality) # 3. File and Folder Management # 4. Searching # 5. Process Management # 6. Networking # 7. System Operations & Information # 8. Web Development # 9. Reminders & Notes
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@jcanfield
jcanfield / semantic-markup-example-html5.html
Last active August 29, 2015 14:27 — forked from Hogent/semantic-markup-example-html5.html
Gist for article on HTML5 semantics
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Page Title | Site Name</title>
<meta name="description" content="page description">
<link rel="stylesheet" href="style.css">
<!--[if lt IE 9]>
<script src="html5shiv.js"></script>
<![endif]-->
@jcanfield
jcanfield / Vagrantfile
Last active August 29, 2015 14:15 — forked from bergantine/Vagrantfile
Vagrant configuration offering setup of Ruby, NodeJS, Grunt, Bower and ZURB Foundation. (I put a fork in this!)
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64-2"
# The url from where the 'config.vm.box' box will be fetched if it
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php echo $post->title; ?></title>
<link rel="stylesheet" href="https://www.drmcdougall.com/wp/wp-admin/load-styles.php?c=1&amp;dir=ltr&amp;load=dashicons,wp-admin,buttons,wp-auth-check&amp;ver=4.1" type="text/css" media="all">
</head>
<body>
<div class="wrap">
@jcanfield
jcanfield / osx-10.10-setup.md
Last active August 29, 2015 14:12 — forked from kevinelliott/osx-10.10-setup.md
Josh's Blank Canvas for an OSX Reinstall based upon the work of kevinelliott/osx-10.10-setup.md. (Please note that below the Homebrew Installation I have not modified. There are a few Tools that I use differently. For instance, I am a Sublime Text 3 user, Vagrant and iTerm2 User.)

Mac OS X 10.10 Yosemite

Let's get started. Kevin did a great job on setting up this Gist. My goal is to refine it and retool it to work with my my OSX and Development environments. So here were f*cking go..

Install Software

The software selected is software that is "tried and true" --- software I need after any fresh install. I often install other software not listed here, but is handled in a case-by-case basis.

Install from App Store

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software