This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From LaunchSchool written test 2017-07-07 | |
def shout(string) | |
string + "!!!" # => "hello world!!!" # Just an operation, not a method on `string`. Silimar to `1 + 1`. Argument `string` stays coupled to `sentence` | |
string.upcase! # => "HELLO WORLD" # Mutates the caller | |
end # => :shout | |
sentence = "hello world" # => "hello world" | |
shout(sentence) # => "HELLO WORLD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pry' | |
VALID_CHOICES = %w(rock paper scissors lizard spock) | |
total_wins = 0 | |
def prompt(message) | |
puts "=> #{message}" | |
end | |
def autocomplete_player_choice(choice) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pry' | |
VALID_CHOICES = %w(rock paper scissors lizard spock) | |
total_wins = 0 | |
def prompt(message) | |
puts "=> #{message}" | |
end | |
def autocomplete_player_choice(choice) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[11:17]~/wdi/projects/pilot_roster > rspec | |
ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" | |
Location | |
(0.2ms) BEGIN | |
(0.2ms) ROLLBACK | |
has a valid factory | |
(0.1ms) BEGIN | |
(0.2ms) ROLLBACK | |
is invalid without a base name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2015-11-17T19:40:50.495487+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by ckib16@gmail.com | |
2015-11-17T19:40:52.497869+00:00 heroku[run.5568]: Awaiting client | |
2015-11-17T19:40:52.520272+00:00 heroku[run.5568]: Starting process with command `bundle exec rake db:migrate` | |
2015-11-17T19:40:52.901382+00:00 heroku[run.5568]: State changed from starting to up | |
2015-11-17T19:40:56.498819+00:00 heroku[run.5568]: Process exited with status 0 | |
2015-11-17T19:40:56.519428+00:00 heroku[run.5568]: State changed from up to complete | |
2015-11-17T19:41:04.635802+00:00 heroku[api]: Starting process with command `bundle exec rake db:seed_data` by ckib16@gmail.com | |
2015-11-17T19:41:07.326003+00:00 heroku[run.4634]: Awaiting client | |
2015-11-17T19:41:07.372270+00:00 heroku[run.4634]: Starting process with command `bundle exec rake db:seed_data` | |
2015-11-17T19:41:07.783336+00:00 heroku[run.4634]: State changed from starting to up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[14:53]~/wdi/projects/pilot_tracker > heroku run rake db:seed | |
Running rake db:seed on pilot-tracker... up, run.6160 | |
ActiveRecord::SchemaMigration Load (2.9ms) SELECT "schema_migrations".* FROM "schema_migrations" | |
Location Load (3.3ms) SELECT "locations".* FROM "locations" | |
rake aborted! | |
ActiveRecord::UnknownAttributeError: unknown attribute 'emblem_url' for Location. | |
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/attribute_assignment.rb:59:in `rescue in _assign_attribute' | |
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/attribute_assignment.rb:54:in `_assign_attribute' | |
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/attribute_assignment.rb:41:in `block in assign_attributes' | |
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/attribute_assignment.rb:35:in `each' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Chris Kibble - Resume</title> | |
</head> | |
<body> | |
<h1>Chris Kibble</h1> | |
<h2>Summary</h2> | |
<p> | |
Experienced Air Force officer with proven project management, web development, and analytical skills looking to help solve national-level technology problems. Demonstrated success in leading teams that bridged the gap between technical competence and business results. Award-winning instructor adept at learning and communicating highly detailed concepts to all skill levels. Motivated to work with other dedicated and driven professionals. Desired outcome – technical project management position on a USDS national security team. Clearance: DOD Top Secret/SCI Available: Oct 2015 Location: Can relocate to any major metro area. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jun 27 13:39:00 quickmetrics app/web.1: Started GET "/registered_applications/1" for 96.255.46.237 at 2015-06-27 20:39:00 +0000 | |
Jun 27 13:39:00 quickmetrics app/web.1: Parameters: {"id"=>"1"} | |
Jun 27 13:39:00 quickmetrics app/web.1: CACHE (0.0ms) SELECT "registered_applications".* FROM "registered_applications" WHERE "registered_applications"."id" = $1 LIMIT 1 [["id", "1"]] | |
Jun 27 13:39:00 quickmetrics app/web.1: ActiveRecord::StatementInvalid (PG::GroupingError: ERROR: column "events.created_at" must appear in the GROUP BY clause or be used in an aggregate function | |
Jun 27 13:39:00 quickmetrics app/web.1: LINE 1: ...ation_id" = $1 GROUP BY "events"."name" ORDER BY created_at... | |
Jun 27 13:39:00 quickmetrics app/web.1: ^ | |
Jun 27 13:39:00 quickmetrics app/web.1: : SELECT COUNT(*) AS count_all, name AS name FROM "events" WHERE "events"."registered_application_id" = $1 GROUP BY "events"."name" ORDER BY created_at DESC): | |
Jun 27 13:39 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chris@MBAir:~/coding/bloc/blocmetrics$ curl -v -H "Accept: application/json" -H "Origin: http://miller.biz/matilde" -H "Content-Type: application/json" -X POST -d '{"event_name":"foobar"}' http://localhost:3000/api/events | |
* Hostname was NOT found in DNS cache | |
* Trying ::1... | |
* Connected to localhost (::1) port 3000 (#0) | |
> POST /api/events HTTP/1.1 | |
> User-Agent: curl/7.37.1 | |
> Host: localhost:3000 | |
> Accept: application/json | |
> Origin: http://miller.biz/matilde | |
> Content-Type: application/json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class API::EventsController < ApplicationController | |
# Skip CSRF protection in development | |
skip_before_action :verify_authenticity_token | |
def create | |
registered_application = RegisteredApplication.find_by(url: request.env['HTTP_ORIGIN']) | |
if registered_application = nil | |
render json: "Unregistered application", status: :unprocessable_entity | |
end |
NewerOlder