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
sudo aptitude install build-essential libsqlite3-dev php5-cli sun-java6-jre sun-java6-fonts ruby rdoc chromium-browser git-core phpmyadmin ruby-dev libxml2-dev libxslt1-dev
@jcanfield
jcanfield / revised-font-stack.css
Created September 4, 2011 19:04 — forked from dwabnitz/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/
*/
/*
@jcanfield
jcanfield / revised-font-stack.css
Created September 4, 2011 19:11 — forked from dwabnitz/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/
*/
/*
@jcanfield
jcanfield / issue.py
Created December 26, 2011 19:10 — forked from dlo/issue.py
git hook to push issues to github
#!/usr/bin/env python
"""
LICENSE
=======
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar
@jcanfield
jcanfield / deploy.sh
Created January 5, 2012 18:29 — forked from khalsah/deploy.sh
Experimental git sync & deploy hooks
#!/bin/sh
LOCAL_BRANCH="master"
LIVE_BRANCH="live"
REMOTE_NAME="web"
# Remote Name is your Deploy Branch. Default is web. Live Branch is the branch on the Remote Server that is merged with master to synchronize changes
if [ "$(git symbolic-ref -q HEAD)" != "refs/heads/${LOCAL_BRANCH}" ]; then
echo "Not on ${LOCAL_BRANCH}, not deploying"
exit 1
@jcanfield
jcanfield / bootstraped-tumblr-theme.html
Created May 2, 2012 18:03
bootstrap tumblr theme for quickredthought.tumblr.com
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{Title}</title>
<link rel='icon' href='{Favicon}'>
<link rel='shortcut icon' href='{Favicon}'>
<link rel='alternate' type='application/rss+xml' href='{RSS}'>
<meta name='description' content='{MetaDescription}'>
<meta name='color:Link' content='#6699cc'>
@jcanfield
jcanfield / pushup_css.css
Created May 11, 2012 18:06 — forked from og-shawn-crigger/pushup_css.css
CSS PushUp Like Effect
@font-face {font-family:"font";src:url("https://")}@media (touch-enabled),(-webkit-touch-enabled),(-moz-touch-enabled),(-o-touch-enabled),(-ms-touch-enabled),(modernizr){#touch{top:9px;position:absolute}}@media (transform-3d),(-webkit-transform-3d),(-moz-transform-3d),(-o-transform-3d),(-ms-transform-3d),(modernizr){#csstransforms3d{left:9px;position:absolute;height:3px;}}#generatedcontent:after{content:":)";visibility:hidden}
@jcanfield
jcanfield / gist:2862609
Created June 3, 2012 08:46 — forked from boucher/gist:1750375
Stripe PHP simple example
<?php
require 'path-to-Stripe.php';
if ($_POST) {
Stripe::setApiKey("YOUR-API-KEY");
$error = '';
$success = '';
try {
if (!isset($_POST['stripeToken']))
throw new Exception("The Stripe Token was not generated correctly");
@jcanfield
jcanfield / gist:2862616
Created June 3, 2012 08:48 — forked from boucher/gist:1750368
Stripe sample checkout form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Sample Form</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<script type="text/javascript">
@jcanfield
jcanfield / webhook-mailer.php
Created June 8, 2012 16:08 — forked from boucher/webhook-mailer.php
Stripe Webhook PHP Example
<?php
// SETUP:
// 1. Customize all the settings (stripe api key, email settings, email text)
// 2. Put this code somewhere where it's accessible by a URL on your server.
// 3. Add the URL of that location to the settings at https://manage.stripe.com/#account/webhooks
// 4. Have fun!
// set your secret key: remember to change this to your live secret key in production
// see your keys here https://manage.stripe.com/account