I hereby claim:
- I am bryanp on github.
- I am bryanp (https://keybase.io/bryanp) on keybase.
- I have a public key whose fingerprint is 1520 20FE 448B 78B0 0458 6B86 CCFD 09CD B246 C9BE
To claim this, I am signing this object:
| bryanp-mbp:desktop bryan$ pakyow new pakyow-heroku | |
| bryanp-mbp:desktop bryan$ cd pakyow-heroku | |
| bryanp-mbp:pakyow-heroku bryan$ bundle init | |
| Writing new Gemfile to /Users/bryan/Desktop/pakyow-heroku/Gemfile | |
| bryanp-mbp:pakyow-heroku bryan$ mate Gemfile | |
| bryanp-mbp:pakyow-heroku bryan$ bundle install | |
| Fetching source index for http://rubygems.org/ | |
| Using i18n (0.6.0) | |
| Using mime-types (1.17.2) | |
| Using polyglot (0.3.3) |
| # Goes in application class at same level as routes block. | |
| parsers do | |
| parser [:md, :markdown] do |content| | |
| Nokogiri::HTML.fragment(RDiscount.new(content).to_html).to_html | |
| end | |
| parser :haml do |content| | |
| Haml::Engine.new(content).render | |
| end |
| configure(:env) do | |
| server.handler = 'puma' | |
| end |
| # View: | |
| # <div class="post" data-scope="post"> | |
| # <h1 data-prop="title">Title goes here.</h1> | |
| # | |
| # <p data-prop="body"> | |
| # Body goes here. | |
| # </p> | |
| # </div> | |
| # | |
| # <div class="post" data-scope="post"> |
| --- view: | |
| <div scope="post"> | |
| <h1 prop="title"></h1> | |
| </div> | |
| --- data: | |
| [ | |
| { title: 'one', important: false }, |
| class Hash | |
| def rvalues_at(keys) | |
| Array(keys).inject([]) { |arr, key| key.is_a?(Hash) ? arr.concat(self[key.keys[0]].rvalues_at(key.values[0])) : arr << self[key] } | |
| end | |
| end | |
| hash = { | |
| one: 1, | |
| two: 2, | |
| three: { |
| Pakyow::App.define do | |
| # ... | |
| middleware do | |
| use Rack::Session::Cookie, :key => 'myapp.session', :secret => 'shhh' | |
| end | |
| end |
| Ruby 2.1.0 | |
| Sinatra 1.4.4 | |
| Pakyow 0.8.0 | |
| Thin 1.6.1 | |
| Tested on an 8GB Digital Ocean Droplet | |
| Benchmark command: siege -r 1000 -b http://localhost:3000 |
| REQ PATH VIEW PATH | |
| / index.html | |
| /foo foo.html OR foo/index.html | |
| /foo/bar foo/bar.html OR foo/bar/index.html |
I hereby claim:
To claim this, I am signing this object: