Skip to content

Instantly share code, notes, and snippets.

View asecondwill's full-sized avatar

will asecondwill

View GitHub Profile
@asecondwill
asecondwill / has_many through create log
Created August 24, 2014 00:01
log showing hasmany through not creating records
Started POST "/helm/coupons" for 127.0.0.1 at 2014-08-24 09:58:25 +1000
Processing by Helm::CouponsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"h8OjO3zqPVofhgQ8VYECea4kCCnXU+Lkn7L2QPJUDcM=", "coupon"=>{"name"=>"test", "code"=>"test", "dollar_discount"=>"5", "percent_discount"=>"", "max_uses"=>"1000000", "max_uses_per_customer"=>"1000000", "starts_at(1i)"=>"2014", "starts_at(2i)"=>"8", "starts_at(3i)"=>"24", "starts_at(4i)"=>"09", "starts_at(5i)"=>"00", "expires_at(1i)"=>"2017", "expires_at(2i)"=>"8", "expires_at(3i)"=>"24", "expires_at(4i)"=>"09", "expires_at(5i)"=>"00", "activity_ids"=>["", "2", "3", "4"]}, "commit"=>"Saving..."}
User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
Provider Load (0.4ms) SELECT "providers".* FROM "providers" WHERE "providers"."id" = $1 LIMIT 1 [["id", 1]]
Provider Load (0.5ms) SELECT "providers".* FROM "providers" WHERE "providers"."id" = $1 LIMIT 1 [["id", 1]]
(0.3ms)
GIT
remote: git://github.com/daan-/spree-multilingual-static-content.git
revision: 6a92174a802f1c8898b348194a20c39f97e986e9
specs:
spree_multilingual_static_content (2.1.0)
spree_core (~> 2.1)
GIT
remote: git://github.com/spree/spree-multi-domain.git
revision: 64238a7c499b8979f99c48352242dca076ad6452
#<Class:0x007fcb1e0faac8>#_a804b7157ca54065eafbca62ed494af6
spree_frontend (2.2.2) app/views/spree/shared/_google_analytics.html.erb, line 1
block in ActionView::Template#render
actionpack (4.0.5) lib/action_view/template.rb, line 143
ActiveSupport::Notifications.instrument
activesupport (4.0.5) lib/active_support/notifications.rb, line 161
ActionView::Template#render
actionpack (4.0.5) lib/action_view/template.rb, line 141
ActionView::Template#render
➜ rails git:(aa) ✗ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 5de45179a6ed7628f8b763a87c90ac111ccc290e
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit nehalem
OS X: 10.9.2-x86_64
Xcode: 5.1.1
CLT: 5.1.0.0.1.1396320587
@asecondwill
asecondwill / Warrior Level 2
Created November 29, 2013 21:46
Warrior level 2
class Player
def play_turn(warrior)
if warrior.feel.empty?
warrior.walk!
else
warrior.attack!
end
end
end
@asecondwill
asecondwill / gist:7712420
Created November 29, 2013 21:41
Warrior Level 1
class Player
def play_turn(warrior)
warrior.walk!
end
end
@asecondwill
asecondwill / gist:7275733
Created November 2, 2013 05:04
Ruby Warrior Level 4
class Player
def play_turn(warrior)
if @health.nil?
@health = warrior.health
end
if warrior.feel.enemy?
warrior.attack!
else
if warrior.health > 12 or taking_damage?(warrior)
@asecondwill
asecondwill / home
Last active December 26, 2015 12:19
Example of using ACF to make the usual gear on a Kindling home page
{% for item in post.get_field('slide') %}
<li>
<a href='{{item.link}}'>
<img class="orbit-slide" src="{{item.image.sizes.orbit_slide}}" >
</a>
</li>
{% endfor %}
{{post.get_field('right_hand_text')}}
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/middleman-core-3.0.5/lib/middleman-core/preview_server.rb:16:in `rescue in logger': #<Class:Middleman::PreviewServer>#logger delegated to app.logger, but app is nil: Middleman::PreviewServer (RuntimeError)
from /Users/me/.rvm/gems/ruby-1.9.3-p194/gems/middleman-core-3.0.5/lib/middleman-core/preview_server.rb:13:in `logger'
from /Users/me/.rvm/gems/ruby-1.9.3-p194/gems/middleman-core-3.0.5/lib/middleman-core/preview_server.rb:139:in `rescue in setup_webrick'
from /Users/me/.rvm/gems/ruby-1.9.3-p194/gems/middleman-core-3.0.5/lib/middleman-core/preview_server.rb:136:in `setup_webrick'
from /Users/me/.rvm/gems/ruby-1.9.3-p194/gems/middleman-core-3.0.5/lib/middleman-core/preview_server.rb:149:in `mount_instance'
from /Users/me/.rvm/gems/ruby-1.9.3-p194/gems/middleman-core-3.0.5/lib/middleman-core/preview_server.rb:21:in `start'
from /Users/me/.rvm/gems/ruby-1.9.3-p194/gems/middleman-core-3.0.5/lib/middleman-core/cli/server.rb:68:in `server'
from /Users/me/.rvm
@asecondwill
asecondwill / gist:3797978
Created September 28, 2012 04:49
Postgres Install Error log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by PostgreSQL configure 9.1.4, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ ./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.1.4 --datadir=/usr/local/Cellar/postgresql/9.1.4/share/postgresql --docdir=/usr/local/Cellar/postgresql/9.1.4/share/doc/postgresql --enable-thread-safety --with-bonjour --with-gssapi --with-krb5 --with-openssl --with-libxml --with-libxslt --with-ossp-uuid --with-python --with-perl ARCHFLAGS='-arch x86_64'
## --------- ##
## Platform. ##