Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Mathews ryanjm

View GitHub Profile
@ryanjm
ryanjm / post-commit
Created May 7, 2012 — forked from c00kiemon5ter/post-commit
a hook to deploy static generated sites
View post-commit
#!/usr/bin/env bash
# executables prefix
_prefix="/usr/local/bin"
# git executable
_git="$_prefix/git"
# site generation executable
_generate="$_prefix/jekyll"
# options for the generator
@ryanjm
ryanjm / gist:2320468
Created Apr 6, 2012
Special variables for dates
View gist:2320468
# == Schema Information
#
# Table name: showings
#
# id :integer not null, primary key
# start_time :datetime
# end_time :datetime
class Showing < ActiveRecord::Base
attr_accessor :showing_date, :start_date, :end_date
@ryanjm
ryanjm / log
Created Feb 15, 2012
Devise NoMethodError
View log
Started GET "/sign_in" for 127.0.0.1 at 2012-02-15 09:39:58 -0600
NoMethodError (undefined method `scoped_path' for nil:NilClass):
devise (2.0.1) app/controllers/devise_controller.rb:164:in `_prefixes'
actionpack (3.2.0) lib/abstract_controller/view_paths.rb:45:in `lookup_context'
actionpack (3.2.0) lib/abstract_controller/rendering.rb:44:in `process'
actionpack (3.2.0) lib/action_controller/metal.rb:203:in `dispatch'
actionpack (3.2.0) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.2.0) lib/action_controller/metal.rb:246:in `block in action'
actionpack (3.2.0) lib/action_dispatch/routing/route_set.rb:66:in `call'
@ryanjm
ryanjm / OQCAppDelegate.m
Created Nov 2, 2011
Issue with CGContext and iOS5
View OQCAppDelegate.m
- (void)applicationDidFinishLaunching:(UIApplication *)application {
...
[self.navigationController.navigationBar setNeedsDisplay];
...
}
@ryanjm
ryanjm / gist:1294487
Created Oct 18, 2011
Error generating files for Octopress
View gist:1294487
~/code/ryanjm[source]% rake generate
## Generating Site with Jekyll
unchanged sass/screen.scss
Configuration from /Users/RyanJM/code/ryanjm/_config.yml
/Users/RyanJM/.rvm/gems/ruby-1.9.2-p180/gems/ffi-1.0.9/lib/ffi_c.bundle: [BUG] unknown type 0x22 (0xc given)
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]
-- control frame ----------
c:0038 p:---- s:0120 b:0120 l:000119 d:000119 CFUNC :initialize
c:0037 p:-541620956 s:0118 b:0118 l:000117 d:000117 TOP
View campaign.html.erb
<section id="new_subscriber">
<div class="payment-errors"> </div>
<%= form_for @subscriber, :url => campaign_subscribers_path(@campaign) do |f| %>
<%= f.hidden_field :campaign_id, :value => @campaign.id %>
<%= f.fields_for :stripe_customer do |s| %>
<%= s.hidden_field :stripe_token %>
<% end %>
<ul>
@ryanjm
ryanjm / Rails CMS alternatives
Created Jun 13, 2011 — forked from ffmike/Rails CMS alternatives
List of Rails CMS software
View Rails CMS alternatives
Rails CMS alternatives
======================
I've updated this as of 6/14/11. Looking at only active projects
Active projects:
---------------
BrowserCMS
repo: http://github.com/browsermedia/browsercms
site: http://www.browsercms.org/
@ryanjm
ryanjm / New Mac setup
Created Feb 26, 2011
Things to do / install when getting a new mac
View New Mac setup
Set your password
Put in Apple Account
Chrome
Setup Mail
Mac Software Updates
Evernote - app store
Alfred - app store
- Change spotlight shortcut and set command+space as alfred
Setup caps lock to be control
Caffeine - lighthead - app store
View .gitignore for XCode project
# http://blog.illuminex.com/2009/10/better-sample-gitignore-file-for-xcode.html
# Mac OS X Finder and whatnot
.DS_Store
# Sparkle distribution Private Key (Don't check me in!)
dsa_priv.pem
View gist:348308
After do |scenario|
if scenario.failed? && scenario.exception.is_a?(Webrat::NotFoundError)
save_and_open_page
end
end
You can’t perform that action at this time.