Skip to content

Instantly share code, notes, and snippets.

View warnergodfrey's full-sized avatar

Warner Godfrey warnergodfrey

  • Melbourne, Australia
  • 19:41 (UTC +10:00)
View GitHub Profile
@warnergodfrey
warnergodfrey / production.log-20110907
Created September 8, 2011 01:18
Post deploy error on production application server
Started GET "/extranet/property_engagements/10021/update_or_invite" for 124.180.69.198 at 2011-09-07 00:06:44 -0700
Processing by Extranet::HomeController#rescue_404 as HTML
Parameters: {"utf8"=>"<E2><9C><93>", "authenticity_token"=>"f9YWQWTDBHz5iKBMpeXRfQxz/mY8vRb5z9JehTPunns=", "user"=>{"name"=>"-Test- Hotel -Test- Hotelier", "email"=>"test+0709@jqdev.net", "position"=>"Hotelier", "phone"=>"0406501864", "mobile_number"=>"", "country_id"=>"1", "street_address"=>"123 High St", "suburb"=>"Melbourne", "state_id"=>"1", "postcode"=>"3000"}, "commit"=>"Send email invite", "path"=>"extranet/property_engagements/10021/update_or_invite"}
Error404 Missing Page
Rendered errors/_error_footer.html.haml (1.2ms)
Rendered errors/error_404.html.haml within layouts/errors (5.6ms)
Compiled ~/data/hotels/releases/20110907065718/app/assets/stylesheets/errors.css.scss (38ms) (pid 28654)
Compiled ~/data/hotels/releases/20110907065718/app/assets/stylesheets/errors.css.scss (0ms) (pid 28654)
Rendered partials/_user_controls
@warnergodfrey
warnergodfrey / pg_log
Created September 8, 2011 01:20
Post deploy error on production database master
2011-09-06 23:35:08.495 PDT,"deploy","hotels",5246,"10.166.145.198:48797",4e6451e5.147e,1,"idle",2011-09-04 21:36:53 PDT,5/0,0,LOG,08P01,"unexpected EOF on client connection",,,,,,,,,""
2011-09-06 23:39:00.364 PDT,"deploy","hotels",5191,"10.167.3.96:59244",4e6451b9.1447,1,"idle",2011-09-04 21:36:09 PDT,3/0,0,LOG,08P01,"unexpected EOF on client connection",,,,,,,,,""
2011-09-06 23:59:06.227 PDT,"deploy","hotels",5941,"10.166.145.198:56589",4e6453a7.1735,1,"idle",2011-09-04 21:44:23 PDT,9/0,0,LOG,08P01,"unexpected EOF on client connection",,,,,,,,,""
2011-09-06 23:59:06.525 PDT,"deploy","hotels",25696,"10.167.3.96:56872",4e671256.6460,1,"idle",2011-09-06 23:42:30 PDT,5/0,0,LOG,08P01,"unexpected EOF on client connection",,,,,,,,,""
@warnergodfrey
warnergodfrey / postgresql-9.0-main.log
Created September 26, 2011 03:55
Postgres Deadlock Issue
2011-09-26 03:42:15 UTC DETAIL: Process 30908 waits for RowExclusiveLock on relation 1103847 of database 1103761; blocked by process 31174.
Process 31174 waits for AccessExclusiveLock on relation 1103799 of database 1103761; blocked by process 30908.
Process 30908: INSERT INTO "properties" ("account_number", "api_source_id", "atdw_id", "cancellation_policy_id", "chain_id", "check_in_after", "check_out_before", "country_id", "created_at", "description", "gst_applicable", "latitude", "longitude", "maximum_child_age", "maximum_infant_age", "name", "number_of_rooms", "policy_info", "postcode", "property_category_id", "property_group_id", "rating", "rating_type", "region_id", "room_type_code_sequence", "state_id", "status", "street_address", "street_address_2", "suburb", "time_zone", "updated_at", "url") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33) RETURNING "id"
Process 3
table = OfferByDate.arel_table
subquery = table.project('*').where(table[:offer_id].eq 1).where(table[:night_of].eq '2011-10-21').as('subquery')
sql = Arel::Table.new('dummy').project('*').from(subquery).to_sql
ActiveRecord::Base.connection.select_all(sql).to_json
@warnergodfrey
warnergodfrey / gist:1504908
Created December 21, 2011 06:29
NoMethodError: undefined method `upper' for nil:NilClass
>> nil.freeze
=> nil
>> Tilt.new("/Users/warner/work/newco/app/views/cancellation_policies/1_one_night.html.haml").render(nil, :opts => {})
NoMethodError: undefined method `upper' for nil:NilClass
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched@newco/gems/activesupport-3.1.3/lib/active_support/whiny_nil.rb:48:in `method_missing'
from /Users/warner/work/newco/app/views/cancellation_policies/1_one_night.html.haml:18:in `ensure in evaluate_source'
from /Users/warner/work/newco/app/views/cancellation_policies/1_one_night.html.haml:18:in `evaluate_source'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched@newco/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `instance_eval'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched@newco/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `evaluate_source'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched@newco/gems/tilt-1.3.3/lib/tilt/template.rb:144:in `cached_evaluate'
@warnergodfrey
warnergodfrey / gist:1552478
Created January 2, 2012 22:46
Newco vimrc
" Tab completion
set wildignore+=*.o,*.obj,.git,*.rbc,*.class,.svn,vendor/gems/*,tmp/*,coverage/*,public/*,spec/javascripts/generated/*,db/bootstrap/*,vendor/gems/:
" Command-T configuration
let g:CommandTMaxFiles=20000
@warnergodfrey
warnergodfrey / 50-delcom.rules
Last active October 8, 2015 00:10
Give Delcom USB light write permissions on Linux and prevent usbhid from claiming the device by adding the quirk to the boot commandline.
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fc5", ATTRS{idProduct}=="b080", ACTION=="add", SYMLINK+="delcom", MODE="0666", GROUP="plugdev"
@warnergodfrey
warnergodfrey / gist:4728855
Last active December 12, 2015 06:28
Get ATO AusKey to work on Mac OS X without f**king up your Java development environment
  • Install AusKey software
  • Show file contents of /Library/Internet Plug-Ins/JavaAppletPlugin.plugin
  • Move .JAR files from /Library/Java/Extensions to /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/ext

UPDATE 16/11/2013: AusKey no longer requires software to be installed on Mac OS X so these steps are no longer necessary

@warnergodfrey
warnergodfrey / gist:4759220
Last active December 12, 2015 10:29
Open file from iTerm 2 in existing mvim session (and start at the given line number)
  • Open iTerm2
  • Goto Preferences->Profiles->Advanced->Semantic history
  • Select Run Command...
  • Enter the command /usr/local/bin/mvim --remote +\2 \1