• Sent out all murder mystery invitations, as well as the printouts and office supplies and decorations. This is a lot of work!
    • India’s Tandoori up near Allie in miracle mile has a lunch buffet that goes until 3. I went today, so good.
    • GRRM blogpost after the series finale: http://georgerrmartin.com/notablog/2019/05/20/an-ending/.
    • The expedia/priceline business model:
      • The customers are not the individual users. The customers are the companies selling through your marketplace.
      • The cofounder of Kayak was the cofounder of Orbitz before. The key change which made Kayak successful was that it no longer sold tickets, it just became a search engine to aggregate prices and compare. This was easier to maintain, fewer employees, no customer service needed, etc.
      • Kayak gets about half its revenue from referrals (flight/hotel/car companies paying them) and half from advertising.
      • Kayak earns anywhere from 0.1 – 0.3 cents per query for flights, cars, and hotels (hotels being higher).
      • Amazon takes anywhere from 6-20% cut per item sale (average 15%), as well as monthly dues to even list items ($0-$40). There’s also a minimum (a dollar or two) in case 15% of an item sale is less than that.
    • Progress:
      • Free for pharmacies. Money comes from vendors. Could take a percentage of sales or charge a fee per query. We’ll have to iterate on the sweet spot for this number until it makes sense for both parties.
      • Roadmap:
        • Add a few more vendors.
        • Enable user accounts, necessary to store partnership information and vendor credentials and such.
        • MVP is done. Show it to pharmacies. Get them to use it.
        • Once there are enough users, start pitching to vendors (our actual customers).
        • In production, we should not aggregate prices by webscraping. Supported vendors should expose a contracted API for our data.
        • Possibly: buy bulk and resell for discounted rates, just like kayak does with hotel blocks. To do this, we’d need to add functionality/complexity to the app. It would allow buy/sell instead of just redirect.
        • Start trending history and offering price prediction.
    • HN/PW.
      • Papermill is a tool that takes a Jupyter notebook (and some params) and executions it with a production context in mind (saving artifacts, etc). Netflix has been pushing these architectures hard, even outside of the data science workflows at the company, because it’s a great way to combine runtime with notes/datasharing for others to consume.
      • Some awesome gems in python 3: https://datawhatnow.com/things-you-are-probably-not-using-in-python-3-but-should
        • fstrings for autoformatting based on variable names.
        • built-in lru.
        • type hints.
        • no __init__ necessary for subpackages.
    • Game of thrones and barry are done, mostly just nba/nhl now (although that will finish soon too). Westworld s3 trailer came out (parts filmed right here in hermosa).
    • Very interesting segment! https://www.youtube.com/watch?v=aMcjxSThD54.
    • Warriors swept Portland, off to the 5th consecutive finals!
    • Bought the circus murder mystery night (from a new company), started preparing everything for saturday.
        • Back from LiB! Great trip. Uploaded and shared pictures.
        • Yesterday caught up on all the quarterfinals NBA/NHL games that I missed, game of thrones, and ufc/bellator events.
        • QR stands for Quick Response in QR codes. The most recent version is a 177×177 grid.
        • Emails, newletters, HN, PW, MD, etc:
          • Guido about creating python (as a middleground between C programs and shell scripts) and stepping down as BDFL: https://www.youtube.com/watch?v=qxMcGDnT8uc.
          • SQL is old and has many pitfalls. We should not resist the forthcoming of newer query languages.
          • Some good response headers to add to your server’s HTML pages:
            • Strict-Transport-Security: max-age=1000; includeSubDomains; preload
            • Content-Security-Policy: upgrade-insecure-requests
            • Cache-Control: max-age=30, public
            • Accept-Encoding: gzip, deflate, br
            • Accept: image/webp; imgae/apng, image/*, */*;q=0.8
            • Accept-CH: Width, Viewport-Width
            • Accept-CH-Lifetime: 100
            • Link: </font.woff2>; rel=preload; as=font; no-push
            • Feature-Policy: vibrate ‘none’; geolocation ‘non’
          • Remember, PyTorch is an ML library.
        • Apparently the purchase offer proceeds are doled out through cash holdings in Solium, rather than between SpaceX and the employee directly. You have to elect between a transfer (which requires bank info) and a check (which requires an address). If you don’t elect, it defaults to check. I was out of town with no service, but I received no notification of shipment, so I emailed them today (others said they received their transfers earlier).
        • GSW crushed Portland in game 1.
        • Promises in JS are just like callbacks (setTimeout, etc), just cleaner. They define two things: what to return when it succeeds (.then), and how to handle the error when it fails (.catch). Resolve vs reject. You can have multiple chained .then calls, executed in order if it no errors are thrown in the previous. You can also fire off multiple promises at the same time (Promise.all([]).
          • async is simply a way to return a promise. Then you call await, which blocks until the promise resolves. You can do multiple concurrently with Promise.all() in the same way.
          • California has a larger economy by itself than every country on the planet except 4: US, China, Japan, Germany.
          • Got my POA notarized. Allie will bring to SpaceX tomorrow. We also got the final allocations today. lol.
          • Read about all 3 star wars trilogies, 9 movies in total. I have only seen maybe 2 of them, and only when I was a child. Not a fan, but was just curious to read a 10min summary of the entire saga.
          • Unloaded amazon fresh and packed the BMW saddlebags full of all LiB food. Packed all regular stuff as well, after laundry.
          • Supercontest
            • Split the uwsgi ini file into proper sections and moved all configuration there instead of as clargs in docker-compose.
            • Process
              • docker network create nginx-proxy
              • docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro –name nginx-proxy –net nginx-proxy jwilder/nginx-proxy
              • Then start the app containers (usually `make build-start-prod`).
            • letsencrypt-nginx-proxy-companion has some useful utilities.
              • docker exec nginx-letsencrypt /app/force_renew
              • docker exec nginx-letsencrypt /app/cert_status
            • Created the bmahlstedt.com github repo. Added a tiny app with tiny landing page.
            • Created the infra github repo. Moved the command line process above to a docker-compose and added a readme. Now, you simply docker-compose up there (after creating the nginx-proxy network) just once, and then can create as many virtual hosts as you’d like.
            • nginx-proxy is pretty dope. It uses a dummy dhparam while a new one is generated in the background (2048 bits can take a while), then it reloads nginx automatically when done.
            • Renamed services (like app_prod) to use dashes instead of underscores (to app-prod).
            • Confirmed that app-dev still works.
            • After a docker system prune, you need to recreate the network. The volumes will stay by default.
            • http forwards to https and www forwards to non-www (just southbaysupercontest.com and bmahlstedt.com).
            • Got ssl working with letsencrypt-nginx-proxy-companion. The setup is pretty clean now.
            • Updated documentation.
            • Closed #47. Everything is done now. There are two containers (nginx-proxy and letsencrypt) that control traffic (and certify) all other virtual host containers on that machine. Right now that includes two apps, southbaysupercontest.com and bmahlstedt.com.
          • DHPARAM = Diffie Hellman parameters, used for secret key validation.
          • Buyback BS.
            • I made my election and submitted the transmittal form separately to SpaceX. This is a dumb requirement in the first place, because you’re already making a digital confirmation.
            • I played with my election after, knowing that I wasn’t going to change it. I just wanted to observe. I intentionally did not submit the transmittal forms for these.
            • Because the transmitted number and my solium number did not match, Solium generated incorrect final documents. SpaceX can fix this, but they need my power of attorney since it’s technically changing a number after the close date. Ridiculous and inconvenient (requires notary).
            • Made an appointment for BOA tomorrow.
          • Dad is going in for surgery tomorrow, called for good luck.
          • Placed Amazon Fresh order for Lightning in a Bottle – $140. Soylent, protein bars, and almost every non-refrigerated fruit & vegetable you can imagine!
          • Tutorials
            • Express
              • Process
                • npm init (creates package.json)
                • npm install express (adds it to node_modules/ and the deps in package.json)
                • app.js with require, app instantiation, route addition, listen on port.
                • node app.js
              • This is identical to what I’m used to. Remember, node is the javascript runtime outside the browser (python). Express is the web framework (flask).
              • Autoreload behavior can be enabled by `sudo npm install nodemon -g` then `nodemon app.js` instead of `node app.js`.
              • Pug (and old-school jade) is the template engine for node, just like jinja is for python. You can render these templates and insert variables and other functionality.
            • JS, even with its exponential growth, is still not as full-featured of an environment for enterprise app development as something like java/python/c#.
              • Typescript goes a little further than JS because it has static typing.
            • OvernightJS is a utility lib for apps build with typescript and express. Gives some nice classes and controllers and decorators.
          • Updated resume. Cleaned the skill organization at the bottom. Did a little on linked/github as well.
          • JS is, of course, dynamically typed like Python. Types are inferred at runtime. Typescript is statically typed, so types are known before runtime. You can lint this with tslint.
            • Python 3 has type hinting (called such because it’s optional). You can specify the input and output types a function expects, and then static analysis can catch any errors before runtime. It’s also nice for documentation.
          • California is about the same latitude as the VERY bottom of Europe, almost between it and Africa. Northern California is about the same as Spain/Portugal.
          • Deer shed their antlers every spring and they grow back during summer. I had no idea.
          • Started work on the reverse proxy for supercontest and bmahlstedt.com. Will post all details tomorrow.