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 / grid.scss
Created September 23, 2012 22:58
Grid generator as SASS mixin (part of PlainPage 2.0 framework)
// @mixin grid($columnCount:12, $unitRatio: 3, $width: 100%) {
// @param $columnCount
// Qty of columns. Defaults to 12.
// @param $unitRatio
// Column to gutter ratio. All grids are ususally build around grid units. Defaults to 3.
// @param $width
// Grid width. If specified in %, grid automatically becomes fluid.
// @return
// CSS markup for fluid or fixed grid.
@mixin grid($columnCount:12, $unitRatio: 3, $width: 100%) {
@jcanfield
jcanfield / bookmarklet.html
Created September 29, 2012 21:06
Page Load Time Bookmarklet
javascript:var websiteurl = prompt("Enter Website URL to test page load times. IE- yourdomain.com");window.open('http://' + websiteurl + '.loads.in');
@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 / 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 / schoolofprivacy-proxylist.md
Last active November 1, 2015 05:40
Open Proxy List (Updated on October 31, 2015)

OPEN/PUBLIC PROXY SERVER LIST

Last Update on October 31, 2015

LIST-

  • 185.26.183.14:80
  • 200.124.8.198:3128
  • 162.208.49.45:3127
  • 80.191.127.243:8080
@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 / 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 / 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
#!/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 / 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