Skip to content
Pro
Block or report user

Report or block nateberkopec

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse

Organizations

@puma @getsentry
Block or report user

Report or block nateberkopec

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse

Pinned

  1. TodoMVC with Turbolinks 3

    Ruby 133 28

  2. Experiments in lightweight Rails stacks.

    Ruby 28 2

  3. 1
    # De-'Async Inject' Universal Analytics
    2
    
                  
    3
    This gist applies the theory from Ilya Grigorik's [Script-injected "async scripts" considered harmful](https://www.igvita.com/2014/05/20/script-injected-async-scripts-considered-harmful/) on the default Universal Analytics snippet. TLDR place this above the CSS in the `<head>` of your document
    4
    
                  
    5
    ```html
  4. 1
    # gem 'rails'
    2
    gem "activerecord"
    3
    gem "actionpack"
    4
    gem "actionview"
    5
    gem "actionmailer"
  5. A miniature CSS reset with a 500 byte (gzipped) size limit. Suitable for inlining.

    CSS 12 2

  6. 1
    [In yesterday's post I said](https://www.speedshop.co/2019/01/10/three-activerecord-mistakes.html), in relation to "how does .present? work on ActiveRecord::Relation", I said that `present?` performs an existence check `SELECT 1 AS one FROM ... LIMIT 1` because it calls `exists?` underneath. This is actually wrong - it `load`s the relation.
    2
    
                  
    3
    [Jonathan Mast](https://twitter.com/jonathanamast/status/1083721865531666432) corrected me on Twitter. It turns out, I should have paid closer attention! [Here](https://github.com/rails/rails/blob/94b5cd3a20edadd6f6b8cf0bdf1a4d4919df86cb/activerecord/lib/active_record/relation.rb#L503) is the *actual* implementation of `blank?` on ActiveRecord::Relation on Rails master:
    4
    
                  
    5
    ```ruby

321 contributions in the last year

Sep Oct Nov Dec Jan Feb Mar Apr May Jun Jul Aug Sep Mon Wed Fri

Contribution activity

September 2019

Created a pull request in puma/puma that received 5 comments

Fix #1842

Consider #1886

+17 −17 5 comments

Created an issue in nateberkopec/speedshop that received 7 comments

13 contributions in private repositories Sep 4 – Sep 13

Seeing something unexpected? Take a look at the GitHub profile guide.

You can’t perform that action at this time.