Skip to content

Instantly share code, notes, and snippets.

View darrentorpey's full-sized avatar
🤖
robots all the way down

Darren Torpey darrentorpey

🤖
robots all the way down
View GitHub Profile
<a href="" class="toggle_form_style">Toggle form style</a>
<form accept-charset="UTF-8" action="/shopping/checkout/update/address" class="checkout_form formtastic spree_order" id="checkout_form_address" method="post" novalidate="novalidate"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"><input name="_method" type="hidden" value="put"><input name="authenticity_token" type="hidden" value="uM2v0Q6eSbGgeJgGgm7LgTFCqub/zT6c0KeNy+KpwUo="></div>
<section class="main_col" data-hook="checkout_content">
<div class="columns alpha six" data-hook="billing_fieldset_wrapper">
<div class="form_box billing_info" id="billing" data-hook="">
<header><h2>Billing Information</h2></header>
<div class="body">
<fieldset class="inputs">
<a href="" class="toggle_form_style">Toggle form style</a>
<form accept-charset="UTF-8" action="/shopping/checkout/update/address" class="checkout_form formtastic spree_order" id="checkout_form_address" method="post" novalidate="novalidate"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"><input name="_method" type="hidden" value="put"><input name="authenticity_token" type="hidden" value="uM2v0Q6eSbGgeJgGgm7LgTFCqub/zT6c0KeNy+KpwUo="></div>
<section class="main_col" data-hook="checkout_content">
<div class="columns alpha six" data-hook="billing_fieldset_wrapper">
<div class="form_box billing_info" id="billing" data-hook="">
<header><h2>Billing Information</h2></header>
<div class="body">
<fieldset class="inputs">
@darrentorpey
darrentorpey / style.sass
Created November 6, 2012 21:50
A CodePen by Darren Torpey. PB Buttons
@import "compass"
// == BUTTONS ==
$g_button_colors: 'blue', 'green', 'lightblue', 'silver'
// =======
// Helpers
// -------
=button_color($text_color: false, $text_shadow: false, $bg_light: false, $bg_dark: false, $bg_default: $bg_dark, $border: false)
@darrentorpey
darrentorpey / style.sass
Created November 6, 2012 21:50
A CodePen by Darren Torpey. PB Buttons
@import "compass"
// == BUTTONS ==
$g_button_colors: 'blue', 'green', 'lightblue', 'silver'
// =======
// Helpers
// -------
=button_color($text_color: false, $text_shadow: false, $bg_light: false, $bg_dark: false, $bg_default: $bg_dark, $border: false)
@darrentorpey
darrentorpey / style.sass
Created November 6, 2012 21:50
A CodePen by Darren Torpey. PB Buttons
@import "compass"
// == BUTTONS ==
$g_button_colors: 'blue', 'green', 'lightblue', 'silver'
// =======
// Helpers
// -------
=button_color($text_color: false, $text_shadow: false, $bg_light: false, $bg_dark: false, $bg_default: $bg_dark, $border: false)
@darrentorpey
darrentorpey / underscore_primer.md
Last active September 11, 2017 16:19
An underscore.js primer

An Underscore.js Primer

Written by Darren Torpey and presented to Rue La La in May 2013.

This guide was written based upon Underscore.js version 1.4.4.

What is Underscore.js? How does it help us?

From the official website:

@darrentorpey
darrentorpey / process_json_with_underscore.js
Created May 22, 2013 14:28
A real-world-y example of using underscore to process, reformat, and restructure JSON-like data.
function report(name, data) {
console.log('===============');
console.log(name, data);
console.log(JSON.stringify(data));
}
var jsonData = [
{
id: 1,
name: 'Darren',
@darrentorpey
darrentorpey / script.js
Created May 23, 2013 17:25
A CodePen by Darren Torpey. Real-world-y underscore.js example
function report(name, data) {
console.log('===============');
console.log(name, data);
console.log(JSON.stringify(data));
}
var jsonData = [
{
id: 1,
name: 'Darren',
@darrentorpey
darrentorpey / git_tips_n_tricks.md
Last active December 29, 2015 00:09
Git tips and tricks

Let's say we have a feature branch:

git checkout -b feature/9999-awesome-things

We can compare this branch's history with another history:

# This will show all changes we've added "since" the tip of master
git log feature/9999-awesome-things..
@darrentorpey
darrentorpey / components.js
Created January 20, 2014 01:34
Updated code to adapt the original code from my Crafty tutorial (http://buildnewgames.com/introduction-to-crafty/) to work with Crafty 0.6.1
// The Grid component allows an element to be located
// on a grid of tiles
Crafty.c('Grid', {
init: function() {
this.attr({
w: Game.map_grid.tile.width,
h: Game.map_grid.tile.height
});
},