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 / html-head-boilerplate.html
Created January 16, 2018 02:50 — forked from nunosans/html-head-boilerplate.html
HTML Head Boilerplate & Reference
<!doctype html>
<html>
<head>
<!-- Priority tags. These must come first. -->
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge; chrome=1"> <!-- Render Chrome if available or using latest version of Internet Explorer (Recommended). -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!-- Document Title -->
<title>Page Title</title>
<!-- Allows control over where resources are loaded from. Place as early in the document as possible, only applies to content below this tag. -->
@jcanfield
jcanfield / README.md
Created December 27, 2017 04:46 — forked from jxson/README.md
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@jcanfield
jcanfield / new-macos-setup.sh
Created November 25, 2017 02:35 — forked from siathalysedI/new-macos-setup.sh
Things to setup/install on a new macOS
#!/bin/bash
# change default shell to zsh (asks for password)
chsh -s /bin/zsh
# install xcode command line tools
xcode-select --install
# download my custom .zshrc
curl https://gist.githubusercontent.com/simonhaenisch/382eab0cfa3435dad7e177a49fe198fc/raw/.zshrc > ~/.zshrc
@jcanfield
jcanfield / .bash_profile
Created November 25, 2017 02:33 — forked from stephenll/.bash_profile
.bash_profile file on Mac OS X
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases.
# Much of this was originally copied from:
# http://natelandau.com/my-mac-osx-bash_profile/
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
color_0 = ffff ffff ffff
color_1 = 4949 4848 3e3e
color_2 = 6666 d9d9 efef
color_3 = 6b6b c7c7 2b2b
color_4 = fdfd 9797 1f1f
color_5 = f9f9 2626 7272
color_6 = 94bc 5925 ffff
color_7 = 7575 7171 5e5e
color_8 = e6e6 dbdb 7474
color_9 = a6a6 e2e2 2e2e
@jcanfield
jcanfield / googl.sh
Created June 11, 2017 07:33 — forked from trentm/googl.sh
Bash function to use the goo.gl URL shortener on stdin. See <https://developers.google.com/url-shortener/v1/getting_started> TODO: pbcopy it too if that command is available
# echo URL | googl
function googl {
local url=$(cat <&0)
(
set -e pipefail;
echo "{}" \
| json -e "this.longUrl='$url'" \
| curl -sf https://www.googleapis.com/urlshortener/v1/url \
-H 'Content-Type: application/json' -d@- \
| json id
@jcanfield
jcanfield / goo.gl.sh
Created June 11, 2017 07:28 — forked from buchanansc/goo.gl.sh
Bash: goo.gl # Shorten a URL using the Google URL Shortener service (http://goo.gl).
#!/usr/bin/env bash
# Usage: goo.gl [URL]
#
# Shorten a URL using the Google URL Shortener service (http://goo.gl).
goo.gl() {
[[ ! $1 ]] && { echo -e "Usage: goo.gl [URL]\n\nShorten a URL using the Google URL Shortener service (http://goo.gl)."; return; }
curl -qsSL -m10 --connect-timeout 10 \
'https://www.googleapis.com/urlshortener/v1/url' \
-H 'Content-Type: application/json' \
-d '{"longUrl":"'${1//\"/\\\"}'"}' |
@jcanfield
jcanfield / dns_servers.md
Created June 4, 2017 05:15 — forked from roge/dns.md
Public DNS Servers

This is a list of trusted DNS servers put together by Rogue in order of priority.

Last Updated: 6/13/2014

Public DNS Servers (US, IPv4)

8.8.8.8         # Google Primary
8.8.4.4         # Google Secondary
4.2.2.1         # Level3 Main Primary
4.2.2.2         # Level3 Main Secondary
@jcanfield
jcanfield / public_dns_list
Created June 4, 2017 05:13 — forked from oldsharp/public_dns_list
public dns servers list
# google public dns
8.8.8.8
8.8.4.4
# opendns
208.67.222.222
208.67.220.220
# v2ex dns
199.91.73.222