Skip to content

Instantly share code, notes, and snippets.

View murraycs's full-sized avatar

Murray Sampson murraycs

View GitHub Profile

Keybase proof

I hereby claim:

  • I am murraycs on github.
  • I am murrayc (https://keybase.io/murrayc) on keybase.
  • I have a public key ASA9nm1tdV9DN44ka2cjV_cSTSj5Fluk3xBLH3YDhrgHtQo

To claim this, I am signing this object:

@murraycs
murraycs / gist:2860698
Created June 3, 2012 00:26
Heroku error log for when ie9 tries to submit a user profile edit
2012-06-03T00:25:09+00:00 app[web.1]: Parameters: {"id"=>"murray"}
2012-06-03T00:25:09+00:00 app[web.1]: Processing UsersController#edit (for 71.35.139.15 at 2012-06-02 17:25:09) [GET]
2012-06-03T00:25:10+00:00 app[web.1]: Rendering template within layouts/application
2012-06-03T00:25:10+00:00 app[web.1]: Rendering users/edit
2012-06-03T00:25:10+00:00 app[web.1]: Completed in 1549ms (View: 304, DB: 911) | 200 OK [http://www.africansingles.co/murray/edit]
2012-06-03T00:25:10+00:00 heroku[router]: GET www.africansingles.co/murray/edit dyno=web.1 queue=0 wait=0ms service=2845ms status=200 bytes=26751
2012-06-03T00:25:10+00:00 heroku[nginx]: 71.35.139.15 - - [03/Jun/2012:00:25:10 +0000] "GET /murray/edit HTTP/1.1" 200 6705 "http://www.africansingles.co/murray" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)" www.africansingles.co
2012-06-03T00:25:11+00:00 heroku[router]: GET www.africansingles.co/javascripts/application.js?1338683056 dyno=web.1 queue=0 wait=0ms service=2ms status=200 byt
@murraycs
murraycs / gist:2839553
Created May 30, 2012 23:30
Heroku error log
2012-05-30T23:04:01+00:00 app[web.1]: .bundle/gems/ruby/1.8/gems/actionpack-2.3.4/lib/action_view/base.rb:257:in `render_without_haml'
2012-05-30T23:04:01+00:00 app[web.1]: .bundle/gems/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/mime_responds.rb:179:in `call'
2012-05-30T23:04:01+00:00 app[web.1]:
2012-05-30T23:04:01+00:00 app[web.1]: vendor/plugins/community_engine/app/views/users/_profile_user_info_sidebar.html.haml:67:in `_run_haml_vendor47plugins47community_engine47app47views47users47_profile_user_info_sidebar46html46haml_locals_object_profile_user_info_sidebar'
2012-05-30T23:04:01+00:00 app[web.1]: .bundle/gems/ruby/1.8/gems/haml-2.2.2/lib/haml/helpers.rb:325:in `call'
2012-05-30T23:04:01+00:00 app[web.1]: .bundle/gems/ruby/1.8/gems/haml-2.2.2/lib/haml/helpers.rb:325:in `capture_haml'
2012-05-30T23:04:01+00:00 app[web.1]: ActionView::TemplateError (undefined method `turn_height_into_display' for #<ActionView::Base:0x7f86286a5918>) on line #67 of vendor/plugins/community_engi
source :rubygems
gem "rails", "2.3.4"
gem "desert", "0.5.2"
gem "rmagick"
gem "hpricot"
gem "htmlentities"
gem "rake", "0.8.3"
gem "haml", "2.2.2"
gem "calendar_date_select"
gem "ri_cal"
@murraycs
murraycs / error.log
Created March 29, 2012 00:03
Heroku error log
2012-03-28T23:42:11+00:00 heroku[nginx]: 71.35.139.15 - - [28/Mar/2012:23:42:11 +0000] "GET /plugin_assets/community_engine/images/search.gif HTTP/1.1" 200 340 "http://diasporaafricansingles.com/plugin_assets/community_engine/stylesheets/screen.css?1332368031" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20100101 Firefox/11.0" diasporaafricansingles.com
2012-03-28T23:42:18+00:00 app[web.1]:
2012-03-28T23:42:18+00:00 app[web.1]: Processing FriendshipsController#create (for 71.35.139.15 at 2012-03-28 16:42:18) [POST]
2012-03-28T23:42:18+00:00 app[web.1]:
2012-03-28T23:42:18+00:00 app[web.1]: Parameters: {"authenticity_token"=>"1wsfOpgnNFr62k4GfQZtDK63Y/HCjM4HGX55OFW6PUA=", "user_id"=>"3", "friend_id"=>"5"}
2012-03-28T23:42:18+00:00 app[web.1]:
2012-03-28T23:42:18+00:00 app[web.1]: ActiveRecord::RecordNotFound (Couldn't find a FriendshipStatus identified by (:pending)):
2012-03-28T23:42:18+00:00 app[web.1]: vendor/plugins/community_engine/plugins/enumerations_mixin/lib/active_record/acts/e
@murraycs
murraycs / page.php
Created January 27, 2012 19:56
Page template
<?php get_header(); ?>
<div id="content">
<div id="contentleft">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php the_content(__('Read more'));?><div style="clear:both;"></div>
@murraycs
murraycs / Subscription form method
Created January 11, 2012 20:48
base_helper.rb
def subscription_form_for(subscription, free_trial = false)
cost = number_to_currency(subscription.price)
submit_tag = '<input type="image" src="http://g-ecx.images-amazon.com/images/G/01/asp/GMPayNowWithOutLogo.gif" border="0" style="margin:7px 0 0 10px;">'
if free_trial
options = {:start_date => 1.month.from_now}
else
options = {:process_immediately => true}
end
@murraycs
murraycs / search.rb
Created January 4, 2012 20:50
Search with height
def self.prepare_params_for_search(params)
search = {}.merge(params)
search['metro_area_id'] = params[:metro_area_id] || nil
search['gender'] = params[:gender] || nil
search['state_id'] = params[:state_id] || nil
search['country_id'] = params[:country_id] || nil
search['skill_id'] = params[:skill_id] || nil
search['education'] = params[:education] || nil
search['bodytype'] = params[:bodytype] || nil
search['children'] = params[:children] || nil
@murraycs
murraycs / search.rb
Created January 4, 2012 20:12
Search methods
def self.prepare_params_for_search(params)
search = {}.merge(params)
search['metro_area_id'] = params[:metro_area_id] || nil
search['gender'] = params[:gender] || nil
search['state_id'] = params[:state_id] || nil
search['country_id'] = params[:country_id] || nil
search['skill_id'] = params[:skill_id] || nil
search['education'] = params[:education] || nil
search['bodytype'] = params[:bodytype] || nil
search['children'] = params[:children] || nil
@murraycs
murraycs / create.rb
Created January 4, 2012 19:40
create methods
def create
@user = User.new(User::DEFAULTS.merge(params[:user]))
@user.role = Role[:member]
puts @user.height
if (!AppConfig.require_captcha_on_signup || verify_recaptcha(@user)) && @user.save
create_friendship_with_inviter(@user, params)
flash[:notice] = :email_signup_thanks.l_with_args(:email => @user.email)
redirect_to signup_completed_user_path(@user)
else
render :action => 'new'