• Wednesday

    • Flow is just a co-op. But branded, so expectations and known amenities? Rent can be paid in crypto? Equity is in crypto? Heavier community aspect? A blend of wework with, coworking spaces in the coliving community?
    • Adjustment to my note the other day: I can get a much stronger sympathetic response by doing a full belly breath and then last chest inhale. Working on a smooth transition – the last piece is closer to a finishing pull right now.
    • “Custodial” of course depends on whose perspective you’re speaking from. A noncustodial wallet with no other qualifier refers to provider being noncustodial. You, the user, are the custodian.
    • COGS = cost of goods sold. ACV = annual contract value.
    • Played with react native a bit.
      • Really just for android and ios.
      • Instead of writing views directly in kotlin or java for android and swift or obj-c for ios, you write in js/react and react native invokes in native.
      • For desktop apps, use electron (which just runs in chromium on desktop) or proton native (actually native). Proton can be written in js/react.
    • Removed the “Proudly powered by WordPress” from footer.php. Remember to do this whenever you update the theme, since it reinstantiates.
    • Supercontest.
      • Closed https://gitlab.com/bmahlstedt/supercontest/-/issues/149 and folded into the other ticket. Stats page should have Season, Team, User dropdowns.
      • Closed https://gitlab.com/bmahlstedt/supercontest/-/issues/153 as wont-do; datadog is a superior platform but I already have google analytics and flask-monitoringdashboard which encompasses all the RUM+instrumentation I need for this simple site.
      • Switched to secure app for gmail, since they disabled the less-secure-app option. https://gitlab.com/bmahlstedt/supercontest/-/issues/157. Enable 2fa, add the app-specific password, switch in source. Could also use sendgrid (twilio’s email api), but sticking with gmail smtp server for now, since that’s how I originated the mail functionality.
      • Added google analytics. https://gitlab.com/bmahlstedt/supercontest/-/issues/150. Under the sbsc google account, added a property and copied the tag to main html.
      • Started the view change for the stats page, adding Season/Team/User dropdowns: https://gitlab.com/bmahlstedt/supercontest/-/issues/151. Should really convert this whole app to react and have the components update without reloading the static pages on dropdown selection. Will do later. Will finish these views (not react) over the next few days.
      • Had to update both webscrapes for lines and scores. A bit of work. Added a helper for scores (which come on thurs are lines wed) to assist with week1 (fake data) for future seasons.
      • Pushed all to prod, fetched vegas lines and espn scores, committed, updated banner. Everything ready for week, TNF starting tomorrow. https://gitlab.com/bmahlstedt/supercontest/-/issues/158.
      • Looks like westgate is releasing lines at 4pm PT now, not 5pm. Good for my ET shift.
      • I’ll add the manual PST/PDT switch psql to the alembic migrations so that it’s handled every year at annual season opener prep. Right now it’s just a command that sets the pg timestamps back after a certain week. https://gitlab.com/bmahlstedt/supercontest/-/issues/139.
  • Tuesday

    • Postgres benchmarking.
      • WSL2 ubuntu 20.04.
      • sudo apt install postgresql postgresql-contrib
      • sudo service postgresql start
      • sudo -u postgres psql
      • alter user postgres password ‘admin’;
      • Downloaded windows installer for pgadmin4 (best pg gui) on host.
        • Can write scripts, view data, run sql, open psql, whatever.
      • Handles connection nicely, localhost:5432 forwarded by default over wsl.
      • create table data (id serial, name text, code varchar(4));
      • Create 10M rows: insert into data (name, code) select md5(random()::text), left(md5(i::text), 4) from generate_series(1, 10000000) s(i);
      • \timing on (or EXPLAIN ANALYZE)
      • select * from data where code = ‘6cdd’;
      • 730.14MB table and that raw query taking ~300ms.
      • create index idx_code on data(code);
      • That index took 214.53MB and reduced the query to <1ms.
    • Never realized Redis stood for Remote Dictionary Server.
      • Remember key-value stores are basically gigantic hashmaps, so you’re already doing efficient lookups rather than unindexed sequential scans.
    • Looked a little further into writing a whatsapp bot but decided not to pursue (for now). I have other more important tasks at the moment. https://developers.facebook.com/docs/whatsapp/cloud-api/get-started
    • 1 in 6 american households is behind on their utility bills right now.
    • 24hr forex volume in 2019 was 6.6T. Now it’s probably over 7T every day. Insane.
    • Every minute, nearly 1000 hours of media are uploaded to youtube? Wow.
    • Remember modular chains (different sets of validators for consensus, settlement, execution, data availability) vs monolithic chains (same validators do it all). Modular can farm out to L2s, of course.
    • Created a very basic browser extension to refresh the process.
      • https://gitlab.com/bmahlstedt/simple-extension
      • chrome://extensions, developer mode, load unpacked (direct manifest).
      • Define permissions.
      • Then just load whatever html you want in the extension popup and run whatever js you want (in this case, just fetch the site title and show it in the ext popup).
      • Can run in the background, can run when you click on it, can run when you interact with the popup, whatever. Obviously can access a ton – only use trusted extensions.
  • Thursday

    • Good article on website perf: https://doordash.engineering/2022/08/30/doordashs-lessons-on-improving-performance-on-high-traffic-web-pages/
    • Garden.
      • Started planning the connection of aquarium + garden. Problem is marine. Saltwater aquaponics is tough. You have two options:
        1. Filter out the salt on the aquarium exit AND re-salt on return. Very difficult.
        2. Use saline-tolerant plants. Algae and seaweed obviously work. Others include barley and rice. Nothing like my freshwater garden.
      • Harvested a bunch. Chive, endive, cabbage, purple basil, red sails, deer tongue, black seeded simpson, dragon tongue bean.
      • Removed the old borage, cauliflower. Pruned all others.
      • Watered and nourished snake plants.
      • Still waiting for some big multimonths: lavender, cauliflower, celery.
      • Notes for later: bean and borage needed a ton of height. The others classified as tall are prune-able to keep in short sections: cabbage, basil, cauliflower, chive.
      • Planted new mint, dill, chamomile.
    • Massage Envy today (with sunburn!) – Basically have used 4, paid for 4 more, and have 4 remaining to be billed (of the original membership commitment, one year).
      • You have 60 days after cancellation to use any credits accrued.
      • There’s freeze (where you can’t use your banked credits) and freeze+ (where you can). Freeze is free, freeze+ is $20/mo.
      • When I tried to pause the service, he basically put me on freeze+ but for free? And gave me a free credit? Not sure.
      • I can always do a 90min massage to burn through credits faster at my current attendance, since that consumes 1.5.
    • Dosed the aquarium with live purple and pink coralline algae spores.
      • Seeing purple or pink in the aquarium is a good sign that it’s maturing well. It’s a specific kind of coralline algae. You’ll see it on the live rock, snail shells, hermit crabs, etc. It looks good, competes with other algae, makes it easier for coral to spread, many benefits.
      • This algae is calcareous. It consumes both calcium and magnesium to grow, just like the corals in the tank. A little higher alkalinity will accelerate the coralline algae growth.
      • Lower temperature and lower ph will slow this process.
      • Urchins (and some snails) eat coralline algae. Growth will slow if you have urchins.
      • If you see these precursors, your tank is maturing well and you’ll see purple/pink in a few months: (1) hard green algae (2) “chickenpox” (white spots) on the live rock.
      • You see this in a normal tank at about 9 months. You may accelerate it by directly adding spores, like I did today. Not necessary, but helpful since NYC water is a bit on the acidic side and I have 2 urchins.
    • Supercontest.
      • Got ready for the 2022-2023 season. Closed https://gitlab.com/bmahlstedt/supercontest/-/issues/154.
      • Added the ssh config. Changed hardcoded refs from digitalocean to supercontest.
      • Added secrets to my local desktop dev env.
      • Added Ansible instructions.
      • As of 2022-05-30, Google no longer supports access from less secure apps, which I used for SMTP. Will spin off into another ticket: #157.
      • Built the infra and app images locally and ran to success.
      • Backed up the prod db in wsl locally. The restored my local db synced to prod.
      • Added the alembic migration to create the new season’s tables with appropriate dates. Worked.
      • Cleared the paid players in the league_user_association table.
      • Changed home route to matchups (not leaderboard, better for offseason).