Skip to content

Instantly share code, notes, and snippets.

View bbmreed's full-sized avatar

Mike Reed bbmreed

  • BookBub
  • United States
View GitHub Profile
@bbmreed
bbmreed / email_thoughts.md
Created May 22, 2019 19:11
Email thoughts

Proofs

Pain points:

Setting up proofs for the actual send is cumbersome

  • create a testemail user
  • create a user segment in lello admin
  • configure a campaign test in hedwig UI to use that user segment
  • lots of time clicking and aligning lello and hedwig
  • some footguns that prevent the proof from actually working: forgetting to assign a date to the campaign test, for example
@bbmreed
bbmreed / yarn.md
Last active June 5, 2017 15:36
moving to yarn
var BrowserDetect = {
init: function () {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version";
this.OS = this.searchString(this.dataOS) || "an unknown OS";
},
searchString: function (data) {
for (var i = 0; i < data.length; i++) {
var dataString = data[i].string;
var dataProp = data[i].prop;

Keybase proof

I hereby claim:

  • I am bbmreed on github.
  • I am mikereed (https://keybase.io/mikereed) on keybase.
  • I have a public key whose fingerprint is 2959 2F90 7C3B 5939 8FA9 6976 9A15 635E 897D D886

To claim this, I am signing this object:

Remove the avail_urls in "script/util/linkshare_url_fix.rb"

> load "script/util/linkshare_url_fix.rb"

This loads a function called: linkify(avail_id, linkshare_url) that creates all links for the availability, with the given linkshare url.

Import from spreadsheet

Using enumerable constructs to to DRY up some common patterns

Example

I find a common pattern where I want to return an object if one of its properties is true.

For example:

self.current_promotion if self.current_promotion.published?

What are Similar Records?

Several records, such as books and authors, may exist that are similar to one another by name.

Such as:

Tale of Two Cities
A Tale of Two Cities