7 Matching Annotations
  1. Dec 2022
    1. It’s as simple as running ngrok http 3000 to forward port 3000 (or any port) to a public ngrok address.

      We're not forwarding local port 3000 to a public ngrok address — we're doing it in the opposite direction, as the previous sentence just (correctly) stated:

      a secure tunnel to localhost

    1. Include one or both of these headers in your messages:

      Actually, if you include List-Unsubscribe-Post, then you MUST include List-Unsubscribe (both).

      According to https://www.rfc-editor.org/rfc/rfc8058#section-3.1,

      A mail sender that wishes to enable one-click unsubscriptions places one List-Unsubscribe header field and one List-Unsubscribe-Post header field in the message. The List-Unsubscribe header field MUST contain one HTTPS URI. It MAY contain other non-HTTP/S URIs such as MAILTO:. The List-Unsubscribe-Post header MUST contain the single key/value pair "List-Unsubscribe=One-Click".

  2. Nov 2022
    1. by using symbols as keys, you will be able to use the implicit conversion of a Mash via the #to_hash method to destructure (or splat) the contents of a Mash out to a block

      Eh? The example below:

      symbol_mash = SymbolizedMash.new(id: 123, name: 'Rey') symbol_mash.each do |key, value| # key is :id, then :name # value is 123, then 'Rey' end

      seems to imply that this is possible (and does an implicit conversion) because it defines to_hash. But that's simply not true, as these 2 examples below prove:

      ``` main > symbol_mash.class_eval { undef :to_hash } => nil

      main > symbol_mash.each {|k,v| p [k,v] } [:id, 123] [:name, "Rey"] => {:id=>123, :name=>Rey} ```

      ``` main > s = 'a' => a

      main > s.class_eval do def to_hash chars.zip(chars).to_h end end => :to_hash

      main > s.to_hash => {a=>a}

      main > s.each Traceback (most recent call last) (filtered by backtrace_cleaner; set Pry.config.clean_backtrace = false to see all frames): 1: (pry):85:in __pry__' NoMethodError: undefined methodeach' for "a":String ```

  3. Sep 2022
    1. However, while URLs allow you to locate a resource, a URI simply identifies a resource. This means that a URI is not necessarily intended as an address to get a resource. It is meant just as an identifier.

      However, while URLs allow you to locate a resource, a URI simply identifies a resource.

      Very untrue/misleading! It doesn't simply (only) identify it. It includes URLs, so a URI may be a locator, a name, or both!

      https://datatracker.ietf.org/doc/html/rfc3986 states it better and perfectly:

      A URI can be further classified as a locator, a name, or both. The term "Uniform Resource Locator" (URL) refers to the subset of URIs that, in addition to identifying a resource, provide a means of locating the resource by describing its primary access mechanism (e.g., its network "location").

      This means that a URI is not necessarily intended as an address to get a resource. It is meant just as an identifier.

      The "is not necessarily" part is correct. The "is meant" part is incorrect; shoudl be "may only be meant as".

  4. Oct 2020
  5. Sep 2020