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 / html5-boilerplate-4.3.0.slim
Created August 17, 2016 07:44 — forked from SteveBenner/html5-boilerplate-4.3.0.slim
Slim template - HTML5 Boilerplate index page
/ This template produces an EXACT replica of the `index.html` file found in HTML5 Boilerplate v4.3.0
/ The official distribution is located at: https://github.com/h5bp/html5-boilerplate/blob/v4.3.0/index.html
/
/ For a more elegant way to generate the HTML tags within IE conditional comments, see the abstraction
/ in my gist at: https://gist.github.com/SteveBenner/a71f41e175f135b7d69b
/
doctype html
/ The min and max values of the version range actually represent all values below or above the limit
- ie_versions = 6..9 # A minimum value of 6 for example, translates into 'less than 7'
- for version in ie_versions
@jcanfield
jcanfield / README_Gallery-by-Utah-Women-Photojournalists.md
Last active March 13, 2016 18:21
"Through Her Eyes" A Gallery By Utah Women Photojournalists
@jcanfield
jcanfield / 0_reuse_code.js
Created March 4, 2016 22:02
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@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 / modification-via-stackoverflow.text
Created November 6, 2015 17:18
Instagram API to display recent photos in WordPress
// Modifications via StackOverflow
You are receiving the data in the right order, but then you are using the shuffle() function on the images array $a_images you created .
if you remove the shuffle($a_images); from your code it'll be just fine.
and replace $image[link], $image[url] and // // $image[caption] with $image['link'], $image['url'] and $image['caption']
sorry for bad english
@jcanfield
jcanfield / osx-new-system-install-apps.md
Created November 2, 2015 19:27
OSX (New Setup/System) Application Installations using Homebrew, Ruby Gems, Node.js, Composer.php and More. (Last Updated November 2, 2015).

Installed Applications

Homebrew

  • To be added

Ruby Gems

  • (sudo) gem install gitignores
@jcanfield
jcanfield / free-public-dns-servers.20151031.md
Created November 1, 2015 01:50
Free Public DNS Servers - Last Updated on October 31, 2015

Open DNS Server List

(Source Link)

Google Public DNS IPv4 Addresses

  • 8.8.8.8
  • 8.8.4.4

Google Public DNS IPv6 Addresses

@jcanfield
jcanfield / openNIC-public-dns-server-list.md
Last active August 31, 2022 15:39
OpenNIC Public Servers - Last Updated on October 31, 2015

OpenNIC Public Servers

(Source Link)

Hostname | IPv4 | IPv6 | Owner(s) | Added | Status

  • ns2.tx.us.dns.opennic.glue | 69.164.196.21 | purrdeta | 2011-Aug-06 | (Pass)
  • ns1.co.us.dns.opennic.glue | 216.87.84.211| 2001:470:8388:10:0:100:53:20 | shdwdrgn | 2011-Aug-06 | (Pass)
  • ns4.tx.us.dns.opennic.glue | 2600:3c00::02:f053 | purrdeta | 2011-Aug-06 | (Pass)
  • ns2.co.us.dns.opennic.glue | 2001:470:8388:10:0:100:53:20 | shdwdrgn | 2011-Aug-06 | Remove
  • ns10.tx.us.dns.opennic.glue | 2600:3c00::20:b1ff | bersl2 | 2012-Feb-24 | (Pass)