Skip to content

Instantly share code, notes, and snippets.

View bmorton's full-sized avatar

Brian Morton bmorton

  • Microsoft
  • Oakland, CA
View GitHub Profile
@bmorton
bmorton / patchfile
Created July 3, 2012 22:14
patch nginx config for new service
--- yammer.dev 2012-07-03 15:08:47.777823104 -0700
+++ yammer.dev 2012-07-03 15:02:40.658173871 -0700
@@ -40,6 +40,10 @@
server localhost:7380;
}
+upstream mugshot {
+ server localhost:3133;
+}
+
@bmorton
bmorton / tmux-vagrant.sh
Created June 22, 2012 18:39
Tmux Template for Vagrant based workflow
#!/bin/sh
#
# Tmux Template for Vagrant based workflow
#
# Author: Chris Kempson
# Created: 04/03/12
# Updated: 04/03/12
#### CONFIG OPTIONS ####
@bmorton
bmorton / gist:2912361
Created June 11, 2012 20:10
Yammer.app backtrace
Incident Identifier: 091F6AB6-B421-4D81-8EC1-5FC19E543037
CrashReporter Key: 64f1b1aa5a9b6472d6e0cb8838ed0495d658896b
Hardware Model: iPhone4,1
Process: Yammer [1707]
Path: /var/mobile/Applications/8A1E0379-F167-443D-9629-61DC1A68D2D5/Yammer.app/Yammer
Identifier: Yammer
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
@bmorton
bmorton / Default (Linux).sublime-keymap
Created April 30, 2012 18:19 — forked from coldnebo/Default (Linux).sublime-keymap
simple scripts to prettify your xml and json in sublime text 2
[
{ "keys": ["ctrl+shift+x"], "command": "tidy_xml" },
{ "keys": ["ctrl+shift+j"], "command": "prettify_json" }
]
@bmorton
bmorton / ReleaseNotes.md
Created April 4, 2012 17:48
RestKit 0.10.0 Release Notes

RestKit 0.10.0 has been 8 months in the making and is the product of over 40 contributors putting in countless hours and testing. With this new release, we've added new features, put a new perspective on testing your RestKit apps, cleaned up and added documentation, and fixed bugs.

We'd like to note that moving forward, we will only be supporting Xcode 4.2 and greater.

Features

  • RKTableController and related components have been added to bring massive UI support to the iOS platform. Using RestKit's powerful object mapping engine, RKTableController and its related components are able to transform local objects into UITableViewCell representations allowing for an extremely clean and DRY UITableViewController. There is a WIP sample for demoing this new functionality: https://github.com/RestKit/RKGithub
  • Added a number of helpful classes to aid in the process of testing your object mappings and loaders. The testing support has no external dependencies and has no opinion about what testing library you use,
@bmorton
bmorton / Gemfile
Created March 21, 2012 03:37 — forked from mbleigh/Gemfile
Non-Rails Rackup with Sprockets, Compass, and Twitter Bootstrap
source "https://rubygems.org"
gem 'sprockets'
gem 'sprockets-sass'
gem 'sass'
gem 'compass'
gem 'bootstrap-sass'
@bmorton
bmorton / gist:1897362
Created February 24, 2012 04:04
RestKit build log
Build target RestKit
ProcessPCH /var/folders/fn/p69p9jbj6972xh9x4shns3ww0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/RestKit-Prefix-hktawhrtvtallibqwdadynzjlewv/RestKit-Prefix.pch.pth Code/Support/RestKit-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Volumes/1703india/Personal/Xcode/RestKit
setenv LANG en_US.US-ASCII
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c-header -arch i386 -fmessage-length=0 -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wmissing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-uninitia
@bmorton
bmorton / ECOrder.m
Created February 14, 2012 19:22
RestKit Serializations
// ECOrder.m
static RKObjectMapping *objectMapping = nil;
static RKObjectMapping *serializationMapping = nil;
+ (RKObjectMapping*)objectMapping {
if (objectMapping == nil) {
objectMapping = [RKObjectMapping mappingForClass:self];
[objectMapping mapKeyPath:@"id" toAttribute:@"orderID"];
[objectMapping mapKeyPath:@"user_id" toAttribute:@"userID"];
@bmorton
bmorton / ruby-debug19.markdown
Created January 23, 2012 23:00 — forked from amateurhuman/ruby-debug19.markdown
Install ruby-debug19 with ruby 1.9.3

Install ruby-debug19 with ruby 1.9.3

Download the following gems from http://rubyforge.org/frs/?group_id=8883

  • linecache19-0.5.13.gem

  • ruby-debug-base19-0.11.26.gem

    gem install ~/Downloads/linecache19-0.5.13.gem

You need to point to the directory with the Ruby header files (specifically method.h) and pass it with the gem install command. Should look something like:

@bmorton
bmorton / application_with_config.rb
Created January 23, 2012 06:44 — forked from mislav/application_with_config.rb
Read custom config from settings.yml into a Rails 3 app
# needs the "hashie" gem in Gemfile
require 'erb'
module Movies
class Application < Rails::Application
# read from "settings.yml" and optional "settings.local.yml"
settings = ERB.new(IO.read(File.expand_path('../settings.yml', __FILE__))).result
mash = Hashie::Mash.new(YAML::load(settings)[Rails.env.to_s])