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 / shrink-git-repo.rb
Created October 11, 2014 21:25
Optimize and Shrink your GIT Repository (Ruby Script). From Jeff Smith @ rallydev.com.
#!/usr/bin/env ruby
# Original Scripting by Jeff Smith at http://rallydev.com/, https://www.rallydev.com/community/engineering/shrinking-git-repository-move-githubcom.
module ShrinkIt
BUCKETS = 4
def self.remove(files)
files.each_slice(files.size / BUCKETS) do |portion|
paths = portion.join(" ")
ShrinkIt.stream_command("git filter-branch --index-filter 'git rm --cached --ignore-unmatch #{paths}'")
@shawn-crigger
shawn-crigger / listing_image.class.php
Created October 16, 2014 17:46
Using PDO::FETCH_CLASS like a Boss, straight object oriented masterbation lol.
<?php
/**
* Listing_Image is a sample class for demonstrating the PDO::FETCH_CLASS method, like a boss.
*
* Example usage:
*<code>
* $img = $q->fetch(PDO::FETCH_CLASS, "Listing_Image");
* echo $img->get_image_tag();
*</code>
<?php
/**
* Listing_Image is a sample class for demonstrating the PDO::FETCH_CLASS method, like a boss.
*
* Example usage:
*<code>
* $img = $q->fetch(PDO::FETCH_CLASS, "Listing_Image");
* echo $img->get_image_tag();
*</code>
@jcanfield
jcanfield / osx-10.10-setup.md
Last active August 29, 2015 14:12 — forked from kevinelliott/osx-10.10-setup.md
Josh's Blank Canvas for an OSX Reinstall based upon the work of kevinelliott/osx-10.10-setup.md. (Please note that below the Homebrew Installation I have not modified. There are a few Tools that I use differently. For instance, I am a Sublime Text 3 user, Vagrant and iTerm2 User.)

Mac OS X 10.10 Yosemite

Let's get started. Kevin did a great job on setting up this Gist. My goal is to refine it and retool it to work with my my OSX and Development environments. So here were f*cking go..

Install Software

The software selected is software that is "tried and true" --- software I need after any fresh install. I often install other software not listed here, but is handled in a case-by-case basis.

Install from App Store

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php echo $post->title; ?></title>
<link rel="stylesheet" href="https://www.drmcdougall.com/wp/wp-admin/load-styles.php?c=1&amp;dir=ltr&amp;load=dashicons,wp-admin,buttons,wp-auth-check&amp;ver=4.1" type="text/css" media="all">
</head>
<body>
<div class="wrap">
@jcanfield
jcanfield / semantic-markup-example-html5.html
Last active August 29, 2015 14:27 — forked from Hogent/semantic-markup-example-html5.html
Gist for article on HTML5 semantics
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Page Title | Site Name</title>
<meta name="description" content="page description">
<link rel="stylesheet" href="style.css">
<!--[if lt IE 9]>
<script src="html5shiv.js"></script>
<![endif]-->
@dwabnitz
dwabnitz / revised-font-stack.css
Created August 2, 2010 20:40 — forked from jonbuda/revised-font-stack.css
A Revised Web Font Stack Selection
/*
A Revised Font Stack
from A Way Back
http://www.awayback.com/revised-font-stack/
*/
/*
@thebird
thebird / PrimeEmailSignature.html
Created November 15, 2010 08:47
The official Prime Studios email signature
<table style="border-top-color: #dfdfdf; border-top-width: 1px; border-top-style: solid; width: 100%; margin-top: 10px;" border="0" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td align="left" valign="top">
<p style="margin: 0; padding: 0; font-family: Helvetica Neue, Helvetica, Arial, sans-serif; margin-top: 8px; font-weight: bold; color: #333; font-size: 12pt; line-height: 17pt;">Full Name</p>
<p style="margin: 0; padding: 0; font-family: Helvetica Neue, Helvetica, Arial, sans-serif; color: #a0a0a0; font-size: 8pt;">Prime Studios</p>
</td>
<td align="right" valign="top">
<p style="margin: 0; padding: 0; font-family: Helvetica Neue,Helvetica,Arial,sans-serif; margin-top: 8px; font-weight: bold; color: #333; font-size: 12pt; line-height: 17pt;">Phone Number</p>
<p style="margin: 0; padding: 0;"><a style="margin: 0; padding: 0; font-family: Helvetica Neue,Helvetica,Arial,sans-serif; color: #a0a0a0; font-size: 8pt; text-decoration: none;"
@kirkegaard
kirkegaard / sync.js
Created July 18, 2011 22:56
quick and dirty rsync backup script in node.js
#!/usr/local/bin/node
var sys = require('sys')
, fs = require('fs')
, exec = require('child_process').exec
, colors = require('colors');
var dest = '/Volumes/Drobo/BACKUP/'
, logfile = '.sync/log'
, folders = [
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Logging you via Ubuntu SSO</title>
<style type="text/css">
body { font-family: sans-serif; font-size: 10pt; color: black; background-color: white; }
h1 { height: 32px; }
#errorMessage { border-left: 3px solid red; padding: 5px; margin: 10px 0; }
.hidden { display: none; }