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