Skip to content

Instantly share code, notes, and snippets.

View pushmatrix's full-sized avatar

Daniel Beauchamp pushmatrix

View GitHub Profile
warble aborted!
wrong argument type NilClass (expected Regexp)
/Users/db/.rvm/gems/jruby-1.5.1/gems/warbler-1.1.0/lib/warbler/runtime.rb:16:in `sub'
/Users/db/.rvm/gems/jruby-1.5.1/gems/warbler-1.1.0/lib/warbler/runtime.rb:16:in `initialize'
/Users/db/.rvm/gems/jruby-1.5.1/gems/warbler-1.1.0/lib/warbler/runtime.rb:33:in `new'
/Users/db/.rvm/gems/jruby-1.5.1/gems/warbler-1.1.0/lib/warbler/runtime.rb:33:in `specs_for_lock_file'
/Users/db/.rvm/gems/jruby-1.5.1/gems/warbler-1.1.0/lib/warbler/runtime.rb:33:in `map'
/Users/db/.rvm/gems/jruby-1.5.1/gems/warbler-1.1.0/lib/warbler/runtime.rb:33:in `specs_for_lock_file'
(erb):15:in `write_rb_lock'
<html>
<head>
<title>Test</title>
<script type="text/javascript" src="https://raw.github.com/Shopify/batman/master/lib/es5-shim.js"></script>
<script type="text/javascript" src="https://raw.github.com/Shopify/batman/master/lib/batman.js"></script>
<script type="text/javascript" src="https://raw.github.com/Shopify/batman/master/lib/batman.solo.js"></script>
<script type="text/javascript" src="https://raw.github.com/Shopify/batman/master/lib/coffee-script.js"></script>
</head>
<body>
@pushmatrix
pushmatrix / gist:1608694
Created January 13, 2012 21:06
sample product stuff
{"products":[{"body_html":"\u003Cp\u003ESo this is a product.\u003C/p\u003E\n\u003Cp\u003EThe text you see here is a Product Description. Every product has a price, a weight, a picture and a description. To edit the description of this product or to create a new product you can go to the \u003Ca href=\"/admin/products\"\u003EProducts Tab\u003C/a\u003E of the administration menu.\u003C/p\u003E\n\u003Cp\u003EOnce you have mastered the creation and editing of products you will want your products to show up on your Shopify site. There is a two step process to do this.\u003C/p\u003E\n\u003Cp\u003EFirst you need to add your products to a Collection. A Collection is an easy way to group products together. If you go to the \u003Ca href=\"/admin/custom_collections\"\u003ECollections Tab\u003C/a\u003E of the administration menu you can begin creating collections and adding products to them.\u003C/p\u003E\n\u003Cp\u003ESecond you\u0026#8217;ll need to create a link from your shop\u0026#8217;s navigation menu to your
@pushmatrix
pushmatrix / gist:3365613
Created August 16, 2012 02:00
A fun sinatra app with twilio
require 'sinatra'
require 'twilio-ruby'
@account_sid = # PUT IN YOUR ACCOUNT ID
@auth_token = # PUT IN YOUR AUTH TOKEN
@client = Twilio::REST::Client.new(@account_sid, @auth_token)
ACCOUNT = @client.account
get '/script' do
@pushmatrix
pushmatrix / sample.erb
Created October 30, 2012 01:37
Dashing Dashboard sample
<% content_for(:title) { "My super sweet dashboard" } %>
<div class="gridster">
<ul>
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="karma" data-view="Number" data-title="Karma" style="background-color:#96bf48;"></div>
</li>
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="valuation" data-view="Number" data-title="Current Valuation" data-prefix="$"></div>
</li>
@pushmatrix
pushmatrix / gist:3977957
Created October 30, 2012 02:28
Demonstration of two Number Widgets.
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="karma" data-view="Number" data-title="Karma" style="background-color:#96bf48;"></div>
</li>
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="valuation" data-view="Number" data-title="Current Valuation" data-moreinfo="In billions" data-prefix="$"></div>
</li>
@pushmatrix
pushmatrix / number.coffee
Created October 30, 2012 03:48
Number widget in Dashing
class Dashing.Number extends Dashing.Widget
ready: ->
# This is fired when the widget is done being rendered
onData: (data) ->
# Fired when you receive data
# You could do something like have the widget flash each time data comes in by doing:
# $(@node).fadeOut().fadeIn()
# Any attribute that has the 'Dashing.AnimatedValue' will cause the number to animate when it changes.
@pushmatrix
pushmatrix / number.html
Created October 30, 2012 03:56
Number widget in Dashing (HTML)
<h1 class="title" data-bind="title"></h1>
<h2 class="value" data-bind="current | shortenedNumber | prepend prefix"></h2>
<p class="change-rate">
<i data-bind-class="arrow"></i><span data-bind="difference"></span>
</p>
<p class="more-info" data-bind="moreinfo | raw"></p>
@pushmatrix
pushmatrix / application.coffee
Created October 30, 2012 07:27
Excerpt from a Dashing application.coffee file
Dashing.on 'ready', ->
Dashing.widget_margins ||= [5, 5]
Dashing.widget_base_dimensions ||= [300, 360]
Dashing.numColumns ||= 4
@pushmatrix
pushmatrix / sample_job.rb
Created October 30, 2012 07:39
Sample Dashing Job
# :first_in sets how long it takes before the job is first run. In this case, it is run immediately
SCHEDULER.every '1m', :first_in => 0 do |job|
send_event('karma', { current: rand(1000) })
end