Skip to content

Instantly share code, notes, and snippets.

View duffy-walsh's full-sized avatar

Dee Dub duffy-walsh

  • MongoDB
  • Denver
  • 10:47 (UTC -06:00)
View GitHub Profile
/* Shappify Inc - Product Builder App Styles */
/* =============================
Confirm Order
============================= */
.steps_body #builder_addtocart_button {
clear: both;
padding-top: 10px;
}
/* Shappify Inc - Product Builder App Styles */
/* =============================
Confirm Order
============================= */
.steps_body #builder_addtocart_button {
clear: both;
padding-top: 10px;
}
class SubmissionsController < ApplicationController
layout "pdf_layout"
skip_before_action :verify_authenticity_token
before_filter :verify_request_signature
after_filter :set_cors_headers
def index
shop = Shop.find_by_domain( params[:shop] )
ShopifyAPI::Base.activate_session( ShopifyAPI::Session.new( shop.domain, shop.token ) )
@duffy-walsh
duffy-walsh / Array Chunk
Created November 17, 2013 20:29
Array chunk prototype function from stackoverflow users ninjagecko and blazemonger; Take an array and return an array of its elements chunked into chunkSize
Array.prototype.chunk = function(chunkSize) {
var R = [];
for (var i=0; i<this.length; i+=chunkSize)
R.push(this.slice(i,i+chunkSize));
return R;
}
@duffy-walsh
duffy-walsh / gist:5462539
Created April 25, 2013 19:42
YQL snippet that can be used in YDL console (http://developer.yahoo.com/yql/console/) to produce JSON from Google Drive spreadsheet (credit: cdev)
select * from html where url = '<url of Google Drive spreadsheet>' and xpath = '//ul[contains(@id,"sheettabs")]/li/a'