Skip to content

Instantly share code, notes, and snippets.

View brianpattison's full-sized avatar

Brian Pattison brianpattison

View GitHub Profile
@brianpattison
brianpattison / development_setup.md
Last active August 29, 2015 14:01
Development Setup
@brianpattison
brianpattison / application_serializer.js
Created May 2, 2014 04:22
Spree + Ember-Data is coming...
Backend.ApplicationSerializer = DS.RESTSerializer.extend({
extractMeta: function(store, type, payload) {
store.metaForType(type, {
count: payload.count,
currentPage: payload.current_page,
pages: payload.pages
});
delete payload.count;
delete payload.current_page;
@brianpattison
brianpattison / github_api_stub.rb
Last active January 1, 2016 13:49
Inspecting octokit requests.
# https://github.com/drewbug/RackMotion
class GithubApiStub
def initialize(app)
@app = app
end
def call(request)
status, headers, data = @app.call(request)
@brianpattison
brianpattison / .git config
Last active December 25, 2015 15:59
Dokku command line tool
[core]
...
[remote "dokku"]
url = git@remote:appname
fetch = +refs/heads/*:refs/remotes/dokku/*
<div class="tool-tip">{{title}}</div>
<div class="tool-tip-hover-container">
{{yield}}
</div>
@brianpattison
brianpattison / Rm.rb
Created May 19, 2013 14:16
RubyMotion precompile error
# Error!
someiOSObject.send(:someMethod)
# No error!
someiOSObject.someMethod
someiOSObject.send(:someMethod)
@brianpattison
brianpattison / parse_email.md
Last active December 16, 2015 16:29
Partial Email From Parse.com Team 1/15/2013

Totally reasonable questions / concerns.

  1. Going under, going away, getting acquired, etc

We've raised ~7 million in venture funding so far from Google, Y Combinator, etc (https://parse.com/about/investors) and we still have a large chunk of that in the bank. We're looking towards our next fundraising round now to continue the infrastructure + product growth, expand our hiring efforts, etc.

Being acquired isn't part of our game plan for now. We want to build a viable business that people can use and enjoy. We have 50k apps built on our infrastructure and a huge customer base that is growing rapidly. Everyday we have more and more Basic, Pro, and Enterprise users paying us for our awesome services.

@brianpattison
brianpattison / README.md
Created November 22, 2012 07:41 — forked from tjogin/README.md
PHP on Pow.cx

PHP on Pow.cx

Install Pow

$ curl get.pow.cx | sh

Install PHP with MySQL

$ curl -O https://raw.github.com/gist/4129846/7ae1709453a8a19ce9c030bf41d544dd08d96d85/php.rb

$ mv php.rb brew --prefix/Library/Formula

@brianpattison
brianpattison / README.md
Last active October 13, 2015 00:58
Rubymotion Layout Wrapper

Rubymotion Layout Wrapper

There's a lot of wrappers for Rubymotion already. I've been collecting my personal wrappers in the Loco namespace. I'm really starting to like this layout wrapper, so I thought I'd share it.

Usage

Include the loco.rb file in your Rubymotion project and include the Loco::UIView module in any of your custom UIViews.

class SampleView < UIView
@brianpattison
brianpattison / example_code.js
Created July 25, 2012 08:15
Appcelerator Titanium + Pusher WebView
var pusherClient = require('/lib/pusher/pusher_client').create({
debug: true,
key: 'YOUR KEY'
});
pusherClient.subscribe('channel');
pusherClient.bind('event_name', function(data) {
// Do something
});