Skip to content
Avatar

Sponsoring

@matz

Achievements

Achievements

Organizations

@puma
Block or Report

Block or report nateberkopec

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
nateberkopec/README.md

Hi, I make websites and services faster and more scalable.

Pinned

  1. TodoMVC with Turbolinks 3

    Ruby 137 33

  2. Experiments in lightweight Rails stacks.

    Ruby 53 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

636 contributions in the last year

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

Contribution activity

October 2021

Opened 2 pull requests in 1 repository
Reviewed 2 pull requests in 1 repository

Created an issue in mperham/sidekiq that received 5 comments

check_rtt also warns when a Sidekiq process is fully-utilized

Because the ping releases the GVL and other Sidekiq threads can do work in the background between lines 196 and 198, a fully-utilized Sidekiq serve…

5 comments
7 contributions in private repositories Oct 14 – Oct 15

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