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 / index.html
Created September 4, 2012 04:30
HTML Meta Data for DublinCore and Geolocation
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/">
<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/">
<meta name="DC.title" content="Title of Website">
<meta name="DC.creator" content="Author">
<meta name="DC.subject" content="Subject. IE Business Type">
<meta name="DC.description" content="Complete Description of your Website">
<meta name="DC.publisher" content="Author">
<meta name="DC.contributor" content="Author and Contributors">
<meta name="DC.type" content="Text" scheme="DCTERMS.DCMIType">
<meta name="DC.format" content="text/html" scheme="DCTERMS.IMT">
@jcanfield
jcanfield / googlemaps_canvas.html
Created September 20, 2012 03:40
Driving Directions URL for usage with Google Maps API and Custom infoWindow
<!DOCTYPE html>
<html>
<head>
<title>Google Maps API and Driving Directions</title>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=true"></script>
<script type="text/javascript">
function initialize() {
var myLatlng = new google.maps.LatLng(39.928294, -105.147710);
var mapOptions = {
zoom: 15,
@jcanfield
jcanfield / gist:3773311
Created September 23, 2012 22:43 — forked from ocean90/gist:1544377
Compiling Compass.app on Mac OS X
Tutorial for compiling the Compass.app (http://compass.handlino.com/)
=====================================================================
Java installed?
java -version
Load jRuby (for example JRuby 1.6.5.1 Binary .zip)
http://jruby.org/download
Unzip jRuby to `/usr/local/`
@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 / gistrepo-shorten.sh
Created September 29, 2012 21:18
Git.io Generator (Bash Script)
#!/bin/bash
##
## Usage: gist-shorten.sh gistID urlshortenedname
echo "--> Creating git.io address for your Gist..."
curl -i http://git.io -F "url=https://gist.github.com/$1" \
-F "code=$2"
echo "--> Created http://git.io/$2 ..."
@jcanfield
jcanfield / 404.html
Created October 11, 2012 03:17
404 Not Found Template (via SusyBird.net and Modified)
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>404 Error</title>
<style>
::-moz-selection { background: #fe57a1; color: #fff; text-shadow: none; }
::selection { background: #fe57a1; color: #fff; text-shadow: none; }
html { padding: 30px 10px; font-size: 20px; line-height: 1.4; color: #737373; background: #f0f0f0; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
html, input { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
@jcanfield
jcanfield / fix-lazysmbolerr.sh
Created January 2, 2013 20:12
Fix for `dyld: lazy symbol binding failed: Symbol not found: _rb_utf8_encoding`
# Continued to receive this message when I would attempt to either run or install anything related to NodeJS. This was the error I received while running Juicer.
#
# $ juicer
# dyld: lazy symbol binding failed: Symbol not found: _rb_utf8_encoding
# Referenced from: /Users/jcanfield/.rvm/gems/ruby-1.9.3-p327/gems/nokogiri-1.5.6/lib/nokogiri/nokogiri.bundle
# Expected in: flat namespace
#
# dyld: Symbol not found: _rb_utf8_encoding
# Referenced from: /Users/jcanfield/.rvm/gems/ruby-1.9.3-p327/gems/nokogiri-1.5.6/lib/nokogiri/nokogiri.bundle
# Expected in: flat namespace
@jcanfield
jcanfield / fix-parserSegFault.sh
Created January 2, 2013 20:46
Error while running Ruby Gem `smusher`. "gems/json-1.7.5/lib/json/ext/parser.bundle: [BUG] Segmentation fault"
# $ smusher
# /Users/username/.rvm/gems/ruby-1.9.3-p327/gems/json-1.7.5/lib/json/ext/parser.bundle: [BUG] Segmentation fault
# ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
#
# Abort trap: 6
# This fix will remove all Ruby gems and reinstall bundler
read -p "Will now uninstall all Ruby gems..."
gem list | cut -d" " -f1 | xargs gem uninstall -aIx
@jcanfield
jcanfield / gist:4522006
Last active December 11, 2015 01:18
Copy SSH Key to Remote Server
# Copy SSH Keys to Remote Server (for password-less access)
#
# More information copying SSH Keys to remote servers can be found at, https://help.ubuntu.com/community/SSH/OpenSSH/Keys.
# Method One is to create a simple script.
# I typically create the script in my ~/.bin and symbolically it to my /usr/local/sbin.
# $ touch ~/.bin/copykeys.sh
# $ chmod +x ~/.bin/copykeys.sh
# $ nano ~/.bin/copykeys.sh
# $ sudo ln -s /home/yourusername/.bin/copykeys.sh /usr/local/sbin/copy-ssh-key