Skip to content

Instantly share code, notes, and snippets.

View IdahoEv's full-sized avatar

Evan Dorn IdahoEv

View GitHub Profile
Browser console for User Sends Reset Password step list
Thu Jan 29 2015 19:37:50 GMT-0800 (PST)
+-------+--------------+------------------+-------------------+-------------+
| index | currentScope | defaultPrevented | name | targetScope |
+-------+--------------+------------------+-------------------+-------------+
| event | | false | $stateChangeStart | |
+-------+--------------+------------------+-------------------+-------------+
Thu Jan 29 2015 19:37:50 GMT-0800 (PST)
module LrdCms2
class StaticLogger < ::Logger
# needed to use stdlib logger with Rack < 1.6.0
def write(msg)
self.<<(msg)
end
end
class StaticApp
Finished in 34.57 seconds (files took 2.93 seconds to load)
111 examples, 2 failures, 1 pending
Failed examples:
rspec ./spec/features/visitor_navigates_with_menu_spec.rb:19 # Vistor navigated to a path on desktop click on Path Link
rspec /Users/evan/.rvm/gems/ruby-2.1.2@cms2/gems/rspec-steps-1.0.7/lib/rspec-steps/stepwise.rb:17 # Vistor navigated to a path on desktop step list
require 'spec_helper'
describe "items#index", :type => :request do
let :date do
Date.today
end
let! :item_1 do
Item.create( :description => "Give a coding demo",
@IdahoEv
IdahoEv / errors on CI
Created January 22, 2015 20:08
CI/test fails in EQB
bundle exec rake db:migrate bundle exec rspec before :each blocks declared for steps are always treated as :all scope (it's possible you want before :step) after :each blocks declared for steps are always treated as :all scope (it's possible you want after :step) .............................................................
An error occurred in an after hook
Net::ReadTimeout: Net::ReadTimeout occurred at
/home/rof/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/net/protocol.rb:158:in `rescue in rbuf_fill'
F
An error occurred in an after hook
Net::ReadTimeout: Net::ReadTimeout occurred at
/home/rof/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/net/protocol.rb:158:in `rescue in rbuf_fill'
@IdahoEv
IdahoEv / gist:9eb1ff4bb438d3746925
Created January 17, 2015 07:58
documentation for hypermedia JSON for CMS pages
# NOTE: public has no view of list of pages
# This endpoint will NOT include blog posts: this is the list
# of pages to appear in the "Edit Pages" tool for admin users.
#
# GET /admin/pages
{
links {
self: '/admin/pages'
},
data: [
Network tab shows 102 ms to rply, 108ms total
Response tab shows shows minified Js
Headers show:
Remote Address:54.241.7.199:80
Request URL:http://lrdesign.com/assets/LRD-CMS2-0.0.1-2b6965f9.js
Request Method:GET
Status Code:304 Not Modified
Request Headersview source
@IdahoEv
IdahoEv / detector.ex
Last active August 29, 2015 14:12
find_hits/2 is always returning an empty list
defmodule Collider.Detector do
def collision?({ :circle, c1}, { :circle, c2 }) do
maxdist = c1.radius + c2.radius
dx = c1.position.x - c2.position.x
dy = c1.position.y - c2.position.y
dist = :math.sqrt( dx * dx + dy * dy )
cond do
dist <= maxdist ->
IO.puts "Found collision between #{inspect(c1.position)} and #{inspect(c2.position)}"
=INFO REPORT==== 9-Dec-2014::22:34:33 ===
application: simple_tank
exited: {bad_return,
{{'Elixir.SimpleTank',start,[normal,[]]},
{'EXIT',
{{badmatch,
{error,
{shutdown,
{failed_to_start_child,'Elixir.SimpleTank.Game',
{'EXIT',
namespace :spec do
# ... other stuff ...
desc "Run all feature specs, repeating with each browser width as default"
task :responsivity, [:spec_files] => [:links, 'backend:setup'] do |t, args|
Bundler.with_clean_env do
%w{mobile small medium desktop}.each do |size|
Dir.chdir("backend"){
ENV['BROWSER_SIZE']=size