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
# Configuring Our Prompt | |
# ====================== | |
# This function is called in your prompt to output your active git branch. | |
# function parse_git_branch { | |
# git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
# } | |
# Add this parse_git_dirty function. | |
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
[1] pry(Boat)> ActiveRecord::Base.logger = Logger.new(STDOUT) | |
=> #<Logger:0x00000104286068 | |
@default_formatter=#<Logger::Formatter:0x00000104286040 @datetime_format=nil>, | |
@formatter=nil, | |
@level=0, | |
@logdev= | |
#<Logger::LogDevice:0x00000104285ff0 | |
@dev=#<IO:<STDOUT>>, | |
@filename=nil, | |
@mutex= |
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
#<Rack::Static:0x00000101c65c08 | |
@app= | |
#<LandmarksController app_file="/Users/kronosapiens/Dropbox/Documents/Development/code/flatiron/wk5/nyc-sinatra-ruby-004/app/controllers/application_controller.rb">, | |
@file_server= | |
#<Rack::File:0x00000101c65938 | |
@default_mime="text/plain", | |
@headers={}, | |
@root="public">, | |
@header_rules=[], | |
@headers={}, |
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
ENV["SINATRA_ENV"] = "test" | |
require_relative '../config/environment' | |
require 'rack/test' | |
require 'capybara/rspec' | |
require 'capybara/dsl' | |
if defined?(ActiveRecord::Migrator) && ActiveRecord::Migrator.needs_migration? | |
raise 'Migrations are pending run `rake db:migrate SINATRA_ENV=test` to resolve the issue.' | |
end |
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
# [08:31:21] euler | |
# ƒ: ruby 03_lpf.rb | |
# 71 | |
# 839 | |
# 1471 | |
# 6857 | |
# 0.020000 0.000000 0.020000 ( 0.013420) | |
require 'pry' | |
require 'prime' |
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
bqe = Landmark.create(name: 'BQE', year_completed: 1961) | |
sol = Landmark.create(name: 'Statue of Liberty', year_completed: 1886) | |
esb = Landmark.create(name: 'Empire State Building', year_completed: 1929) | |
mos = Figure.create(name: 'Bobby Moses') | |
fdr = Figure.create(name: 'FDR') | |
pc = Title.create(name: 'Parks Commissioner') | |
president = Title.create(name: 'President') | |
hero = Title.create(name: 'Hero') |
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
index.write( | |
<<-HTML | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Movies</title> | |
</head> | |
<body> | |
<ul> | |
#{Movie.all.map {|movie| "<li><a href=\"movies/#{movie.url}\">#{movie.title}</a></li>\n"}.join(" ")} </ul> |
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
Name: Daniel Kronovet | |
Github: http://github.com/kronosapiens | |
Blog: http://kronosapiens.com | |
Tagline: I Am a Strange Loop | |
Excerpt: California native gone home to New York, looking for a challenge. | |
Profile Picture: http://kronosapiens.files.wordpress.com/2014/02/morgans_wedding.jpg?w=339 | |
Treehouse Account: http://teamtreehouse.com/kronosapiens |