- New season of castle rock. This one follows annie wilkes, the bipolar nurse from misery who killed the author.
- House of Spirits was cool, but the most shocking part was the SURPRISE full nudity. They didn't even warn us.
- Riding 100 down the freeway, on the ducati, in the purple suit.
- Router/modem are overheating in the cabinet, gonna leave the door open.
- Talked with bmanning about matlab/c bindings. They have a product called Coder. Functional verification still needs to happen obv, but syntax conversion is automatic.
- Music.
- Kanye released a new gospel album today? It's called JESUS IS KING. It's garbage.
- Old creed. Great. Old eve6. Not as much. Old rob thomas. Not as much. Vertical horizon was pretty good. David Gray and Howie Day. Meh. A little too soft but ok for background I guess.
- Supercontest.
- Fixed the consistent-width cols on all-picks. The logos in the headers had removed min-width.
- Distinguished the finished games from in-progress games by color stripes, not border. If the game is finished, it's the solid color representing the result. If the game is still underway, it's the same color but a white band in the middle. Looks really good.
- Made the legend look a little better, touches on both sides and white bg / black text in the middle.
- Combined both instructions/legend buttons, on all views, into one single help collapse.
- Converted all my inline styling to custom classes. Some basic ones already existed in bootstrap:
- white-space: nowrap -> text-nowrap
- rgb(225, 225, 225) -> text-muted
- display: none -> d-none
- Went through and checked for any inline scripting as well, and handled it.
- Did not minify or bundle the css. It's only like 50 lines.
- Scraped all templates for common macros I could abstract out.
- Scraped all js for common functions I could abstract out. The biggest one was colorPickCell, which contains the logic for checking game status and coverer and stuff to determine how to color the cell, red/green/yellow, and the in-progress band. This included two other helpful functions isGameUnstarted and isGameFinished.
- Used the vitamix for the first time today. It makes a whole world of difference. So satisfied, shoulda bought it years ago.
- TSLA jumped over 10% today. BTC over 40% too (so dumb).
- Shorting kinda defeats the purpose of investment, ya? Tribute to the fact that the market is really there for gamblers, not for supporting good ideas financially.
- Warriors got killed by the Clippers, but it's game 1 and the Clippers are champion contenders.
- Amazon's switch from 2 to 1 day shipping increased revenue by 24% but increased shipping costs by 46% also.
- Bootstrap source css, 10,000 lines: https://github.com/twbs/bootstrap/blob/master/dist/css/bootstrap.css.
Friday, October 25, 2019
Thursday, October 24, 2019
- Record for lines.
- Biggest all time: 27, Steelers over Bucs, 1976.
- Biggest recently: 26.5, Broncos over Jags, 2013.
- Biggest since my app: 22.5, Pats over Jets, 2019.
- Westgate.
- Leaderboard.
- After week 6, the #1 had 27/30 points (90%).
- After week 7, the #1 had 28/35 points (80%).
- They have a mobile app. Downloaded and played with it.
- Called "Fantasy Supercontest" from BookieLab Inc.
- Mine is better:
- All-time stats.
- Desktop and mobile (via browser, but responsive).
- Data API (graphql for web client and python pkg for desktop client).
- Customizable banner.
- Funny feedback form (trivial).
- Localized time.
- In-app rules, page-specific instructions, legend.
- Progress graph (total points vs week).
- Free league.
- Theirs is better:
- Native mobile.
- Full record, covers-pushes-noncovers (mine just has total points).
- Ranking graph (lb position vs week).
- Both have:
- Old seasons, old weeks (historical data).
- Leaderboard. Full percentage.
- Total picks per team per week.
- Weekly summary of teams and players.
- Team logos.
- Not sure:
- Live-update frequency.
- Administration.
- Payment interface.
- Email reminders / notifications.
- Nationals are up 2-0 in the world series.
- Listened to mostly Myles Kennedy (vocals/guitar for altar bridge) and his solo work. Tremonti is still my favorite of the 3, between Tremonti, Cornell, and Kennedy.
- Supercontest.
- Fixed a few small issues due to lowercasing the team names and mapping the statuses. The capilization now is completely confined to the frontend html, through a jinja filter. The backend python/postgres all used uppercase before, but the frontend js does now as well.
- picks_open is now forwarded to js.
- Added logos: https://gitlab.com/bmahlstedt-group/supercontest/issues/128.
- Total size of all 32 logos is 452K in vcs, which is fine.
- A deployment failed because the droplet ran out of disk space (it's 25GB).
- Decided not to do full record (covers-pushes-noncovers). I only pass total points everywhere, I don't plumb which points came from a full cover vs half point from push. It would require some surgery to expose that through the whole chain, and it doesn't add much.
- Backend did all the same pick verifications as frontend except "you picked the opponent" - added it.
- "Ethanol cannot be concentrated by ordinary distillation to greater than 97.2% by volume (95.6% by weight), because at that concentration, the vapor has the same ratio of water to alcohol as the liquid, a phenomenon known as azeotropy."
- Tesla jumped quite a bit after the profit report.
- FB won't move forward with Libra until approved by regulators (sure).
- Google possibly spied on its own employees? https://www.bloomberg.com/news/articles/2019-10-23/google-accused-of-creating-spy-tool-to-squelch-worker-dissent.
- House of Spirits event.
Wednesday, October 23, 2019
- Pulled out of every private investment. Nothing in robinhood, tradeking, or ally. All solium. I'll rediversify again after tradebot reports conclusively successful movements, hopefully after some recession with lower positions.
- There are ~630,000 publicly traded companies in the world. From a data standpoint, it's not ridiculous to do a simple linear regression on all of them through history, with decent resolution.
- Most mobile phones are in the ballpark of 375x800, for design reference (banners etc).
- Made the banner for franky. Deployed.
- Pxlr free online to remove the necessary sections, then intentionally filled in the background white so that the space between the repeated image (bg-secondary) was contrasted.
- Used background-repeat: space, which is much better because it will adjust the x padding between the repetitions responsively for viewport size.
- Background-position: center, just for the case where there's only one instance (mobile).
- And then background-size: contain, with a fixed height as usual.
- Reinstalled gnome-system-monitor for process and resource utilization, uninstalled htop. I already have top for terminal inspection, I want history with my graphical monitor (even if it's only 60 seconds).
- Clippers beat Lakers on opening night.
- Nationals beat Astros for game 1 of the world series.
- Remember:
- sudo apt remove <> will uninstall the package, and the packages that depend on it, but leave the config files.
- sudo apt purge <> will uninstall the package, and the packages that depend on it, and remove the config files.
- sudo apt autoremove will uninstall all packages that were installed as dependencies but the parents aren't around anymore. It's not the best practice to run this.
- sudo apt list --installed
- You shouldn't delete the default ubuntu python installation, there are many system packages that depend on it:
- apparmor* apport* apport-gtk* aptdaemon* apturl* apturl-common* dh-python* foomatic-db-compressed-ppds* gdm3* gedit* gedit-common* gir1.2-ibus-1.0* gnome-control-center* gnome-menus* gnome-online-accounts* gnome-session* gnome-shell* gnome-software* gnome-software-plugin-snap* gnome-terminal* gnome-tweaks* google-chrome-stable* hplip* hplip-data* ibus* ipython3* language-selector-common* language-selector-gnome* lsb-release* nautilus-extension-gnome-terminal* nautilus-share* openprinting-ppds* orca* plymouth-theme-ubuntu-text* printer-driver-foo2zjs* printer-driver-foo2zjs-common* printer-driver-m2300w* printer-driver-postscript-hp* printer-driver-ptouch* printer-driver-pxljr* system-config-printer-common* system-config-printer-udev* tox* ubuntu-drivers-common* ubuntu-release-upgrader-core* ubuntu-release-upgrader-gtk* ubuntu-session* ubuntu-software* ubuntu-system-service* unattended-upgrades* update-manager* update-manager-core* update-notifier* update-notifier-common* usb-creator-common* virtualbox* virtualbox-qt* virtualenv* xdot* xorg* xserver-xorg*
- This is absolutely ridiculous. Python should not be this coupled to the base dist and desktop env.
- Git LFS.
- My pip install was being weird after using lfs. It can't install any pip packages, which means it can't create venvs, run tests, etc. Even after uninstalling git-lfs, it was still pointing at their repo. The default index was still being reported as pypi.
- Deleted this shitty piece of code. It was messing with a bunch of system-level config on my machine. Wiped my python installation as well.
- Removed the .git/hooks/ relevant files: post-checkout, post-commit, pre-push, post-merge.
- https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh.
- Honestly fuck this project. It messed with so much in my system level. It left cruft everywhere with no mechanism for cleanup.
- Tried purge, reinstalling, more for all versions of python, pythonX-pip, virtualenv, pip, etc.
- `curl -sS https://bootstrap.pypa.io/get-pip.py | sudo python3` was the start.
- /usr/share/python-wheels is not necessary. It can be empty.
- sudo pip3 uninstall then install virtualenv tox back into the system environment was the fix.
- Joe Rogan got Edward Snowden on the podcast!
- lol:

- Snowden found no evidence of aliens, chemtrails, other gov't coverups, and conspiracy theories, and he had deep access to nearly everything.
- It was basically Snowden talking for 3 hours. Joe was probably the quietest I've ever seen.
- It's scary to live in a world where someone is prosecuted for doing the right thing.
- Departments don't collaborate, they try to work solo to take full credit for accomplishments, just like in a regular job.
- Ultimately, it's just people trying to save their jobs and/or get promotions, just like any other industry. It's just in government, politics, and intelligence.
- WeWork's CEO Adam Neumann is walking away with 1.7B after the buyout, after driving the company and the stock price into the ground. The employees are getting screwed.
- Toggle buttons are better than checkboxes, if there are many items: https://medium.com/@uxmovement/why-toggle-tokens-are-a-better-alternative-to-checkboxes-2b6403e140ff.
- Roasted 5 pounds of peanuts and processed into peanut butter.
- Listened to Chris Cornell most of today (lead singer audioslave, soundgarden). I don't like his solo work as much as Tremonti.
- Reinstalling ansible added python2.7 back to my system. Lol.
- Supercontest.
- https://gitlab.com/bmahlstedt-group/supercontest/issues/127.
- Took the plots that had complementary data (cover/push/noncover by team, and favorite/push/underdog by line) and stacked them all onto the same bar chart (for each complement to 100).
- Plotly is smart enough to sort each individual trace, and then reassign each trace based on similar label. However, if you want to sort across multiple numbers (like primary sort covers then secondary sort on covers+pushes), you should separate the full dataset separately and then build the traces explicitly, rather than having plotly aggregate for you.
- Made them horizontal and colored them with the same colors as table-success/warning/danger, for consistency.
- Committed nellw lines for week 8.
- All text looked good, appropriate relative to picks open/closed, padding, margin, during all phases of line commit.
- Submitted my picks.
- Bootstrap hex colors for table (these are different than the ones for text, buttons, etc).
- table-success: c3e6cb
- table-warning: ffeeba
- table-danger: f5c6cb
Tuesday, October 22, 2019
- Set up the splunk logging composition, for the most part, and then removed it.
- Docker has logger drivers which tell it how to access the logs from the containers. The default is json-file.
- Splunk uses HTTP Event Collection as the logging driver, known as HEC.
- You can run 500Mb/day through Splunk for free.
- Created an account with splunk.com.
- Remember that it takes a minute or two for the splunk server to start. Check for status: healthy in docker-compose ps.
- Added a token that the app container uses to push the http events to a specific url.
- Installed the docker monitoring app inside the splunk interface.
- You need collectord to make it work, you can't just forward it directly from hec. https://www.outcoldsolutions.com/.
- This is way more complicated than it needs to be. I literally just want to tail a logfile from the browser. The docker interface already forwards stdout/stderr from the container.
- I also don't want to bloat the under-resourced DO droplet with a splunkenterprise container. It's built to do way more than I'd use it for.
- Darnold had a passer rating of 3.6 last night. Insanely low. Patriots D are absolutely killing it, they're in the top 10 for all offensive players in fantasy. I lost the yahoo league and won the espn league. Got 2/5 in supercontest.
- In purging some docker images/containers on my laptop, it tried to upgrade the database container to 12 on a new build/pull. That version is incompatible with a db created with 11 (my version), so I pinned it in docker-compose.
- Big Mouth roles I didn't know: John Mulaney is Andrew, Chelsea Peretti is Nick's phone, Kristen Bell is Jay's pillow, and Jordan Peele is Duke Ellington!
- Did blender research.
- Notes.
- I don't need pulse. I only need it for smoothies (and maybe nut butters), I don't use the blender for salsa, grinding herbs, chopping nuts, etc. Plus I still have the ninja if need be.
- I don't need preprogrammed settings. Soups, desserts, smoothies, blah.
- I don't need digital or touch control. Buttons/switches are fine.
- I don't need self-detect and self-clean. Manual control is fine.
- I don't need timers and programmability. It's not an oven.
- I don't need an app to pair with it wirelessly (lol).
- Vitamix.
- Given all the above, the 5200 is the right fit.
- There are a couple more features to consider.
- The classic series blenders have 2hp motors, while the smart series blenders have 2.2hp motors.
- The smart series blenders are a bit smaller (low profile 64oz container).
- The smart series blenders are a bit quieter.
- Those 3 features aren't worth it to me.
- Its usual price is $450, there was one available for $400. The base is red, but worth the $50 discount. Ordered.
- Camelcamelcamel is a great price tracker for buying expensive items on amazon. You can see the most/least expensive it has been, and even set up alerts where it will email you.
- Bought a huge batch of shelled, skinned, blanched, unsalted peanuts. They're much cheaper in bulk than other nuts - down as low as $2/lb. I bought 10lbs at $3/lb. At costco, the packages of pecans/cashews/etc are $8/lb, and that's a great price already.
- Downloaded paypal for my phone.
- Greg bought week 9 for the sbsc banner. Franky has week 8. Jcriss paid but still needs to send the graphic, so he'll probably get week 10.
- Netflix issued 2b of corporate bonds to fund new content, adding debt.
- WeWork is in a bad place.
- FF waivers. 3 for yahoo, 2 for espn.
- Used the new razor. Cleanup was easy, since it catches all the hair. Cleaning the unit is easy, just run under the tap (full or taken apart). It's a close shave. I need to get used to the motion/pressure so it gets everything.
- Updated the banner_archive (.gitignored):
- 2019-01-niners.svg
- 2019-02-warriors.svg
- 2019-03-williamstown_basketball.svg
- 2019-04-moon_landing.txt
- 2019-05-meats.jpg
- 2019-06-ducati.jpg
- 2019-07-britney_spears.txt
- Made the static/README.md always show build status successful for the stack view, since the gitlab project is private. The regular readme still points to the actual build badge, updating in realtime.
- Started the new season (9) of AHS. It's called 1984, and it's an 80s camp horror theme (which I'm a big fan of).
- Would be nice if spotify had a simple feature like "save for later" where you could add artists (or albums, or songs) to a list to go through whenever you wanted. I often find a few new artists, and then find a couple more good suggestions in "related artists", but there's no way to keep those artists queued in the app to go through later.
- My laptop battery:


- Discharge, normal use, full brightness: ~12.5%/hr. Total time ~8hrs. Linear.
- Discharge, idle, closed: ~0.25%/hr. ~2% over 8hrs. Linear.
- Charge, normal use, full brightness: ~50%/hr during the linear portion to ~85%SOC. Total time ~3hrs. Logarithmic toward the end.
- Google Keep can do bulleted lists by default, just type an asterisk then space on a new line.
- Moved a few longer term items from blogger to google keep.
- The new batch of protein bars is even better than the previous, which is saying a lot.
- Made all my gitlab projects private, and transferred them all from my user namespace to my group namespace. Updated all remotes, on my laptop and the droplet.
- Updated the readme in the fivesquared project to shrink the images to a reasonable size. They now display side-by-side.
- Al Noor lunch with Corey/Harner.
- Tradebot.
- Created and configured the repository in gitlab.
- Enabled autodevops at first to play with it. It created a pipeline with 3 jobs: build, code_quality, and test. If would have added a deployment job as well, but you need a kubernetes cluster. The first job, build, failed and stopped. The default command was `herokuish buildpack build`. I don't need autodevops for this project, so I disabled it.
- Added a very basic .gitlab-ci.yml pipeline instead. Just runs pylint via tox.
- Created both tickets, one for analysis and the other for buy/sell.
- Useful advice: when performing any sort of corrective action (filing a complaint, etc) against a party in a non-face-to-face manner, pretend you're a third-party witness. You won't be discounted as disgruntled, and they'll perceive more weight around the incident if it's apparently large enough to be reported by a witness.
- LFS for prod db backups and the banner archive.
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
- sudo apt-get install git-lfs=2.9.0
- cd ~/code/supercontest
- git lfs install
- git lfs track "backups/"
- git lfs track "supercontest/static/img/banner_archive/"
- git add .gitattributes
- Then commit and push as usual.
- You can run `git lfs status` to see which files are going to git and which are going to lfs.
- Added the sbsc production db backups to git lfs. Added the banner_archive as well.
- Listened to some good old Tremonti solo work today. Lead vocals/guitar for creed/alterbridge.
- GitLab has template files for .gitignore, .gitlab-ci.yml, LICENSE, and Dockerfile that you can add to any project. Example: https://gitlab.com/bmahlstedt-group/tradebot/new/master. They will come prepopulated with whatever environment syntax you want (Python, for most my cases).
- Ducati is owned by Lamborghini, which is owned by Audi, which is owned by Volkswagen.
- Went through some different lists of folks' "stocks you'll never sell". Curated them into ones I actually cared about. Removed ones that didn't look amazing (unless your basis was 10 years ago). Removed the ones that I don't believe in (general electric GE, etc). Removed the ones that I don't want to support (mcdonalds MCD, etc). The remainder is obvious. The big players with consistently linear positive trends. After some recession to reduce the position, these would be good ones to dump some excess into (or weight more highly in the tradebot, as a qualitative boost since it's a quantitative tool).
- AMZN
- GOOG
- MSFT
- DIS (disney)
- IDXX (idexx laboratories: products and services for animal food and stuff)
- ILMN (illumina, inc: genetics)
- BAM (brookfield asset management: equity)
- RACE (ferrari)
- BA (boeing)
- LMT (lockheed martin)
- INTC (intel)
- CSCO (cisco)
Monday, October 21, 2019
- Meal prep.
- Made new batch of oat milk. With dates this time. Extra filtered.
- Made new batch of cashew butter. Because it's much more doughy than the other nut butters, add a bit of olive or coconut oil to cream it out.
- Made new batch of protein bars. Getting the ratios closer to perfect every time.
- 2lbs nuts, roasted 400F 10m.
- 3 bananas.
- 4-8oz pitted dates (about 40, 1 pack).
- 10 scoops protein powder.
- 1 cup oats.
- Salt sprinkle.
- Maia/Askren this saturday and then Masvidal/Diaz the next.
- Supercontest.
- Added the sbsc gmail account to my phone so I can monitor there, and get push notifications.
- Banner.
- Ross wants week 12 (needs to pay).
- Jcriss bought a week but hasn't specified which yet.
- Greg, Jeremy, and Franky have all expressed interest in a later week.
- There are 10 weeks left.
- Celery (backed by redis + rabbitmq) would probably be 1000x better than flask-apscheduler for my background cron jobs.
- I could expose a REST API for the direct models. There are tons of flask extensions to do so. Picks, changing leagues, roles, some of the admin stuff; it would all get a little easier. Plus then you can autobuild the documentation with swagger. It's a little different than the graphql api, which is just for user querying. I'm not going to do this now, because the added value isn't crucial for this app.
- https://gitlab.com/bmahlstedt-group/supercontest/issues/126.
- Minified the html (in prod) using flask-htmlmin. The text responses are condensed. It strips comments, extra whitespace, etc. It's still quite readable without prettyprint (unlike minified js). You access this on the elements tab of devtools (like you'd expect), not sources like for js files.
- Made team names on your-picks lowercase with capital, rather than fully upper.
- Max-width on name columns for all-picks and lb, so any user making their name gigantic doesn't wreck the responsive few. Overflow is hidden. Added the full name to the tooltip so that you can see it hovered if it's cut off normally.
- Made the int/float renderer pre-round to 1 decimal place properly, handling the X.0 case.
- It's annoying that companies are taking political stances on topics completely unrelated to their industry, simply for compounding reputation + appeal to new fanbases. Categorization, classification, identity politics, call it whatever you want - it's moving focus away from the actual values and individuals, which can't help the actual values and individuals. https://marker.medium.com/why-companies-need-to-pick-a-political-side-9fd5541da81d.
- This badge is pretty cool: https://github.com/sourcerer-io/hall-of-fame. Shows your top contributors.
- Checked out a meat market that I hadn't been to before (manhattan and manhattan basically).
- They had an ok selection, but not a wide variety of raw cuts. More like a nicer grocery store with preseasoned dinners. They didn't stock elk, but you can call on thursdays and add it to their weekly order.
- Costco business center still the best around here by far.
- The entity code for a linebreak is 
- Big Mouth is a super underrated show. There are so many clever bits and current social commentaries. There's even the artistic display with the musical portions.
- It's obviously not feasable to gasoline home delivery for a car owner, since a full tank is ~100lbs, and you'd need it every couple weeks. But for motorcycles? I need 3 gallons to fill it up completely. That's like a few gallons of milk every month, which is well within the means for a service like amazon fresh.
- There's a home delivery service called filld: https://filld.com/. It's $5/gal for premium, and a $5 delivery fee.
- You can order an above-ground fuel tank directly from Atlas: https://www.atlasoil.com/products/93e10lv. Minimum 150lbs, at $4.04/lb. 91-93 octane, but has 10% ethanol.
- I would totally do this for home use, if I were in a static location. It would last me a couple years, and be super convenient. It's a little risky though; basically a bomb on your property.
- The elastic stack is elastic search, logstack, and kibana (ELK). Beats is a fourth application that's sometimes included. It's similar to splunk and nagios, a full operational monitoring system. You can aggregate logs, monitor the system, all profiles/processes/nodes/etc, dashboards, metrics, other visualizations.
- This is amazing:
-

Sunday, October 20, 2019
- The dew point of water is a function of dry temperature and relative humidity, but 50-60F is usually pretty close.
- Switched 24, uber, and digital ocean (verizon was already migrated) over from the prime rewards card to citi, for 1% additional cash back.
- Placed Fresh order. Arrived same day.
- Watched El Camino (the Breaking Bad movie) with Harner.
- World series starts Tuesday, Astros vs Nationals.
- Niners still undefeated babyyyyyyyyyy. 6-0.
- Looks like I'll probably lose both FF games this week, and 2/5 for sbsc.
- Got the nice shaver delivered.
- Clean it under the tap after every use. You can take it apart.
- Clean it in the full machine once a month. The cleaning fluid needs replacement about once a year.
- Charging takes an hour. The battery lasts about 50m with the shaver on.
- Hold the power button for 3 seconds to enable/disable the travel lock mode.
- Supercontest.
- Added sticky-top to the navbar, which means that it scrolls down on the banner but then when the main navbar gets to the top, it stays! It's not supported on every browser but chrome is fine.
- Only two late pickers this week (marcus and cam).
- Added a user icon from font awesome for the profile dropdown on the navbar.
- Removed the dropdown-divider elements. I didn't like the spacing it added because the link should be clickable in the whole area, and overwriting the margin/padding wasn't worth the simple benefit of the line.
- Moved all the variable forwarding (python ->js) to a separate template file to keep it together and separate.
- You can't just pass the whole g object because it's not json-serializable.
- Moved harner to the paid league.
- Did a deployment in the thick of Sunday football while games were live. No prob. Downtime is <5 minutes.
- The statistics template was gitignored because it was in a directory named data. Fixed. https://sentry.io/organizations/bmahlstedt-org/issues/1288047383.
- The help collapse button in the contest view header needed ml-auto. The instructions/legend buttons already had it, but the collapse didn't.
- Added the full font awesome stylesheet so that the icons load a little faster.
- Made it so that late picks will send the confirmation to the admin as well.
- Made the all-picks page have consistent fixed widths for the team abbreviation columns.
- Added an abbreviation map for the nfl scorestrip's statuses, so it prints Final and Not Started and stuff.
- Verified that all divisions for percentages (usually possible points or num_picks) are protected with DivisionByZero error handling, so that users can register anytime (with 0 picks) and not break the service.
- Added tooltips on the lb for total picks for the week (all users), total picks for the season (one user), and total picks for the season (all users).
- Moved all percentage calculation to the frontend. The backend just has the numerator and denominator data. The frontend does the division to calculate percentages as necessary. This was moved to a macro to keep it consistent. It handles the divide-by-zero case.
- Added a really useful rollup to the left of the all-picks view, showing the status colors of all 5 picks in a convenient glance. This also consolidated the picks_open and !picks_open views, which this template had a few conditionals for.
- Don't use the scope attribute for td elements (in html5). It's only for header, to specify whether it's a header for a row or a col.
- You can't just + arrays in js like in python, you must concat or something like const newArr = [...oldArr1, ...oldArr2];
Saturday, October 19, 2019
- Greg Hardy (former Carolina Panther, beat his girlfriend up, bad guy) won his UFC fight last night via unanimous decision but then was ruled a NC after because he used an inhaler between rounds 2 and 3. Crazy, first time I'd ever seen this.
- Chris Weidman has lost 5 of his last 6 fights (all KO/TKO finishes). Joe Lauzon came back and won tho!
- Enrolled in autopay for the citi card. It doesn't activate until next month, so I'll have to make a manual payment for this statement.
- get_flashed_messages() is a flask capability. You can basically flash a message inside any route, and then it will be displayed on the next request.
- Jinja.
- `include` will return already-rendered content from another file. You can't inject a block into it, like you can with `extends`.
- Blocks can't be conditional. Just make the content conditional in the other template.
- Supercontest.
- Moved the flashed_messages over from alerts (the flask-user default) to notify.js. Much cleaner, and consistent with the rest of the app. Migrated the js to the toplevel layout as well, rather than the flask_user template, so it flashes on every site in the app. This is much better because you might be exiting a user view and going to a contest view (which is the case during normal login), and you want the message to display right away.
- Restructured the contest views a tiny bit to extend the contest view header so that it could inject the title block (they were previously only `include`).
- Got rid of the contest routes passing "label" back. It's no longer necessary with the generic "View" title in the navbar and the specific route title in the contest_view_header.
- Pretty substantial change for season/week/league filtering in the TEMPLATE layer instead of the backend routes. Makes it a lot easier to manage. A log was able to be consolidated. Just conditionals in html now, mostly, for what gets shown to the user.
- Along with this came easy stuff like: don't show leagues on matchups page, don't show week on lb, etc.
- Renamed graph to progression. In title and such only, not in endpoint.
- Added a macro that returns card header title with h3 and mb-0.
- Could add some extends for the card/card-body/row/col, but they're all pretty different so this inheritance wouldn't save a ton (diff sizes for col breakpoints mostly). It's also less direct/explicit.
- Made it so the "View" nav dropdown is available at all times, even when you're looking at the basic secondary ones (rules, stats, etc). This just meant building url_for with NO arguments, if coming from those routes. All the url_defaults were already in place on the app side.
- Changed my int-casting into the proper divisibleby(1) (jinja built-in test), and moved it to a macro. Rounds to one decimal place if float. Returns a string in either case.
- Galantis concert at the Shrine.
Friday, October 18, 2019
- Went to Dark Harbor, the Queen Mary Halloween event in Long Beach.
- Supercontest.
- Configured the sbsc gmail account to be more consistent with my main account.
- flask-user.
- Fixed all the BS. Working now with all the new templates. I still have the full flask-user suite copied over and customized. Here is a near-complete list of the changes:
- Layout includes banner and navbar.
- Extends main_view block, which has container-fluid and p-3, then the contents are a card-header with the title and a card-body with the form, consistent with the rest of my stuff.
- The settings are locked. enable_remember_me, enable_username, retype_new_password, etc. All the conditionals are gone in the templates.
- Added proper template bases for banner_main_navbar, banner_contest_navbar, banner_contest_week_navbar.
- Laundry.
- The tabindex attribute on the element is (surprise) the order through which they'll be selected as the user hits the tab key (like filling out fields on a form, etc).
Thursday, October 17, 2019
- Old mansion with horror themes and spooky stuff, with 6 mini cocktails. Yup. https://feverup.com/m/76796. Bought tickets.
- Later requested to swap the house of spirits tickets from sat 26th to fri 25th to deconflict with Lawrence's bday and Briley/Sharon party, just in case. They honored it; moved to Thursday Oct 24th, 630-830pm.
- Called and made haircut appointment, and there was availability today. The online system was smooth.
- A whole cow is a few thousand bucks (~$5/lb of usable meat). A whole pig is a few hundred bucks (~$2/lb for usable meat).
- Bought tickets for dark harbor (queen mary long beach horror event every year).
- Jinja.
- Read through much of the documentation: https://jinja.palletsprojects.com/en/2.10.x/templates/.
- You can do an {% endset %} if you don't to confuse scope of a common variable.
- Macros are just functions that return html. If you have similar blocks of html anywhere, conditional on some sort of input (or even not), then you can make it a macro and just import/call it whenever needed. Not that import is different than include and extend; it's only used for macros (and variables, if need be), just like python.
- There are some useful built-in filters I wasn't aware of: dictsort, map, unique...
- {% trans %} is used for i18n (translation, obviously).
- The `extends` clause should be the first line in a child template. You can have multiple `extends` clauses in the full inheritance chain, but you have to be smart about the `include` / `extends` relationships. Remember, `include` will just pull html from somewhere else. `extends` will tell the blocks to fill the parent. The block definitions themselves should be in the file with `extends`, and the `include` sections within the blocks.
- Netflix has twice as many paid subscribers as Hulu, but only 10% of the viewers as regular old tv! Their q3 earnings were much better. Surged 10%.
- I'm gonna start doing some intermittent fasting, out of curiosity. The main benefit you hear people talking about: IM increases autophagy (cell recycling). I already have such a regimented diet, I figure adding a time dimension to this won't be hard. 16/8 is the goal, but if I have to use 12/12 as a transition period, that's fine.
- 3 main meals (I already do this, just shifting times).
- 1000 shake.
- 1200 smoothie.
- 1800 meats.
- Other.
- Veggie juice before gym.
- Coffee. Since you can't drink on an empty stomach, this keeps caffeine consumption in better complement with your natural cortisol cycles.
- Protein bar after gym.
- Python 3.8 is released. Good summary: https://docs.python.org/3.8/whatsnew/3.8.html. Main additions:
- Walrus operator, for stuff like check length WHILE assigning to variable.
- fstrings can do stuff like f'{user=}' now, where it will print the variable name, an equals sign, and the value for you.
- importlib.metadata can give you info about version, requirements, and data files for any package. More info: https://docs.python.org/3/library/importlib.metadata.html.
- Toilet was wobbly. Tightened everything. Plastic fasteners into porcelain.
- Splurged on a new electric razor.
- My old one is tiny, uses batteries, takes forever to finish, etc. It's small, I'll keep it around for precise stuff like arms.
- Got the Philips Norelco 8900. $200. It's the nicest one without a digital interface.
- Calculated all the utilities (gas/water/electric) + internet that briley still owes. Will be about +$1500 when I move out. Also will probably get some security deposit back, although keeping expectations lower.
- Citi Double Cash arrived! Activated the card, as well as the online management account. Added it to Google Pay, which chrome obviously has access to. Added to Mint. Changed the verizon autopay to this; it's the only recurring payment on the card (so far).
- Changed the verizon bill to submit payment on the 1st of the month, to keep everything in sync.
- Elastic, splunk, and nagios are popular log monitoring platforms.
- Installed gthumb so I could crop images natively in ubuntu.
- Sudulaev is so good. In under 5 seconds, he goes from being in a standing single leg to taking the other guy down.
- Supercontest.
- If you don't commit the lines before midnight, the app will 500 because it will try to commit scores (Thursday is a score day, so it tries). It can't commit scores when there are no lines yet, because the score table FKs to the line table. No programmatic action here, just make sure to commit lines before midnight on wednesdays. Added the note to the sentry error: https://sentry.io/organizations/bmahlstedt-org/issues/1279298266.
- Committed this week's lines and submitted my picks.
- Sentry error for InvalidPicks('A pick is being attempted on a game that has already started, and for a pick that the user did NOT already place. This is likely a malicious attempt, since the frontend should screen for this.'). https://sentry.io/organizations/bmahlstedt-org/issues/1270625608/?project=1773879. Changed it to properly send the error msg back to the frontend, and log it locally.
- Renamed the season blueprint to the better contest_blueprint.
- Reorganized ALL templates into subfolders. Completely separated them. Instead of inheritance everywhere along the whole change, they're now all distinct, and I define commonly used bases that include the appropriate sections.
- Removed basically all customization of flask_user templates, other than that they extend bases/banner_navbar.html.
- Finished the second season of succession. Solid show.
- Disabled adblockplus, ublock origin, and privacy badger for mtv.com so that I could successfully watch live tv in that domain.
Wednesday, October 16, 2019
- Jack Dorsey is CEO of Twitter and Square.
- Nationals swept the Cardinals for NCLS. Astros are up on the Yankees 2-1.
- What to do after promotion to senior management: https://sriramk.com/exec-101-first-thirty-days.
- HTML/CSS layouts and other random tags.
- Webkit appearance <a type="button> is deprecated, stop using it. For <button> elements, you still have to put the attribute type="button" so that it indicates it's a clickable button. For all browsers except IE, the default is "submit".
- Tables come with a default bottom margin.
- em = font size of the element. rem = root em, the font size of the root document. This is usually 16px default in most browsers. Specifying something as 2rem would be twice the default font size, or 32px usually.
- In bootstrap the default $spacer is 1 rem. So for stuff like m-0 m-1 m-2 m-3 m-4 m-5, it's all relative to the root font size. They almost double in size with each number.
- m-0 = 0 (0px)
- m-1 = 0.25 rem (4px)
- m-2 = 0.5 rem (8px)
- m-3 = 1 rem (16px)
- m-4 = 1.5 rem (24px)
- m-5 = 3 rem (48px)
- Card-header and card-body elements come with natural padding (as expected), so if you have a child element with additional padding/margin (heading, table, p), you probably want to remove it. Usually it's the bottom.
- hr has top and bottom margins.
- The "role" attribute on many tags is not required, but is there as a helpful piece of information. The most common case is when people use links <a> as buttons, so role="button" will tell screen readers and other accessibility tools what the user is actually supposed to do.
- When you specify `height: 30%`, it's relative to the parent element. To make it relative to the viewport height, you can use `height: 30vh`. The same applies for width.
- Cols naturally have gutters between items and rows. Remove with px-0.
- Supercontest.
- Although the project is private, I would like a setting that allows the badges to be public, so that build status and such can be seen by non-gitlab-loggin-in-users and non-admin. Oh well. https://gitlab.com/gitlab-org/gitlab/issues/15646.
- Tons of UI updates, mostly from the css above. Cleaned up a lot of the spacing. Made the buttons proper. Padding, margins. Nothing uses fixed-width anymore, every single element is responsive.
- Made some adjustments for whitespace that flask-user and zero-md and such injected (inconsistently).
- Completely rewrote the navs, from the many bars to the various dropdowns.
- Reconfigured with multiple navbar-collapses at different breakpoints.
- Scheduler only runs in prod now.
- Fixed the js to allow the unselection of picks all the way to zero. It would only show the button on matchups.length > 0 before. Also moved the pick button disabling and div hiding to the ajax beforeSend, rather than in the target function.
- The britney banner required a little more, since I was created the gif mosaic in html with bootstrap's img-fluid and other pieces. I also used the grid system within the jumbotron for the first time, which gave me a lot more control, and with more ease.
- Disabled shared and group runners for my gitlab project. Only using my machine now. Shared runners can be re-enabled with the click of a button from the frontend.
- Unlocked bmahlstedt-xps13 from just supercontest use, so that other projects (that I own) can run their pipelines on my machine as well.
Tuesday, October 15, 2019
- GitLab.
- Shared runner pipeline quota rolls over on the first of the month.
- I had a build that was queued for over half an hour on the shared runners, so I installed gitlab-runner on my laptop and registered it to my project.
- I chose docker as the executor, to make sure that all builds were isolated.
- sudo gitlab-runner start (or help or status or stop or whatever).
- The frontend then picked up the job and ran it on my machine.
- Idling, it uses ~0% cpu and ~1% mem. When actively running the test job, it's still under a couple percent for each.
- If ever you want, just run `sudo gitlab-runner stop` and then start it at-will when you need a build or the shared runners are dead.
- You can follow along with the local execution with (you guessed it) `docker logs -f <container>`.
- The service persists over laptop close.
- Supercontest.
- Added stats plot for cover percentage as a function of line. No real correlation here, it seems.
- Added dticks to all plots for clarity.
- Fixed the raw data builder, which was counted line=0 toward the favorite/underdog totals, when that doesn't make sense. For a pickem game, the assignment to fav/underdog is arbitrary, just to fit in the db tables.
- Improved the subheader look quite a bit by collapsing the help/legend buttons into a second navbar. https://gitlab.com/bmahlstedt-group/supercontest/issues/122.
- Big Bootie 16 released!! It came with a video mashup this time: https://www.youtube.com/watch?v=9z8lSarGIuY.
- Cards.
- Ensured dignityhealth balance was 0. Ensured amex account was 0 and there were no pending/posted charges after cancellation.
- Changed my payment method from amex to amazon for the following recurring payments: verizon, uber, digital ocean, and 24 hour fitness.
- There are no rewards cards that offer a high return for bill paying, and it's not a category in the rotating/choice programs. Best bet is cashback (I'm already at the highest, 2%) for stuff like verizon phone bill.
- My amazon is 2% for restaurants, gas stations, and drugstores (5% on amazon and 1% everything else).
- Received the new prime card. It beat the citi in arrival lol.
- FF moves.
- Went to the clippers practice.
- Companies should not have to provide benefits. Retirement matching, health insurance, gym memberships. These are all great things, and should be provisioned accordingly, but they have absolutely nothing to do with employment. There are other ways to incentivize, and the coupling does more harm than good.
- Legally, employers do not have to provide benefits, but they face higher taxes and penalties if they don't.
- This is going to be an antiquated model in the future.
- Remember the turing test. A human asks a computer and another human questions behind a wall. If 50% (or more) of the interrogators guess incorrectly, the computer passes.
- Duplex is Google's AI voice system. Almost able to pass the turing test (not quite 50 yet, but >0).
- Coffee is being linked to more than alzeimer's deterrence; beneficial for cardiovascular, diabetes, cancer, more.
Monday, October 14, 2019
- Switch to daily robinhood snacks instead of weekly.

- Confirmed with harner for clippers practice tomorrow.
- Confirmed with jcriss for galantis friday.
- So many ways to align, depending upon flexbox or inline or grid or what.
- row, col
- align-items-center, justify-content-center
- text-center
- mx-auto
- Supercontest.
- Added a plot for how much teams are covering/notcovering by. It's differential-line, averaged over all weeks. The bears are first (4.6), the dolphins are last (-6.5). It trends like cover %, but it's not the exact same because margins are obviously a whole new variable.

- The dolphins margin is crazy. They're already getting horrible lines (like +15), and they're underperforming those by almost a touchdown, on average lolol.
- Added contact info.
- Added all the details about banner purchasing to the rules md.
- Updated the badge links from my user space in gitlab to my group space.
- Moved all the stat logic out of views and into a dedicated module (core/stats). Significantly reorganized it to make it more clear, easier to add plots, less bug prone, easier to maintain, etc.
- Added plot for average lines by team.
- Cleaned up the display of the statistics page. Made the plotly renderings responsive, which is a much better experience. Added cards. Looks amazing now.
- Layout restructure.
- Jumbotron, then navbar, with no containers/margins/padding/etc.
- Then main_content wrapped by container-fluid for responsiveness and p-3 to make sure it looks comfy. Inside main_content it starts to get different per view.
- Usually card then "card-header pb-0 text-center" the card-body then "row justify-content-center" then col(s) with whatever responsive breakpoints you need.
- You need to use row and col if you want something to control the responsive breakpoints of something, or if it you have multiple elements side by side. This is the more common case. If you just have text, you don't need it.
- card-body elements that contain plotly graphs usually have p-0 to make the plots as large as possible, and then bars have pb-3 after so that the vertical x labels don't extend all the way to the end.
- Moved the premium/upgrade back to the toplevel navbar. This makes it more visible, so the color looks better, but it also solves a second thing. Bootstrap's navbar, if aligned right, has the dropdown extend beyond the viewport. Dumb. The premium/upgrade is rightmost, so it shifts the dropdowns left so they fit.
Sunday, October 13, 2019
- Supercontest.
- Finished all the stripe integration, in production. In general, loved the experience with this product.
- Tested by removing my paid status and running through the registration as if I were a new random user.
- Lockdown happened at midnight, right on time, without issue.
- Late pick submission form worked perfectly (Raj is in another timezone, I'll fix that js utc issue).
- The email reminder hit up 10 people. It definitely helped.
- Sent the app to eric.
- Added a legend for the table colors (and asterisk = home and border = completed). Turned this and the msg_list into an accordion (multiple collapses).
- Ended up doing side-by-side buttons instead of accordion.
- Moved the non-view-specific information to the url_value_preprocessor on @app. All global g attributes are attached there (current_season, user is premium, etc). View-specific ones are added on the blueprint-specific preprocessor (requested season, league, week, etc).
- Sentry reported a ZeroDivisionError is user's possible total points = 0 (in calculating the percentage). Fixed.
- The nfl scorestrip returned an xml without week (only one time). Sentry caught it. https://sentry.io/organizations/bmahlstedt-org/issues/1271295158. Resolved without action.
- Fixed the issue where Raj tried to pick in another country. It now casts the NOW timestamp to pacific time before evaluating if it's wed-sat for the open pick window.
- Created an alert on the DO droplet for disk utilization > 90%. It's currently at 57%. The machine is 25GB only.
- Had to wait about 5 minutes for a shared runner on gitlab today, my longest ever. Not too bad I guess.
- Stripe takes 2.9% + 30 cents on every transaction (same as paypal).
- For the $50 supercontest registration, we pocket $48.25 and stripe takes $1.75.
- They autotransfer the money you've made to your bank account every 7 days or every 2 days or something. It is automatic though.
- Smoked an 8lb pork butt and 5lbs chicken thighs.
- Subscribed to Farnam Street, a newsletter about critical thinking and mental modeling.
- cmake is a build system that allows you to write macros that generate makefiles. Alex has been using it a lot lately, says cmake + req-compile could replace sx-setuptools.
- Megan Olivi did commentary during redzone today?? Must be contracted out now with the NFL, in addition to the UFC.
- Localhost with my app open in the browser for a number of hours ... didn't look great. It was at 2GB mem utilization.
- You CAN have url_defaults and url_value_processors in a hierarchy, like one for the full app and one for each blueprint in the app.
Saturday, October 12, 2019
- Supercontest.
- Updated version to major release (not semantically for functional change, just needed to rollover). 2.0 baby.
- Removed the modal edit/create. It goes back to redirect. But I also confirmed that editing does NOT work.
- Getting cookie header errors for cloudflare, plotly, and discord:
- A cookie associated with a cross-site resource at <x> was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
- I'll handle this later.
- Chat clients.
- Created a discord server and channel for supercontest.
- Discord offers a native embed for a read-only widget. To allow users to write messages, you need a wrapper around the embed. Titan and widgetbot are two very common options. I went with the latter, because it's a crate instead of an iframe, and the docs/experience were much better.
- Was broken at first due to ddos on most of their shards, but an admin gave me an alternative in the meantime.
- Closed https://gitlab.com/bmahlstedt-group/supercontest/issues/22.
- Removed the create/edit/delete from flask-admin. It didn't work, and this keeps other admin from severely affecting the db. Petty can still add late picks, see the scheduler, and view the data. That's pretty much it.
- Deleted the 2018 paid league. It was identical to the 2018 free league because I didn't track that data back then. I didn't want people to see the 2018 paid league having more people than the 2019 paid league and thought it decreased, when in reality it's just that the app kept everyone from 2018.
- As far as all players, we had 42 people submit at least 1 pick in 2018 and 45 in 2019, so there was some growth.
- Added a few clearbit logos and listed out all the flask extensions on the readme. Looks good.
- Added a pypi version badge to the readme as well.
- Changed the #general text channel to #supercontest. Deleted the voice channel.
- Created a FontAwesome5 account and added it the templates, just one script in <head> then <span style="color: COLOR"><i class="fas fa-ICON"></i></span>
- Added is_paid_user to the g object, for the main and season blueprints, and added a corresponding query to get this info.
- Stripe. The whole cycle.
- Navbar indicator for already-paid vs want-to-upgrade?
- Points to route that creates the stripe session and line items, then renders a template that simply redirects to stripe checkout.
- Tested with test secret key, test public key, and test card information.
- Changed bootswatch from united (orange) to yeti (black).
- The scheduler worked for the unfinished picker email.
- Sidenote - all admin have shared access to the supercontest gmail outbox, as an audit log for late pick submissions.
- Finished season 1 of succession. Gonna try to get through as much of season 2 as I can. The season 2 finale is this sunday.
- Wow. Employee fires back at employer? https://deploys.io/docs/disweb/.
- Heisenbug - a defect that you can't find once you start looking specifically for it.
- Vorfuhreffekt - when you try to present something and the opposite happens (like a software demo).
- I agree with most of this, daily standups are more distracting than helpful: https://codethrasher.com/post/2019-10-06-the-pointlessness-of-daily-standups.
- Full spotify in your terminal! https://github.com/Rigellute/spotify-tui.
- The south park episode that talk about how ridiculous chinese censorship is got banned in china: https://www.vice.com/en_us/article/ywaq3g/after-a-south-park-censorship-episode-china-deleted-the-entire-show-from-the-web.
- Able is a new alternative to medium, with a focus specifically for software. I like it. This would be a great alternative for my blog. I created an account, and then stopped once I saw that they didn't have a "search my blog posts" feature. So crucial, so obvious, but no one has it at first. https://able.bio/.
- Prunes are dried plums. Dates are actually the direct fruit of a date palm tree.
- Cool murder mystery in a sqlite table: http://mystery.knightlab.com/.
- Get 2 witnesses from the crime_scene_report, 14887 and 16371.
- Join all tables through interview to get the killer was at the gym on jan 9, male, membership id starts with 48Z, gold membership, and DL plates included H42W.
- Search git_fit_now_member and check to isolate the times from 20180109 1600-1700. This leaves 48Z7A and 48Z55, which is 67318 (Jeremy Bowers) and 28819 (Joe Germuska).
- Join to income to see that only jeremy bowers has a valid ssn. This is killer.
- Check his interview to find info about the person he was hired by. Query that to find that it was Miranda Priestly, id 99716. Her annual income is 310k. She has no interview. Insert her into the solution table and it tells you you're right, break out the champagne.
- Confirmed that my 24 membership is billed to my amex. When citi arrives, I'll have to swap over.
- Remember, the ducati is about 150hp (peak) 75lb-ft (peak) 400lbs (wet). As far as standard power to weight ratios, anytime you have over 1hp/10lbs, you're in a really really fast car. The ducati is almost 4 horsepower per 10 pounds.
- Guy broke the record and finished a marathon in just under 2 hours. Crazy. That's a 4:35 minute mile pace.
- ERR BLOCKED BY CLIENT is usually because you have an adblocker running, not because the service is broken in some regard. Some good (non-ad) content looks like advertisement material, like icons and such.
- CircleCI is a competitor to GitLab. Used by fb, spotify, gopro...
- Sometimes you need to test webhooks on a dev server, like my situation with stripe/supercontest right now. Services exist to forward webhooks to localhost, exactly for this.
- Tried ultrahook first, but they only have a ruby gem to run their server.
- Used ngrok next. It's awesome. Easy to install, easy to set up, easy to inspect, easy to use. http://localhost:4040 is the interface for inspecting ngrok itself.
- Stripe CLI also comes with a tool for this.
- Oh wow, I take it back. http://serveo.net/ is the shit. You literally just run one command, no signup or anything, and you can pick the url, and it's static.
- ssh -R bmahlstedt:80:localhost:5000 serveo.net
Friday, October 11, 2019
- Chat.
- tawk.to is the chat app for live chat (talk to users on your site, like "need help with x?"). It's free.
- minnit.chat is the chat app for group chat (users talking to each other). It's also free, for max 40 simultaneous users. https://minnit.chat/. Created a room, played around with it - I liked it a lot.
- Tried chatcamp.io as well. Their website was pretty bad. Broken register link, bad UX on the dashboard, poor documentation.
- The problem with these group chat embeds: they force user accounts on THEIR platform. I couldn't find a single app that allowed you to simply forward the user accounts that you already have on your site. It's honestly as simple as a single unique key; even email would work just fine. You just need a string to display in the chatroom. I understand the design though. They want user traffic on their own platform, they don't just want you to use them for storage space and chat functionality.
- Closed the ticket as won't-fix: https://gitlab.com/bmahlstedt-group/supercontest/issues/22.
- I'm not sure if GitLab issues have a resolution field.
- I love that GitLab correctly calls them Merge Requests instead of Pull Requests, but they went with the legacy "Issues" instead of "Tickets" which I'm less happy about.
- Went through the tough mudder pics from our event and collected the ones with us. About 3 for each, at 3 separate obstacles. Uploading your photo and having them find your pics is easier than searching yourself.
- Supercontest.
- Closed the user league creation ticket. https://gitlab.com/bmahlstedt-group/supercontest/issues/67. Will reopen later if need be.
- Closed the final "Long Term" milestone.
- Last remaining ticket: stripe. I do wanna play with this one. https://gitlab.com/bmahlstedt-group/supercontest/issues/29.
- Tried customizing the navbar for flask-admin. Copying the templates over isn't perfect because then you can't upgrade the pkg. In addition, they have a full html template, you can't extend your own header, so that's not ideal. This was the same with graphiql; I'm surprised. It's not hard, I guess they just don't expect you to embed such a full page as a subset of another page. I guess you could just use an iframe.
- Neither graphql or flask-admin were designed for iframe embed. I'd have to subclass some of the internals to reroute some templates, and again, I'd be making it more of a pain to upgrade than anything else. It's fine as-is; getting my banner on top is not worth it.
- Turned autocomplete="off" on the feedback form so the "petty's mom" surprise wouldn't be shown before you type, if you'd already done it at any point in history.
- Went ahead and added the convenient late pick form in the admin view. It tells you the week and season, you pick the user and teams from dropdowns, then it commits and emails them. Nice.
- Closed the ticket: https://gitlab.com/bmahlstedt-group/supercontest/issues/118.
- Added Petty to admin.
- Started playing with stripe. Submitted application to activate the account (business info basically).
- They have Stripe Atlas, which is a pretty cool service that helps you form a C Corp, generate the docs, get a tax ID number, etc.
- Used the wizard to start the "Checkout" tutorial. Accepting one time payments, from an https website, etc.
- Got the TNF patriots pick correct. +17. Nobody picked the giants.
- NE defense has the 2nd most points out of any offensive player (only McCaffrey higher) and they have the 10th most for avg/week
- PPV.
- As of Oct 18 (1 year ago), Mayweather Pacquiao is the best selling PPV of all time: 4.6m buys.
- Mayweather McGregor is 2nd at 4.3m buys.
- Khabib McGregor is 3rd at 2.5m buys. They drop off pretty quick.
- Amazing UFC teaser commentary: https://www.youtube.com/watch?v=X7WywdwqK3o.
- Steve kerr reaction to trump calling him a little boy about china dodging: https://streamable.com/8saxb.
- Good summary by Buffett: https://www.youtube.com/watch?v=vl2aP8dlIn4. Human investing makes sense. People get pumped, and you get huge bull markets for short times, then they stay stagnant for years because they're looking in the rear view mirror, doubting it will continue so gold.
- Now that the gigantic majority of trading is ML, this will change. Sure, you'll have explosions like crypto, but the general trend is more programmatic.
- In basketball, true shooting percentage (TS%) weighs free throws lower and 3-pointers higher, so it's a more balanced metric for measuring your shooting efficiency than field goal percentage (FG%). You're penalized less for missing a 3 because it's harder, etc.
- Steph curry got 97% TS yesterday: https://www.youtube.com/watch?v=qftr409jP-4.
- "Vegetable Oils" are usually just blanket terms for trans fats. You're better off with a seed oil like flax or sesame oil, because you're getting the actual oil and fat from from the source.
- Cool inside look at the nutrition program for the patriots: https://www.youtube.com/watch?v=9iDTAzD2hT4.
- They get every meal provided, even in the offseason.
- You can customize and special-request items, if you want.
- They go through 70lbs of poultry, 25lbs red meat, 25lbs fish, and tons of vegetables every day.
- Everything organic, grassfed, freerange. The usual.
- They do a ton of smoothies.
- The whole program is surprisingly equivalent to my daily meals.
- Read up a little bit on bootstrap forms and validation.
- You can have subsequent form inputs base their options on previous selections (e.g. season -> week). You have to put these conditions, and subsequent queries (post to server for new choices) in javascript. It's dynamic. There's no shortcut.
Thursday, October 10, 2019
- Gitlab/sentry:
- I don't think you can default an assignee for tickets or MRs in gitlab (yet).
- Moved my project from my user namespace to a group. This is like an epic across projects, combining them together to see all tickets, etc. You can also see cycle analytics.
- Updated my remote urls to bmahlstedt-group/supercontest.git (updated namespace). Did this on my local machine and sbsc prod.
- Resolved the old AnonymousUserMixin sentry issue.
- Added the supercontest repo to sentry, and integrated the app in gitlab, so all my source commits are available to sentry.
- Blandish - to flatter someone manipulatively.
- MLB postseason is now in the semifinals. Nationals and Cardinals in the NLCS, Yankees and Astros? in ALCS.
- The carnivore diet is absent of vitamin C, vitamin E, and fiber.
- flask-user utilizes flask-login, not flask-security.
- Tony Bennett is currently 93 years old. Frank Sinatra died at age 82 in 1998.
- Supercontest.
- Fixed a few small bugs. Some wording.
- Added sentry releases.
- Rejiggered the picks_open logic to natively include is_current_week. Restructured the IF logic in the your-picks/all-picks routes to be extremely clear about the scenarios, and which info bubbles to present to the user based on timing (no lines, no picks, post-picks, picks-closed, etc).
- Integrated flask-admin.
- The main benefit is that you get ModelViews out of the box, allowing a web interface to create/edit/delete/search the database.
- The secondary benefit is just organization. My dashboard, scheduler, and all the other custom admin views for the supercontest can be added to the general /admin navbar.
- Added the model views. Protected with CRSF (flask_admin.forms.SecureForm) and restricted to an authenticated user with the admin role.
- I now have 8 tables in the app.
- There was an apscheduler os write error that sentry reported: https://sentry.io/organizations/bmahlstedt-org/issues/1266918507/?project=1773879. Not sure.
- Remembering 15 years ago to college applications, since I'm starting to do the same with job apps; I'm much more of a sniper than a machine gunner.
- I've used ~100m of 2000 (5%) of my shared runner pipeline quota.
Wednesday, October 9, 2019
- Supercontest.
- Added a global @app.before_request to print the email of the user for all requests, to make the logs more clear.
- Made the matchups js a lot smarter about iterating through picks. Instead of going over all matchups rows and comparing to picks, it gives the ids to the td cells and then targets the specific row, just iterating over the picks instead of all matchups.
- It now adds a 2px border to cells for complete games, to distinguish between what is finished and what isn't. This happens on the your-picks and all-picks views.
- Fixed the emailer. The problem was the asyncronous job adding. APscheduler is a piece of shit, from all my experience with it so far. Jobs added before scheduler.start() will trigger properly, but having another view call add_job later has never successfully triggered that job. Now, it just adds the email reminder at app start (for prod app only). I left the scheduler admin view around, but put warnings that it doesn't really work due to apscheduler.
- I've been more conscious about pushing, now that I have CI set up. I batch a lot more local commits now. This will save the 2k min limit on the shared runners.
- In setting up CI/CD on the droplet yesterday, I had accidentally removed the public key in /home/bmahlstedt/.ssh/authorized_keys (the one that corresponds to my private .ssh/digitalocean). I added it back (/root/.ssh still had it), and I could ssh again.
- In moving source checkouts over from github to gitlab, I lost all the backups (they aren't tracked in vcs). This is fine, I have a new one with all the current data.
- Changed the matchups template to use picks_open as well.
- Added cards to the messages above each view's table. Styled better.
- Added the roles table, create admin, added myself. Updated all views to use this properly. https://gitlab.com/bmahlstedt/supercontest/issues/115.
- First MR, ticket closure, master kickoff, deploy; all that ci/cd went well in gitlab.
- Wednesday deployment, changed banner.
- Quick bugfix with picks: https://gitlab.com/bmahlstedt/supercontest/issues/117.
- Sentry:
- List of importable integrations: https://github.com/getsentry/sentry-python/tree/master/sentry_sdk/integrations.
- Added sqlalchemy.
- You can't add the gitlab integration for sentry unless your project is in a group (not owned by single user) - https://github.com/getsentry/sentry-plugins/issues/458.
- Changed sentry to only run in prod mode, so the local dev instance doesn't eat up my sentry monthly event limit.
- The uncaught "AnonymousUserMixin object has no attribute id" errors were from queries.is_user_in_league in the url_value_preprocessor. I protected that with if current_user.is_authenticated, so we shouldn't see those anymore.
- Protected all other current_user calls too (FMD's get_current_user_email, etc).
- Note for future apps: if you're ever calling current_user outside of a view or other function where the user is guaranteed to be logged in (protected by @login_required or such), you should condition the current_user object on is_authenticated.
- Left the email notifications for every exception ON. I don't anticipate spam, now that the AnonymousUserMixin error is fixed.
- Flask debug toolbar changed its default to disable the profiler. I re-enabled it.
- Lol not the biggest jon jones fan but completely agree with this: https://www.reddit.com/r/MMA/comments/df49ql/jon_jones_to_izzy_im_not_out_here_searching_for/. Izzy is annoying.
- Created an radnet account to access my MRI results.
- https://myradiologyconnectportal.com/Exam.
- Bad: "There are mild degenerative changes of the coronoid process."
- Good: "There are no areas of abnormal signal involving the trochlea or capitellum. There are no areas of abnormal signal involving the radial head. The radial collateral ligament and attachment of the common extensor tendon and ulnar collateral ligament and attachment of the common flexor tendons are normal. There is no triceps or biceps tendon tear. There are no soft tissue masses. No ulnar nerve lesion is identified."
- You can make waiver claims on tuesday night for ff. I had thought that it was wednesday all season so far.
- Ortho appointment in Van Nuys. Basically just said it's ok, go to PT. 10 appointments concluded with 0 treatment.
- Picked up DL from Brews Brothers after.
- Ate lunch at Dave's Hot Chicken in NoHo. It was amazing. First time I've been impressed with outside food in a long time. 20min wait around noon.
- Loving Terry Reid's music. Always liked seed of memory, but had never heard faith to arise or any of the others. Unfortunately, that whole album isn't on spotify. He sounds a lot like Robert Plant, and the music is chill.
- pylint no-else-return has always been a dumb rule. Flow is so much more clear when it's explicit about the else.
- I've said it many times before, but unfamiliarity is the root of most discrimination. Racism would be nearly extinct if the whole world spoke the same language. Then you could tackle the minority remainder, the heart of the problem; anger.
- In gitlab, you don't need to put a pound sign in the branch name! This makes command-line-git a lot easier. You still put it in the commit message though.
Tuesday, October 8, 2019
- My 15(?) year old wix website has finally been cancelled (which is probably for the better).
- "And the day came when the risk to remain tight in a bud was more painful than the risk it took to blossom." - Anais Nin
- Finished Once Upon a Time in Hollywood.
- Smoked the pastrami beef ribs that had cured for 6 days. Amazing flavor.
- Next set of beef ribs, I want to try wrapping earlier, closer to the time you would for brisket. I'm curious how much it changes tenderness vs bark.
- Paid off the remaining balance on the sequoia hospital bill from years ago; was like $220.
- Cancelled the amex.
- They tried to give two incentives, one for miles (20k) and one for cashback ($175), both requiring that you spend 3k in 3 months.
- The companion pass is forfeited (I had 1), and the annual fee is not prorated (there were 4 months left in that this billed year).
- Removed my amex from google play. Removed the amex browser bookmark. Mint automatically made it inactive, I didn't have to do anything!
- I would like the Vitamix A3500 - it's so much better than my ninja, and I use it at least once daily. It's $525. I'll probably wait until after I move.
- The Strassburg sock is definitely helpful for plantar faciitis. WFH makes it a lot easier to get hours in during the day, since I find it annoying to fall asleep wearing.
- Put the 2020 reg on the Ducati. It's yellow, so it looks better than the blue 2019 sticker.
- Watch Rob Zombie's new 3 From Hell, the third installment in the series after House of 1000 Corpses -> The Devil's Rejects.
- The carolina reaper single chip is sold out online, but I just discovered that the riteaid on aviation/artesia has these 3 flavors:
- Kubernetes/GCP.
- Good article on kubernetes: https://www.digitalocean.com/community/tutorials/an-introduction-to-kubernetes. Very useful for orchestrating many containers across many machines together. Metrics, storage options, scalability, ML resources, much more through the full GCP suite.
- Created a project (supercontest) on GCP and removed the default API Project and My First Project.
- Enabled the Google Compute Engine API for this project.
- n1-standard-1 machine, just 1 vCPU and 3.75G mem (the smallest standard machine).
- Billing is by resource. It's like 3 cents per cpu hour and 0.5 cents per gb mem hour, so the n1-standard-1 is about 5 cents per hour, or about a dollar a day, or about $30/mo. My digital ocean droplet is $5/mo.
- With the $300 promotion on signup, looks like I can test this for free pretty easily.
- Ended up staying with digital ocean for now. I don't need any of the other GCP products (compute, storage, ml, etc). The one attractive feature is scalability, but I can upgrade with DO as well.
- GPG key = GNU Privacy Guard.
- Sentry.
- Created account, added the flask integration to supercontest.
- For the free plan, you can record 5,000 errors per month and it keeps history 1 month back. That's 160 errors a day.
- Linked my gitlab project to the sentry api, created auth token.
- GitLab.
- If your project is public, and you have gitlab ultimate, then you get a security dashboard and dependency list. Pretty cool, but I obviously can't take advantage of this.
- In general, I've been very pleased with the experience on this platform. Moreso than the atlassian stack, jenkins, etc.
- Added the deploy stage to my yml. Added the variable SSH_PRIVATE_KEY (for the droplet) to gitlab. Added it as a known host directly through ssh-keyscan.
- Gitlab runs the deployment as root, and the deployment has ansible pull new source on southbaysupercontest.com, so I had to make sure the machine had the proper ssh keys under the root account (not just mine). sudo cp -r ~/.ssh/ /root
- Ansible doesn't maintain docker images officially anymore, but some user groups keep them around (albeit not very current). Also...you have to specifically install ansible after you pull the image lol.
- Did not integrate prometheus; there's already a metrics agent that digitalocean provides to its droplets. I put a link to the external DO dashboard in gitlab tho.
- Updated the readme to indicate where metrics were, as well as SCM, CI/CD, etc. The GitLab and DigitalOcean logos (clearbit) look good.
- Modified my view to be fluid.
- The minutes you've used in CI/CD are at https://gitlab.com/profile/pipeline_quota.
- Integrated with sentry so that error tracking was in gitlab as well.
- I don't need to use the container registry associated with the project, although this feature is great. My workflow is not build -> test -> pushImage -> deploy, so a record of all the image artifacts in a registry is less important. I test the source and then build the image right at deploy time, which is more than satisfactory until I start scaling the test/review app portion of things.
- Sometimes dpkg will prompt for config changes (like apt does for install y/n). Use -o DPkg::Options::="--force-confnew"
- Changed my mem usage alert on the droplet from 90 to 95%.
Monday, October 7, 2019
- Gitlab.
- Migrated all projects from github to gitlab.
- Added the public ssh keys from both bmahlstedt-xps13 and southbaysupercontest.com.
- Delete the checked out repos, then recloned from the gitlab url (you could also just set the remote url).
- Privatized and archived all my projects on github, with a pointer to gitlab.
- Cool features:
- Activity charts and filetypes: https://gitlab.com/bmahlstedt/supercontest/-/graphs/master/charts.
- All contributor information, and when: https://gitlab.com/bmahlstedt/supercontest/-/graphs/master.
- Great CI/CD, security/compliance, operations, package support, more.
- Commit heatmap: https://gitlab.com/bmahlstedt.
- Got initial CI set up to run test-python on commits. Using shared runners for now, 2000 min/month should be enough. The wait times are zero. If needed, I'll register my own machine as the runner (since I'm the only developer, and the machine is guaranteed up).
- Using custom stages, rather than autodevops. That's a cool feature though.
- Added build and coverage badges to the readme.
- Google Cloud Platform.
- Kubernetes is obviously the google production container orchestration platform. Gitlab has lots of integrations with it, as well as Google Cloud Platform in general. I should try it out.
- GKE = Google Kubernetes Engine.
- Started a trial with GCP.
- Removed pay-with-points from my amazon card. You're losing the cashback if you pay with points. Just always use the card, and withdraw all the cashback from the chase account whenever you want.
- Homemade protein bars for my mom yesterday. Pecans, oats, prunes, cinnamon, protein.
- Won both fantasy games. Went from 0-4 in yahoo, last place, to highest scorer of the week. 2.5 in sbsc.
- Placed fresh order.
- Supercontest.
- Put in the niners pick for jcriss and econstan.
- Changed FMD to monitoring level 1 for the user and scheduler blueprints, while leaving my main and season blueprints at 3.
- Finished the algorithms and data structures book, added all notes to google drive.
- Ordered a small bedroom trash can, since amazon lost the other delivery (got refund).
- I would like to do a hanging display for all the tough mudder headbands I have. The most basic is just wood blocks, maybe 1x8" with 1/2" thickness, then hook screws connecting them on both sides.


- There's a ufc event every Saturday for the next 6 Saturdays, and they're all good.
Sunday, October 6, 2019
- Tough mudder yesterday was great. It was on the easier side (only 8 miles), but I saw a few new obstacles and got the pink headband. Awesome to do it with Eric. Plantar fasciitis did surprisingly ok.
- Fogo de chao. Prime rib and filet were good, as always. Beef rib, sirloin, new york, pork rib, picanha, chicken - everything else just can't compare to the smoker.
- Cal lost to the ducks, warriors lost to the lakers (pregame).
- Watched the comain and main for ufc 243. Dan hooker is awesome. Adesanya looked fantastic but is annoying as hell. Too cocky and had one of the dumbest walkouts I've ever seen. Tried to make it a choreogrpahed performance like WWE and boxing. Gtsoh.
- Supercontest
- Entering the python shell is not resource-cheap. It creates an entirely new instance of the app. Not with a server, but will all the other frills; apscheduler, etc.
- Submitted late picks for Cam, Wes, Raj, Jesse Thompson, Ben Yezer, and Phil Twist.
- Credit card research.
- BoA preferred rewards offers 5.25/3.5/1.75, which is pretty damn good but you have to have 100k+ in your combined BoA/Merrill accounts. Otherwise it's 3/2/1. If you have that much sitting in your account, then you can gain a lot more by moving it somewhere with higher growth rather than reaping higher cashback.
- While looking at NEW cards, I saw that there's a better version of my old card. This is a ridiculous mistake. I've had an Amazon Rewards card since July 2013, which earns 3% back on Amazon. If you have Prime, which I do, you can upgrade to the Amazon Prime Rewards card, which gets 5% back. It did not automatically upgrade me, and I never noticed. I exported an order report, and I have spent $30,000 since July 2013 on Amazon. I missed $600 free dollars by not clicking the button. Chase will ship a new card automatically, even if the upgrade was done on amazon.com (I called Chase to confirm).
- Made my last payment on AmEx Platinum Delta Skymiles, will cancel in the next couple days. I no longer do business with Delta. The miles won't expire as long as I maintain my Delta account; the amex card is not necessary. I can finish off the remaining ~135k miles whenever I want, as well as the buddy pass this year.
- Looking for purely cash back. Gas is easy with the motorcycle. Not a big traveler, don't need air/hotel. Already a bomb chef, don't need restaurant rewards.
- Chase ultimate rewards program is good for certain use cases. You can regard all "points" as basically 1% cashback, with some variation. In reality, a point can be anywhere from 0.8 to 1.5 cents, and can change based on what you're redeeming them for as well. The most common use case is for travel, where you can get 1.25-1.5x the value of your points. You can also share points between cards, which is useful for people with business cards - they can use the points earned on work trips toward their personal rewards program. It's only raw chase cards - cobranded cards (like my amazon) don't share. Because of this, and the de-emphasis on travel, I don't need a card in the chase ultimate program in particular.
- Cashback-focal cards with no annual fee and no rotating schedule:
- Citi double cash. 2%.
- HSBC cash rewards mastercard. 1.5%. $150 bonus once if you spend 10k in first year.
- Paypal cashback mastercard. 2%.
- Capital one quicksilver cash rewards. 1.5%. $150 bonus once if you spend 0.5k in first 3 months.
- Chase freedom unlimited. 1.5%. $300 bonus if you spend 20k in first year.
- (Chase freedom doesn't count because they rotate categories, which I don't need).
- Amex cash magnet. 1.5%. $150 bonus once if you spend 1k in the first 3 months.
- Decided to go with citi double cash. Highest basic cashback. I already have visa through my amazon prime rewards card, and this one is mastercard. Applied and accepted.
- Common, boring mistakes: https://medium.com/signal-v-noise/the-4-questions-you-should-stop-asking-during-your-one-on-one-meetings-ed7431da11aa.

- Cool NFL data of score combo possibilities: https://nflscorigami.com/.
Subscribe to:
Posts (Atom)




