-
- Private work.
- WP.
- Updated wp to 6.4 (and plugins).
- Updated theme 2015 -> 2024. FInally got the editor indentation back.
- Remember the primitives: posts, pages, media, comments. I don’t use comments. I use posts and media. And now I split segments into pages for ease of use.
- Created pages: About, Archive. Then there’s the default “Blog Home” which shows recent posts as the homepage.
- Edited footer (template) to just be copyright.
- Customized header. Site logo, site title, pages, search.
- Removed author name, category, etc from the Post Meta template. Just Date and content. Title goes around the meta (the calling template).
- Remember – you have to specifically link a link in the post editor, you can’t just copy a URL. Just highlight the link and click the paperclip. Example: https://gitlab.com/bmahlstedt
- Created new template part Posts Query Loop for use on Blog Home and Search Results (note this fixed the search inconvience, now shows full posts on results page).
- Also added this new part to the other templates that show posts: Archive (day, month), Index.
- Edit button on individual posts is gone? Just go through admin interface.
- One last little nit: the bullets in editor mode are normal and the bullets in the viewer (published) are reversed (clear is level one, solid is level two, etc).
- Media library does not allow ico or svg – use jpg or png.
- Installed a vanilla plugin to highlight search terms in the results.
- You can obviously connect a webapp directly to a db. Faster to prototype. But at scale (and for safety), the frontend should talk to the backend via a rest api, and the backend maintains the db connections. You can pool, make queries efficient, cache, check auth – many things that are harder / impossible / spoofable on the frontend.
- AWS.
- Remember AWS Pinpoint tollfree registration can take up to 15 business days. That ends Nov 24 for me.
- Bunch of research on AWS API Gateway.
- Swagger, methods, CORS, massive amounts of customization, deployment stages, custom domains, integration with cognito, integration with lots of compute backends (lambda is most supported), ability to generate SDKs from the API definitions, testing, versioning.
- Great choice for API dev/mgmt. Overall; the value is truly in the definition of the API. Right now, it’s just living in the flask routes. API gateway gives it structure, standards, stages, versioning. All the desires of an at-scale API management process.
- This is also deeply tied to compute. The value of APIGW is extracted much more greatly if the microservice model is employed with Lambda functions as the serverless backend. It’s more cheap and atomic than ELB -> EC2.
- Note on cloudfront: if you build a REST API in APIGW and choose edge, it will create a managed CF dist for you. Both work in tandem.
- Outposts = on-prem deployments.
- Compute. ECS is much cheaper than EKS (which costs $70/mo just for control plane). ECS is cheaper than ELB/EC2 ($18+/mo). Fargate is the serverless deployment (for both).
- Elastic Beanstalk.
- It’s an aggregator. Can define your backend server, what env/lang/version, attached RDS, nginx revproxy, load balance, logs to s3, maintenance windows, CW integration, security groups / IAM users / policies.
- This is very nice for users who don’t want to learn the details of the aws stack/offerings. It’s a single entry point to deliver a full-stack application, and EB handles the infra under the hood for you.
- Since I’m already managing all those components, I’ll stick with Amplify/Vercel for the frontend deployment.
- Iphone’s “repeated calls” setting is >= 2 calls from the same origin in 3min. Disabled this for DND and Sleep.
- Supercontest.
- Currently, compute is ELB/EC2. Considering moving to Lambda/APIGW. Or ECS/Fargate.
- The pricing for ELB is fine after the scoreticking change. It’s not the traffic that is the expensive piece (although that scales), it’s simply the $18/mo for the ALB.
- Did some planning. Order the remaining tickets, gates, and do-togethers.
- Updated banner.
- Genericized banner (without extension) so that I can upload gifs or jpgs or pngs or whatever week-by-week format I want.
- Started designing the backend/frontend splitout.
SELECT CURRENT_TIME;
in psql to verify the week rollover is good after DST.
- Made it so the table-specific actions (ranks, highlightUserRow, setInterval for scoreticking, etc) only occur on (1) the matchups view when lines are committed and there’s an actual matchups table and (2) the allpicks view when picks are closed and there’s an actual allpicks table.
- Fixed some
/pick
functionality (mostly from jquery removal).
- Verified that the scoreticking changes were good on week rollover as well. If you leave a tab open before week rollover, it will keep fetching the old week after rollover (as intended).
- The metric filter for app container log alarms was triggering on a gunicorn log msg:
[WARNING] Exception managing chrome: Unable to discover proper chromedriver version in offline mode
. This doesn’t matter. Changed the filter to only trigger on my errors, ?ERROR ?CRITICAL ?EXCEPTION
.
- The
commitScores
lambda failed during redeploy, that’s fine (remember the logic to NOT commit scores is serverside, the lambda fires 24/7).
- The
commitLines
lambda failed. The function behaved normally (lines committed, email went out), but the lambda logs showed timeout. It defaults to 3s. My server doesn’t return that quickly for the commit-lines route (webscrapes, writes, emails, more). Increased the timeout for all 4 eventbridge lambdas appropriately.
-
- Private work.
- SES Trust/Safety team approved the production request. Likely the scathe yesterday. Still waiting on the tollfree registration of the pinpoint origination number, then will submit to take it out of the sandbox, then all clear on the cognito changes.
- Put the ducati on the tender.
- OpenAI devday keynote: https://www.youtube.com/watch?v=U9mJuUkhUzk. Release of GPT-4 Turbo. 128k context (300 pages). JSON compatibility. Trained on data up to Apr 23. Custom GTPs = biggest change. You and modify/focus/customize a GPT for a specific purpose, then rerelease that to the GPT store for others to use.
- Roasted 6lb pork butt to make carnitas burritos.
- Google invested another 2B in anthropic.
- Sandhill has some spacex. Selling at 86. 50k min check. Curious how Bret is handling/approving this (if at all?).
- Supercontest.
- Cloudwatch.
- Finished the logging change. Piped from app container on EC2 to cloudwatch. Added alarms. Removed sentry.
- First attempted with a cloudwatch agent config before finding the
awslogs
docker driver. Easy.
- CW can do a lot. I use for metrics/logs/alarms/dashboards. But you can also do RUM, traces, canaries, A/B, more.
- Seamless handling between EC2<->CW, from both a credential and a config perspective. Also datetime formatting (from your custom logs), how to manage the timezone when tailing in the CW UI, etc.
- Retention policies. Starting at 30d for now.
- You can query logs like:
filter @message like /commit-scores/ | sort @timestamp desc | limit 20
- The alarms work as follows: A custom metric scrapes the logs and counts errors. An alarm is created from that metric. The alarm sends violations to the SNS topic. The topic emails me.
- The log filter checks for ERROR, CRITICAL, EXCEPTION (case insensitive).
- Also added an alarm for any lambda errors (to email as well).
- Seeing a bit weird behavior with insufficient data for the metric filter on the logs. It counts regex matches, and default value IS value, but the metric is not reporting the 0 datapoints, so the alarm says insufficient data.
- Ended up finding this bug. It was that all timestamps were being pushed as the same timestamp (ie not updating with the log message, just repeating the same startup time).
- So the metric filter (and corresponding alarm) didn’t have any data. It thought it was all flattened into one datapoint.
- Not sure why it was doing this. Because it was freezing at the startup ts, I looked at the beginning of the logs. Gunicorn was printing slightly diff format.
- So I standardized everything (gunicorn, flask, my loggers, etc) to ignore ms and include tz.
- This fixed it. AWS showed properly parses datetimes.
- There are many trash requests from scrapers checking wordpress things and assets to steal info (
/wp-includes/*
, /uploads/
, /admin/
, etc).
- LB links.
- https://gitlab.com/bmahlstedt/supercontest/-/issues/222
- Looks clean.
-
- Private work.
- Ducati died in uws. 3 days, 50deg. Did not think that was cold enough (although the battery is close to EOL). Geico app, takes 1 min to submit request. Took a little over 2hrs for service provider to arrive. Originally 1hr but then delayed, so waited, locked outside, with bags. Overall door to door, 4 hours.
- Difference between SES and Pinpoint: SES is basic functionality. Pinpoint is the more comprehensive (SMS and other comms methods, marketing campaigns, etc). SNS requires pinpoint for the number origination.
- If everything finishes now, the 2 final candidates spots are to Alireza (highest rated, not already in) and Anish (most points on FIDE circuit, not already in).
- Manually updated clocks for DST. Just oven, coffee maker, and autofeeder. Everything else is smart. The latter is particularly important – the autofeeder does not shift, but the apex does, so the pump-off window misses the feed window by an hour and the fish don’t eat – you have to be home during DST shift to fix.
- Now been almost 2 weeks pending for the production access request in SES. Absolutely unacceptable on aws’ part. https://repost.aws/questions/QULBachhO7QkmUsrUEoeAcoA/ses-production-access-total-lack-of-response. Directly on the SES page: “The AWS Support team provides an initial response to your request within 24 hours.” Gave them some strong feedback on the support case.
- Bubbletip spawned while I was gone!
- Emptied trident waste. Garden and aquarium maintenance. For hydroponics, you can almost just multiply squirts by 5 to get mL (vs 20 v1 / 30 v2).
- Paid ortho.
- Supercontest. Started work on the cloudwatch ticket. Just adding
awslogs
to docker-compose
for a container running in EC2; pipes the app output to cw where you can alarm/dashboard/etc on the data.
-
- Private work.
- NYC marathon, watched central park finish.
- Amex. Got the 100k bonus. Still seeing the “please see phone for instructions” rejection at some apple pay terminals. No notifications/messages in app/site, not sure. Switched default back to csr.
- Nyt puzzles notified at 5pm ET (hour early) and broke (unavailable). Clearly an unhandled dst shift on their end. It also said Sunday was released (not Monday), so maybe they shifted day instead of hour.
- Warriors calendar is avail (direct from gsw) via stanza. Don’t love them getting access to see/edit/share/delete all my gcals.
- Destructuring, remember braces
[]
.
flask.jsonify
for Response
object.
- Supercontest.
- Confirmed DST shift was fine, eventbridge autoadjusted.
- Disabled WAF. Was only applying the ONE referer rule, and costs about half as much as ELB. Will make testing easier. Can re-enable later when I use it for more than one header.
- Finished the score ticking change, tested, deployed.
- https://gitlab.com/bmahlstedt/supercontest/-/issues/216
- Consolidated logo-url-construction across views (moved to
common
).
- Basic: Jquery elements
$()
are wrappers around dom elements, and have diff methods. To access the latter, just $().get(0)
(or no index for array of found elements). Had to clean up some of yesterday’s change for this. I’m so ready to wipe jquery from this old frontend.
- Confirmed prod app ticked. Matchups view and allpicks view. On both desktop and mobile. Doesn’t call in the background when phone is locked. Updates when you pull the tab back up.
- Made it so that results are updated and rerendered every minute too, not just the lines/scores rows at the top of the allpicks table. It automatically changes your pick colors and everything, even reordering the table by rank due to the score changes.
- Played with SNS/Pinpoint.
- Pinpoint is the manager for email/sms/etc (whereas SES/SNS are the tech capabilities).
- 10DLC = Ten Digit Long Code. Requires a company campaign.
- Created the origination number (in pinpoint) and submitted the tollfree registration. This is approved by carriers. Should take a few business days.
- Looked at a few options for flask integration with cognito.
-
- Private work.
- Dev on macbook today. Updated docker desktop, vscode, extensions.
- 1.5M, 300K down, 7%, 8k/mo.
- Remember that python functions can be injected as jinja globals because templates are rendered serverside. Not the same for javascript.
- GothamChess at Catch’N, signed book.
- Supercontest.
- Lots of messy hybrid jquery use (eg
classList.add
vs addClass
), cleaned up.
- Worked on the score ticking change. Basically done. Will test in the morning after lockdown, then deploy before sunday games.
-
- Private work.
- Sandhill is offering stripe at 31 one (I got ez at 28).
- More YT vs uBO: https://old.reddit.com/r/uBlockOrigin/comments/178yasm/youtube_antiadblock_and_ads_october_16_2023/
- Google Foobar – their secret hiring program. Basically if you google certain things (dev-related), on chrome, it will take you to a site with programming questions. An impromptu google interview. https://www.turing.com/kb/foobar-google-secret-hiring-technique
- Cancelled MUBI free trial.
- Planned route for NYC marathon sunday.
- The GCP version of terraform/cloudformation is Deployment Manager. For Azure it’s Resource Manager.
- Omnistrate basically converts your dockerfiles into cloud specs across the various platforms (like swagger, but for cloud resources instead of apis/bindings): https://www.omnistrate.com/.
- Omegle Bars 100
- Supercontest. Reached out about SES again, it’s been 1wk and production access has not been granted yet. A little more work on ticking scores.
-
- Private work.
- Reminder to have engineers be product-focused: https://engineercodex.substack.com/p/the-1-trait-of-the-most-valuable
- Great SRE reminders: https://sre.google/resources/practices-and-processes/twenty-years-of-sre-lessons-learned/
- Updated aligner schedule in app.
- Decision To Leave. Ok.
- Elon on JRE again.
- SBF convicted, 7 counts, fraud/conspiracy, max 110yrs.
- Supercontest. Started work on the change to tick scores.