Mensch font, Source Code Pro, Webkit, Chrome, Firefox, Kaleidoscope, iTerm, Sublime Text, Sequel Pro, Codekit,
This file contains hidden or 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
| ~ ab -c %number% -n 2000 http://0.0.0.0:3000/api/v1/search.json | |
| Unicorn | |
| Concurrency Level: 50 | |
| Time taken for tests: 9.256 seconds | |
| Complete requests: 2000 | |
| Failed requests: 0 |
This file contains hidden or 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
| Okay, this is what I ended up with in the connect.options task config. Seems to work. | |
| connect: { | |
| options: { | |
| // ... | |
| // Modrewrite rule, connect.static(path) for each path in target's base | |
| middleware: function (connect, options) { | |
| var optBase = (typeof options.base === 'string') ? [options.base] : options.base; | |
| return [require('connect-modrewrite')(['!(\\..+)$ / [L]'])].concat( | |
| optBase.map(function(path){ return connect.static(path); })); |
This file contains hidden or 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
| group :production do | |
| gem 'unicorn' | |
| # Enable gzip compression on heroku, but don't compress images. | |
| gem 'heroku-deflater' | |
| # Heroku injects it if it's not in there already | |
| gem 'rails_12factor' | |
| end |
This file contains hidden or 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
| before(:all) do | |
| Model.create_indexes | |
| end | |
| let(:indexes){ Model.collection.indexes } | |
| it { expect(indexes[created_at: 1]).to_not be_nil } |
This file contains hidden or 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
| module Taggable | |
| extend ActiveSupport::Concern | |
| included do | |
| attr_accessible :tags | |
| after_save :set_tags | |
| after_destroy :unset_tags | |
| end |
This file contains hidden or 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
| gem 'coderay', require: false | |
| gem 'slop', require: false | |
| gem 'method_source', require: false | |
| gem 'pry', require: false | |
| gem 'yard', require: false | |
| gem 'pry-doc', require: false | |
| gem 'columnize', require: false | |
| gem 'debugger-ruby_core_source', require: false | |
| gem 'debugger-linecache', require: false | |
| gem 'debugger', require: false |
This file contains hidden or 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
| SourceFileInfo.find_or_create_by(hash: hash) do |sfi| | |
| sfi.name = file_id | |
| sfi.ext = ext | |
| sfi.path = file_path | |
| sfi.original_name = original_name | |
| sfi.user = user | |
| end |
This file contains hidden or 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
| piglatinified = strs.map { |str| piglatinify(str) } | |
| # -> | |
| piglatinified = strs.map(&method(:piglatinify)) | |
| upcase_lambda = lambda { |str| str.upcase } | |
| # -> | |
| upcase_lambda = -> s { s.upcase } | |
| upcase_lambda.call('foo') |