Skip to content

Instantly share code, notes, and snippets.

View rncrtr's full-sized avatar
😎
hacking on some code yo.

Ryan Carter rncrtr

😎
hacking on some code yo.
View GitHub Profile
@justinthiele
justinthiele / subscriptions.js
Created October 23, 2011 19:17
For those who aren't using coffeescript, here is the compiled Subscriptions javascript file from RailsCast #288 Billing with Stripe
(function() {
var subscription;
jQuery(function() {
Stripe.setPublishableKey($('meta[name="stripe-key"]').attr('content'));
return subscription.setupForm();
});
subscription = {
setupForm: function() {
return $('#new_subscription').submit(function() {
$('input[type=submit]').attr('disabled', true);
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();