Skip to content

Instantly share code, notes, and snippets.

View schof's full-sized avatar

Sean Schofield schof

  • Stedi
  • Washington, DC
View GitHub Profile
@duncansmart
duncansmart / progressive-ace.htm
Created March 28, 2013 23:29
Integrating ACE Editor in a progressive way
<textarea name="my-xml-editor" data-editor="xml" rows="15"></textarea>
...
<textarea name="my-markdown-editor" data-editor="markdown" rows="15"></textarea>
...
<script src="//d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js"></script>
<script>
// Hook up ACE editor to all textareas with data-editor attribute
$(function () {
@BDQ
BDQ / gist:3164364
Created July 23, 2012 15:55
Create Spree::Promotion for free shipping via console.
p = Spree::Promotion.create(event_name: "spree.checkout.coupon_code_added", name: "Free Shipping", code: "FREESHIPBD")
p.promotion_actions << Spree::Promotion::Actions::CreateAdjustment.create()
pa = p.promotion_actions.first
pa.calculator = Spree::Calculator::FreeShipping.new
#
# bash completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names