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
<html xmlns:fb="http://ogp.me/ns/fb#">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# oghowto: http://ogp.me/ns/fb/oghowto#">
<title>OG Tutorial App</title>
<meta property="fb:app_id" content="256521937796214" />
<meta property="og:type" content="oghowto:demo" />
<meta property="og:title" content="Open Graph HowTo" />
<meta property="og:image" content="http://placehold.it/200x200" />
<meta property="og:description" content="Minimum requirements to get Open Graph objects and actions working" />
<meta property="og:url" content="http://oghowto.herokuapp.com/test.html">
<style type="text/css">
@jcanfield
jcanfield / bootstrap-paged-navar.js
Created July 9, 2012 19:42 — forked from mattsgarrison/bootstrap-paged-navar.js
CoffeeScript and JavaScript results to enhance Twitter Bootstrap navbar's "active" tab for multiple pages (essentially supplanting scrollspy).
// Generated Output from CoffeeScript
jQuery(function() {
var a, b, c, d, e;
d = $(".topbar .nav a"), e = [];
for (b = 0, c = d.length; b < c; b++)
a = d[b], e.push(function(a) {
if (window.location.pathname === a.pathname)
return $(a).parent().toggleClass("active")
}(a));
return e
@jcanfield
jcanfield / wp-googlemaps-shortcode.php
Created July 22, 2012 18:10
Google Maps Shortcode for Wordpress
<?php
// Name: Google Maps Shortcode
// Description: Shortcode to display Google Maps in Page or Post
//Google Maps Shortcode
function fn_googleMaps($atts, $content = null) {
extract(shortcode_atts(array(
"width" => '640',
"height" => '480',
"src" => ''
@jcanfield
jcanfield / modernizr.custom.2.6.1.min.js
Created July 22, 2012 18:22
Modernizr 2.6.1 (with HTML5Shiv and PrintShiv)
/* Modernizr 2.6.1 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-flexbox_legacy-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-printshiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
*/
;
window.Modernizr = (function( window, document, undefined ) {
var version = '2.6.1',
@jcanfield
jcanfield / install.sh
Created July 26, 2012 23:46
Install Ruby and Homebrew on Mac OSX 10.7.3
#!/bin/bash
# We are going to install the latest version of Ruby on OSX
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
# Now load RVM into your shell
cd ~/
sudo vim .bash_profile
@jcanfield
jcanfield / dabblet.css
Created July 27, 2012 14:37 — forked from qhwa/dabblet.css
CSS3 progress bar
/**
* CSS3 progress bar
* desgin: http://dribbble.com/shots/522214-Progress-Bar
*/
body {
background-image: repeating-linear-gradient(0, #3C3540 0, #3C3540 50%, #38313B 50%, #38313B 100%);
background-size: 3px 1px;
}
.prog-bar {
@jcanfield
jcanfield / formalize.scss
Created August 5, 2012 22:45
Formalize.css Theme for Compass/SASS (SCSS)
.input_tiny {
width: 50px;
}
.input_small {
width: 100px;
}
.input_medium {
width: 150px;
@jcanfield
jcanfield / functions.php
Created August 6, 2012 19:15
Remove Query Strings from Wordpress Scripts
// Add to functions.php
<?php
function _remove_script_version( $src ){
$parts = explode( '?', $src );
return $parts[0];
}
add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );
@jcanfield
jcanfield / nettest.sh
Created August 26, 2012 16:37 — forked from rahulsom/nettest.sh
MacbookPro5,1 has a serious problem with it's wireless. Apple will not acknowledge it, but here's a fix
#!/bin/sh
#
# Tests network status and resets Airport if required
#
usage() {
cat << EOF
Usage: $0 options
-h HOST host to ping
-s <ON|OFF> say out loud: on or off default: OFF
@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/`