• 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).
  • Wednesday

    • Installed a powerhead in the sump, purely to circulate around the return pump. This will prevent detritus from settling, reducing the necessary sump cleanings. Only ~5W. Set up the power and alarms on the apex for this connection.
    • Breathwork. I’ve found that focusing on diaphragm breathing, deep belly, makes the exercise a bit less efficient. If I just focus on large breaths, chest being fine, I get more lightheaded and tingly during the sympathetic portion, able to hold breath longer and more meditative during the parasympathetic part, etc.
    • Added Makefile Tools vscode extension.
    • Supercontest.
      • Created 10 tickets (147-156). Will do 6 before 2022-2023 season. First game is next thursday, 8 days.
      • Renewed the cert. Remember that certbot does this, but not during the offseason when you go >6 months without touching the app.
      • Just run docker-compose restart from code/infra (this is not in the app containers, it’s the nginx and letsencrypt companion containers that proxy the traffic in front of the apps (sbsc and bmahlstedt.com) while managing certs.
      • Closed https://gitlab.com/bmahlstedt/supercontest/-/issues/152.
      • Surprisingly, first attempt at build succeeded. IIRC I am running a sexytools variant to resolve and constrain everything 100%.
      • Set up desktop to work on supercontest (ssh keys, then added the ssh add in bash_profile, etc) – previous years were on the fedora laptop. Happy to be back in ubuntu (albeit wsl).
    • Resume.
      • Reorganized gdrive a bit. Removed old segments from resume, added new, updated others.
      • Overall, cleaned a bit. Later professional CVs should be summaries, don’t have much space to deepdive on a sheet anymore.
      • Updated the abridged version as well.
      • Uploaded to linkedin (for my own ability on apps, not public). My blog points to linkedin.
      • Added a few Featured posts on the profile to hoist to the top.
    • Remember Reg A. The SEC requires a ton of paperwork for the offering/sale of securities. If you file Reg A, it’s an exemption that’s a bit less stringent. It’s ultimately a convenience, but you must file it first. You are limited on a few things (<$20M in security sales in a year for tier 1).
    • Remember Reg D. Put simply, it’s Reg A but for private equity instead of public offerings.
  • Tuesday

    • Watched Magnus on Lex Fridman: https://www.youtube.com/watch?v=0ZO28NtkwwQ.
    • Ducati.
      • Took the bike to motogrrl, safe trip albeit pending a lot of maintenance.
      • Going to leave it there for ~3 months until my garage reopens. Paid for Sept and Oct.
      • At that point, need to do direct maintenance and 7500mi maintenance (rn it’s 6910). Primarily chain, rotors/pads, and oil.
      • Motogrrl is great. Williamsburg. 2 tiers: Regular and Full Throttle. Regular is $175/mo, longterm storage. FT is $325/mo, 24/7 access. You get a shared workspace with lifts, equipment, replacement parts, tire stations, washing stations, more.
      • Great garage overall. Nice perks. Wifi, printer, restrooms, shared sound system, whatsapp group, two wheel tuesdays, etc.
      • Did not leave cover or keys or helmet. Did leave the bike on my tender.
      • Sidenote: all NY airports have free motorcycle parking, just like LAX!
    • TWTR ~40. Should I place more puts…
    • Single-cost hardware for starlink is $600 right now? (residential)
    • Hetzner (german EC2) proclaimed today that running eth nodes on its cloud systems is not allowed. 15% of all eth nodes globally run on Hetzner.
      • Won’t be a killer, but still annoying. 55% of nodes run on AWS. I imagine the Hetzner 15% will just shift to EC2.
    • SEF = Swap Execution Facility. The license for any platform trading swaps. Introduced by Dodd-Frank 2010.
    • Tons of deepthink on the startup.
  • Monday

    • Bloomberg Opinion pieces across the board need to hop off Elon. Matt Levine. Every single day. Are you becoming the tabloid of financial news? Cover prominent content that affects my portfolio, not my yearbook.
    • Confirmed the ETH staking yield comparisons. Lido’s stETH will increase in quantity if held. Current APY is 3.9% (set by Lido, the liquid staker). If you deposit into a vault on yearn (like Curve stETH), you don’t get double yield. You get the yield of the vault only (which is 6.23% rn). You don’t get the stETH rewards, since you’re not holding stETH. It’s nonrehypothecable (just wanted to use that ridiculous word).
    • Renewed USPS digital signature.
    • Aquarium.
      • Dremeled out the autofeeder circle into an ellipse so all droppings pass through rather than accumulating on the plastic aquarium lid.
      • Providing my own rodi saltwater saves a little over $100 per maintenance visit. Will do in future. Providing my own poly, carbon, and sock filters saves a few bucks on each too.
      • Ordered pink and purple (each individually with 7 species) coralline algae in a bottle.
      • Cleaned sump with the vacuum myself. Manhattan aquariums charges the full $150 for this service. Bought powerhead (1050gph) to circulate sump and not let detritus settle. This is not just good for cleanup: improves the heater, return pump, supplements, probe readings, etc.
    • Charged the old ducati battery fully and reinstalled on the bike. Successful ignition.
      • Attached new ring connectors permanently, terminating in an easy-access charge port near the left knee (rear spring).
      • Now I can tend overnight, maintain through winter, whatever. Plug in and leave alone. Deltran 750mA. Charges dead->full in under 24 hours, or keeps safely charged at top.
  • Saturday

    Read Healing Back Pain – The Mind Body Connection. Sarno’s method. Notes:

    • TMS  = Tension Myositis Syndrome.
    • Caused by fear, anxiety, expectation, anger, risk. All producing tension. For the most part, subconsciously.
    • These repressed emotions reduce blood flow to muscles, nerves, tendons, ligaments.
    • The autonomic nervous system controls all this, (heart rate, breathing, blood, etc). So while the feelings may not be based in reality, there is still a physical impact on the body.
    • Basically, the pain is in your brain. Act normally, live as though you’re pain-free, and you will be. Mind over matter.
    • In some cases your brain may produce physical pain to distract from emotional anxiety. It’s a defensive maneuver, in the mind’s eye.
    • Action: Talk to your brain. Don’t be afraid of chronic injury. Deal with any repressed anxiety directly. Fake it till you make it. Convince yourself you’re not injured.
    • Action: Resume all regular physical activity. Do not live the rest of your life with a phobia of certain movements. Stop physical therapy – it psychologically limits you.
    • Counter: I pushed through tennis elbow, continued lifting, and definitely had a longer slower recovery process because of this.
    • Counter: As soon as I could walk without crippling pain, I rejoined the gym during disc recovery. I felt that the healing process went sometimes faster, sometimes slower. I do mindfulness/breathwork and lived a very stress-free life during my disc journey. I engaged in normal physical regiments without hesitation. No victim mentality. Still took years.
    • Overall: Very woo-woo. Agree with the general idea of pushing through injury psychologically, but physical science trumps.
    • Much of the book is hedging against majority skeptical response.
    • Getting good rest, going to therapy, not being anxious/fearful – those are inevitably going to improve a recovery program.
  • Friday

    • SpaceX partnership with t-mobile: https://www.reuters.com/business/media-telecom/elon-musks-spacex-t-mobile-us-plan-boost-cellular-coverage-space-2022-08-26/.
      • Don’t need cell towers. Can send SMS, MMS, and all normal wifi+data services.
      • Coverage in areas without cell service.
    • Looked at ufc 281 presale for msg in nov! ~$500-$5000 rn.
    • JPowell keynote at jackson hole: https://www.youtube.com/watch?v=bKdME43FVQQ.
      • #1 goal is inflation reduction. Price stability. Growth is going to slow and take the hit.
    • Sam Harris on Trump: https://www.youtube.com/watch?v=IgL1bnAvo4Q
    • Keep your website under 15KB. TCP starts (most) communications with 10 packets in a round trip, each packet being 1500B.
    • The “marriage problem” – n candidates, must make a decision after each (lol). When to optimally stop? https://en.wikipedia.org/wiki/Secretary_problem
    • Staked the eth on lido so it’s withdrawable. You can’t stake eth on coinbase in NY yet. Currently 3.9% APR, whereas eth’s direct stake APR is 4.2. Lido takes a little over 7% for the activation queue for eth validators. Then they take another 10% of the earnings. So actual total is something like 3.5% APR. Remember you get stETH, which is 1:1 for ETH, and you earn the staking rewards daily, as an increased quantity of stETH holdings.
      • Did the same a few months back and rehypothecated the steth into a curve vault for additional APY. Will compare later.
    • Manhattan aquariums first maintenance. Very helpful. Took a couple pages of notes but no need to copy here; they’re in the gdoc log. Sand in magnetic brushes, salt creep, acrylic cleaner, leave overflow alone as turf scrubber, engineer goby size, trident labs ICP test, PAR testing, NY tap water low ph, clam canary, carbon and poly filters, purple and coralline algae, kenya tree and pulsing xenia, more.
    • Captains of Crush ratings: https://ironmind.com/product-info/ironmind-grippers/captains-of-crush-grippers/
      • Only ~300 people globally have been certified on the 3.
      • ~25 for 3.5.
      • ~5 for 4.
      • I’m able to do 2, nearly 2.5.
    • Removed the battery from the ducati and connected it to a charged stanley fatmax professional power station. This mobile unit is meant for jump starting, and does run at ~12.V, but I’m a little wary of using it as a charger. Doesn’t have the maintenance detection, trickle capability etc.
      • Ordered a new battery (yuasa yt7b-bs) and a tender (deltran junior) for my own purpose later.
      • 2018 959 is lead-calcium, not lithium.