Skip to content

Instantly share code, notes, and snippets.

View brianpattison's full-sized avatar

Brian Pattison brianpattison

View GitHub Profile
@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 / 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 / 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 = {};
@brianpattison
brianpattison / _scti-jquerymobileheadings.md
Created October 6, 2011 20:24
jQuery Mobile style headings w/ sproutcore-titanium

jQuery Mobile style headings w/ sproutcore-titanium

tell application "iTunes"
repeat with s in sources
if (kind of s is iPod) then update s
end repeat
end tell
@brianpattison
brianpattison / gist:1375666
Created November 18, 2011 05:20
SproutCore Hack for Android V8? or Kindle Fire?
SC.defineProperty = function(obj, keyName, desc, val) {
var m = meta(obj, false), descs = m.descs, watching = m.watching[keyName]>0;
if (val === undefined) {
val = hasDesc(descs, keyName) ? descs[keyName].teardown(obj, keyName) : obj[keyName];
} else if (hasDesc(descs, keyName)) {
// FIXME: Hack for Android V8? or Kindle Fire? Throws teardown is undefined error
if (typeof descs[keyName].teardown === 'function') {
descs[keyName].teardown(obj, keyName);
}

Jailbreak Apps

Some free. Some not.

  • Brightness Switcher
  • FolderCloser
  • IntelliScreenX
  • LowPowerBanner
  • MyWi 5
  • NoNewsIsGoodNews
@brianpattison
brianpattison / nice_button.js
Created May 28, 2012 18:40
Extended Ember-Titanium Button
var Button = require('/components/button'),
ColorChanger = require('/lib/color_changer'),
Ember = require('/lib/em_ti/ember-runtime'),
ImageView = require('/lib/em_ti/ui/image_view'),
Label = require('/lib/em_ti/ui/label'),
View = require('/lib/em_ti/ui/view');
var BackgroundView = View.extend({
backgroundGradientBinding: Ember.Binding.transform(function(value) {
if (!Ember.none(value)) {
@brianpattison
brianpattison / user.js
Created May 28, 2012 18:44
ACS Users Controller Work in Progress
var Ember = require('/lib/em_ti/ember-runtime');
Keychain = require('com.obscure.keychain');
/**
@class
An Appcelerator Cloud Services User.
@extends Ember.Object
*/