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 / 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 / index.html
Created July 28, 2012 02:28
DublinCore, Facebook Meta Tag and Geolocation Meta Tags (HTML5)
<!DOCTYPE html>
<html lang="en">
<head>
<title>Lonely Women Cooks For Nobody</title>
<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="Lonely Women Cooks For Nobody<">
<meta name="DC.creator" content="William Clinton (http://www.man-has-his-needs.com/">
<meta name="DC.subject" content="Politics">
@jcanfield
jcanfield / .gitconfig
Created August 3, 2012 03:52
GIT Invoice
## GIT Configuration
## Local found at `~/.gitconfig`
## Installation: Add snippet to .gitconfig file
## Usage: `git invoice` to list recent commits in "pretty format"
## Credit: @svizion (http://twitter.com/svizion)
[alias]
invoice = log --pretty=format:'%ad - %s' --abbrev-commit --date=short
@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 / functions.php
Created August 10, 2012 06:21
Wordpress Embed PDF Shortcode
// Embed PDF File using shortcode
// Usage- [embedpdf
function embedthepdf($atts, $content = null) {
extract(shortcode_atts(array(
"id" => 'default-embed',
"url" => 'http://samplepdf.com/sample.pdf',
"width" => '990px',
"height" => '743px'
), $atts));
@jcanfield
jcanfield / cache.htaccess
Created August 10, 2012 22:49 — forked from kurtpayne/cache.htaccess
.htaccess caching rules
<IfModule mod_mime.c>
# Text
AddType text/css .css
AddType application/x-javascript .js
AddType text/html .html .htm
AddType text/richtext .rtf .rtx
AddType text/plain .txt
AddType text/xml .xml
@jcanfield
jcanfield / makeapp.sh
Created August 16, 2012 19:32
Create WebApp with Chrome on Mac OSX
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline
@jcanfield
jcanfield / checkserverheads.js
Created August 19, 2012 18:06
Check Server Headers Bookmarklet
// Bookmarklet by Joshua Canfield (Code Clarity -- www.icodeclarity.com)
// Using URI-Valet services
javascript:var url = prompt("Enter Domain to check Server Headers");window.open('http://urivalet.com/?'+ url, '_blank');
@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