Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View brianpattison's full-sized avatar

Brian Pattison brianpattison

View GitHub Profile
@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 / development_setup.md
Last active August 29, 2015 14:01
Development Setup
@brianpattison
brianpattison / README.md
Last active August 29, 2015 14:01
MenuMotion Proposal

MenuMotion

MenuMotion is a RubyMotion wrapper inspired by Formotion for creating OS X status bar menus with a syntax that should feel familiar if you've used Formotion.

Installation

Add this line to your application's Gemfile:

gem "menu-motion"
@brianpattison
brianpattison / jamon_hash.rb
Last active August 29, 2015 14:14
JamonHash.rb
class JamonHash < HashWithIndifferentAccess
def default(key = nil)
if key.is_a?(String) && key.include?(".")
find_value(key.split("."))
else
super
end
end
def find_value(keys)
@brianpattison
brianpattison / spaces.rb
Created April 10, 2015 17:40
Spaces > Tabs
hash = {
aligning: "key/values",
is: "so much",
easier: "with spaces"
}
@brianpattison
brianpattison / README.md
Last active August 29, 2015 18:02
Google Material Design: Sass Color Function
@brianpattison
brianpattison / dialoggs_login.html
Created August 17, 2011 19:32
CSS Experiment: Dialoggs Login
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Dialoggs Login</title>
<style>
body {
background-color: #dbdcdd;
@brianpattison
brianpattison / Programming Stuff.md
Created August 17, 2011 18:50
Programming Stuff

Programming Stuff

Ruby on Rails

I really learned the most about object oriented programming by playing with Ruby on Rails.

PeepCode

PeepCode rocks! Excellent screencasts for beginners and advanced coders. Here's a handful of good ones. The first two are specifically for beginners.

@brianpattison
brianpattison / css_media_queries_example.html.erb
Created September 10, 2011 01:11
My CSS Setup w/ Media Queries
<!-- It'd be easy for me to do what you want without changing much -->
<%= stylesheet_link_tag 'desktop/desktop' %>
<%= stylesheet_link_tag 'tablet/tablet', :media => 'only screen and (min-width: 768px) and (max-width: 991px)' %>
<%= stylesheet_link_tag 'mobile/mobile', :media => 'only screen and (max-width: 767px)' %>
<!-- Changed This -->
<meta name="viewport" content="width=device-width" />
<!-- To This -->
@brianpattison
brianpattison / SproutCoreTitanium.js
Created September 26, 2011 17:50
SproutCore Modifications for use in Titanium
// SproutCore Modifications to version 2.0.beta.3 Metal and Runtime,
// and SproutCore wrappers for several Appcelerator Titanium views
// Brian Pattison @brianpattison
///////////////////
// sproutcore.js //
///////////////////
// Added to the beginning of sproutcore.js
var window = {};