GitHub - jesseduffield/lazydocker: The lazier way to manage everything docker The lazier way to manage everything docker. Contribute to jesseduffield/lazydocker development by creating an account on GitHub. GitHub · github.com I’ve been using this for a few weeks now and it’s fantastic. It’s reminds me of lazygit, it gives a nice quick interface into the things I need and it just works. Yes I can git status to see what changed, then diff the files, then commit hunks, but lazygit can do that in just a few keystrokes. lazydocker does this for docker. It gives me a nice view into whats running, what’s eating up disk space, and the networks I have. And if I see I have a bunch of exited containers, there is a bulk command righ there to clean them up. tldr on steroids
Thoughts
Link based "commentary" style posts, commenting on a web link
Publishing rhythm
Go is feeling more and more like something I could throw in my tool belt as a python dev. I really like that it’s garbage collected and has great error management. I am just not sure how to work it in without it being the main thing. The thing that is so cool is the ability to ship tiny pre-compiled binaries that just work, and the raw speed. these binaries just get up and working without any warm up. writing any cli in python I’m going to be using something like typer, and it takes half a second just to warm up, so even hello world cannot be faster than half a second.
Great example from Anthony showing how easy it is to practice building database orm models and playing with them in a repl. This is good practice even if you are in a big code base to be able to test and learn in a simplified code base that does not have a mountain of other code around atuh, permissions, security, and other complex things that come into real production code bases that might make it hard to focus on what you are trying to do. Note Anthony uses backref here, thats legacy, use back_populates on both parent and child.
External Link stackoverflow.com Today I came across some sqlalchemy models that created some relationships, some used some used. I was stumped why, I had never came accross before and I felt skill issues sinking in. backref is considered legacy # https://docs.sqlalchemy.org/en/14/orm/backref.html As stated in the sqlalchemy docs, backref is a legacy feature. Its shorthand to creating relationships between parent and child, but only adding it to the parent. While this is simpler it introduces some invisible magic.
2.5 Admins 180: Email 777 – 2.5 Admins 2.5admins.com How do you pronounce URL, is it U.R.L or Earle? I’m about 50/50, mostly when I am in a hurry I use Earle as it is one syllable and easy to say. I picked this up from MPJ of fun fun function, who took over Dev Tips. In this episide Jim uses Earle and they make fun of him. If it’s good enough for Jim, I am done with my 50/50 and I’m going all in on Earle. Episode also included a fastinating corrdinated attack that used Ars Technica profile photos communicate directions for the next attack via query parameters in the image url.
This really makes me want to try Dolphin Mixtral with ollama now. It looks very impressive from this video. The ability to keep adding features before becoming confused is though with a lot of these llms. Being chat based, this is not a co pilot replacement. I was really hoping for an in line co pilot like tool that I can run locally. I have not used co pilot yet, but I have had great luck with codeium.
Thor is just straight up a great Human being! Getting a gaming company to tie power and progression with being nice is an incredible feat.
Great take on low code. I have definitely felt the pressure of being presented low code options, “look it does almost everything you need, and you can do it without code.” Granted there are tons of great low code environments that serve their markets well (things like zapier). As pointed out here when they fall short rather than being hard, it goes to nearly impossible. As Theo points out here many applications follow an 80/20 rule. 80% of the app is really easy to put together, and takes about 20% of the time, probably less. What no code does is it takes that 80% that is already easy, makes it even easier ( pitches it as faster whether or not that is true), and makes the last 20% of the project impossibly hard to create and maintain, so you just should have picked a tool that had the capability of doing the whole thing from the start anyways.
I’ve heard prime say just give it the one eyed fighting kirby so many times, and execute it few times, and there is no way to find it online, so this will be the link that I will come to, when I need to remember what @theprimeagen means when he says Give it the one eyed fighting kirby. So what is this? # This is a vim substitute comand to replace text in the buffer. the one eyed fighting kirby is a regex capture group to capture everything between matches, and assign it a value to place back in after the match. substitute in a nutshell, More examples # Here is a contrived example of text. Now for some reason I want to switch all of the words here and there. I can do that with three capture groups, \1 is here, \2 is everything between, \3 is there. Just give it the one eyed fighting kirby ~Prime still struggling # I thought this explaination from phind was good and more verbose than mine. describe this vim substitute regex:%s/(here)(.)(there)/\3\2\1 ANSWER | PHIND V9 MODEL The given Vim substitute regex:%s/(here)(.)(there)/\3\2\1 performs the following operation: %s initiates the substitute command. The percent sign % indicates that the operation should be performed across the entir…
Java - ArchWiki wiki.archlinux.org Today I learned that arch has a helper script to set the version of java.
GitHub - charmbracelet/mods: AI on the command line AI on the command line. Contribute to charmbracelet/mods development by creating an account on GitHub. GitHub · github.com This is a pretty sweet interface into llms. I used it a bit with my son tonight while he was asking me for datapack ideas. You can continue the conversation with a You can pass it some data
GitHub - charmbracelet/mods: AI on the command line AI on the command line. Contribute to charmbracelet/mods development by creating an account on GitHub. GitHub · github.com This is a pretty sweet interface into llms. I used it a bit with my son tonight while he was asking me for datapack ideas. You can continue the conversation with a
Gridfinity The modular, open-source grid storage system. Gridfinity · gridfinity.xyz I am starting to build out some custom tool holders for my tool box, and using gridfinity. This is a super handy reference guide for spec’ing out the bases.
Read a Range of Data - LIMIT and OFFSET - SQLModel SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness. sqlmodel.tiangolo.com Today I was running some sqlmodel queries through the sqlalchemy orm. Admittedly I’ve not done enough orm queries before, and I’ve done quite a bit of raw sql. I was trying to get objects from two separate models that had relationships setup. It is incredibly slow, and gives me the following warning. What I learned from the SQLModel docs is that you should give it a join to correct this and go much faster.
Template Designer Documentation — Jinja Documentation (3.1.x) jinja.palletsprojects.com html code generated by my jinja templates generally look half garbage because of indents and whitespace all over the place. I just learned about these pesky Whitespace Control characters that can get rid of the whitespace added from templating. You can also strip whitespace in templates by hand. If you add a minus sign (-) to the start or end of a block (e.g. a For tag), a comment, or a variable expression, the whitespaces before or after that block will be removed:
Intro - Minecraft Server on Docker (Java Edition) Documentation for Minecraft Server on Docker docker-minecraft-server.readthedocs.io I just learned that if you can exec into the container running minecraft with the itzg/minecraft container you can run to get command access to the server. You need to set the if you want to access rcon remotely, but if you have not already done this and have access to the server you can just run when you are in.
Theo’s response puts a lot of my feelings about unit testing into words. It’s crazy how cargo culty it becomes that the echo chamber of twitter can bring in beliefs that we think we believe, but have not experienced enough or put enough thought in to form our own opinion. This video made me think so much that it turned into it’s own blog post Thoughts on Unit Testing
Mastodon.py — Mastodon.py 2.2.2 documentation mastodonpy.readthedocs.io Mastadon.py is a python api client for mastadon that makes it easy to cross post to mastadon.
bunny.net - The Global Edge Platform that truly Hops Hop on bunny.net and speed up your web presence with the next-generation Content Delivery Service (CDN), Edge Storage, and Optimization Services at any scale. bunny.net · bunny.net bunny.net looks like an interesting cloudflare alternative.
IndieWebify.Me - a guide to getting you on the IndieWeb indiewebify.me This is a sick guided site to validate indieweb tags on your site. It makes it much easier than trying to do it yourself.
External Link stackoverflow.com After struggling to get dependencies inside of middleware I learned that you can make global dependencies at the app level. I used this to set the user on every single route of the application without needing Depend on getting the user on each route.
Handling Errors - FastAPI FastAPI framework, high performance, easy to learn, fast to code, ready for production fastapi.tiangolo.com This page shows how to customize your fastapi errors. I found this very useful to setup common templates so that I can return the same 404’s both programatically and by default, so it all looks the same to the end user.
logs with FastAPI and Uvicorn · Issue #1508 · fastapi/fastapi Hello, Thanks for FastAPI, easy to use in my Python projects! However, I have an issue with logs. In my Python project, I use: app = FastAPI() uvicorn.run(app, host="0.0.0.0", port=8000) And when... GitHub · github.com Setting an additional log handler to the uvicorn logger for access logs in fastapi was not straightforward, but This post was very helpful.
External Link stackoverflow.com Here is a full example from the post.
waylon walker (@_WaylonWalker) on X Bloggers where do you put your markdown? X (formerly Twitter) · twitter.com Most bloggers on my twitter blog right into a file that goes on git. I kinda expected to have more database folk. I have my blog in markdown on git and the editing experience is top notch. I can just find files edit them in MY EDITOR, push them and I got a post. I am running thoughts in a sqlite database with a fastapi backend, and holy crap the instant nature of posting feels so much better. Both sides have good points.
Show some equivalent list comprehensions in filter examples · Issue #1068 · pallets/jinja I'm willing to write a pull-request for this, but I just want to see what people think before I write it. So the issue is this. I'm very familiar with python. I'm new to Jinja2. Often I find myself... GitHub · github.com I often want to reach for non existing list comprehensions in jinja 2, Here are a few nice equivalents.
External Link vi.stackexchange.com I fixed my missing macro recording indicator that I lost and was never quite sure why. (because I forgot that I set cmdheight=0).
GitHub - DataDog/ddqa: Datadog's QA manager for releases of GitHub repositories Datadog's QA manager for releases of GitHub repositories - DataDog/ddqa GitHub · github.com DataDog ddqa is building out a textual app and deploying it with pyapp. They have CI setup to fully build and cross compile their textual tui into github releases that you can just download from their releases page. This is something I am looking at for markata. This would be pretty sweet to be able to make it just work on places like windows. It would also be interesting to try to build a full desktop app with pyapp.
Full list of imagemagick color names.
Adam Wathan (@adamwathan) on X Hear me out. X (formerly Twitter) · twitter.com I’m going to give this trick a shot on my sites, and see how I like it. Down in the comments @adamwathan goes on to say. Basically every layout overflow bug ever boils down to some flex or grid child needing min-width: 0 😄 Oh and @ryanflorence also says in the comments. I … do this.
External Link tushar.lol Nice message by @tusharsadhwani. Write it down. You had to dig deeper than face value at something. Write it down. You had to combine multiple pages of docs. Write it down. Someting was simply not obvious to you at first and it took someone else to give you that ah ha moment. Write it down. You had a small discovery that had a marginal impact on your day. Write it down. A blog does not have to be a Blog, it can be small meaningful posts. There are absolutely no rules. If you think you are going to end up with too many posts, that is a solvable problem, make a search, curate your favorite posts, make multiple feeds. At the end of the day. Write it down. This post itself is a thought, the smallest component to my blogging strategy. Write it down.
Path Operation Advanced Configuration - FastAPI FastAPI framework, high performance, easy to learn, fast to code, ready for production fastapi.tiangolo.com From the Docs # trailing slash # I’ve had better luck just routing both naked and trailing slash routes in fastapi. I’ve had api’s deployed as a subroute to a site rather than a subdomain, and the automatic redirect betweens them tended to always get messed up. This is pretty easy fix for the pain is causes just give vim a yyp, and if you don’t want deuplicates in your docs, ignore one. favicon.ico # Now you do not need to deploy favicons to your api in any way, it is nice to have it in your browser tab, but more importantly to me I hate having console errors that are meaningless, this gives the browser something to automatically grab and not log errors.
Protect API docs behind authentication? · Issue #364 · fastapi/fastapi Basic Question Does FastAPI provide a method for implementing authentication middleware or similar on the docs themselves (e.g. to protect access to /docs and /redoc)? Additional context My company... GitHub · github.com You can protect your fastapi docs behind auth so that not only can certain roles not run certain routes, but they cannot even see the docs at all. This way no one that shouldn’t be poking around can even discover routes they shouldn’t be using. Here is the soluteion provided by @kennylajara
Cancel subscriptions Cancel subscriptions immediately or at the end of the subscription period with proration options, invoice handling, and automatic cancellation after failed payment attempts. stripe.com This is a handy guide to cancelling stripe subscriptions. You can even inverse it by flipping to and re activate the subscription.
External Link stripe.com You can find your customers next billing date through the stripe api by using. and passing in customer, customer_details, subscription, or schedule. Within the invoice, you can find the next_payment_attempt as a epoch.
Search Use the search APIs to look up and retrieve objects in your Stripe data. Using search is a faster alternative to paginating through all resources. stripe.com Stripe has it’s own query language for querying data. I’m just getting into using it and it seems pretty good so far. I needed to lookup the price for products. I was able to find prices for my product using the python api as shown below.
stripe-keys-and-ids.tsv tsv Stripe has so many keys and ids this is a very helpful list to decode what exactly an id is for.
Dang this is such a good message. I can’t exactly relate to being forced into the overworking situation that PirateSofware is talking about. I can relate to being conditioned to feeling a certain way and changing that is very difficult. I can also relate to not feeling like I am getting enough done in the day. Sometimes a bit of separation is good.
External Link stackoverflow.com Get those print colors exact
page-break-after CSS property - CSS | MDN The page-break-after CSS property adjusts page breaks after the current element. MDN Web Docs · developer.mozilla.org I’m working on something that might go to print, so I want the page breaks to happen somewhat in my control as the content author. As I do my writing I break my content up in to many short sections using h2, sometimes an h3. These are generally short sections that go together, should stay together, and typically are not too lengthy to cause a large white space in print. I found a way in css to only allow page breaks to happen on h2 and h3, and it turned out perfect, suck it WSIWIG editors
Go by Example gobyexample.com Fantastic resource for learning go. You work through small examples quickly, learning single concepts along the way.
How to Build a Website or App - Syntax #696 This podcast episode covers a wide range of topics related to building a website or web application from start to finish. syntax.fm Use good data or good fake data make it have some variation like long and short text Don’t use a database if you need one, static content is eaiser to manage end to end test, (does the site load page x) You DONT NEED all this complexity, you can deploy a site with HTML and CSS.
@willmcgugan) on X — Just a wee thing that came up today. I think this is kind of neat." loading="lazy"> Will McGugan ( @willmcgugan) on X Just a wee thing that came up today. I think this is kind of neat. X (formerly Twitter) · twitter.com Textual is so sick, Will just made a live markdown editor in the terminal!
Sebastián Ramírez (@tiangolo) on X Now @FastAPI has 65k+ GitHub stars! ✨🎉 Since today, FastAPI has a few more GitHub stars than Flask. 🤯 Now FastAPI is the second most starred Python web framework, right after Django. 🥈 X (formerly Twitter) · twitter.com Fastapi passes flask in GitHub stars!
Nice take by @t3dotgg. Some of the old patterns that go deep into webdev, MVC, separation of concerns, REST, are things we are told to believe on day one, thrown so many things, no mental bandwidth, or experience to form our own opinions we must take them as fact. Rarely do we take these facts and revisit them with our new understandings years later.
DoomponyLewis 🦄 (@DoomponyLewis) on X @wtravishubbard Management is abhorrent to me X (formerly Twitter) · twitter.com Today I learned the meaning of abhorrent abhorrent ăb-hôr′ənt, -hŏr′- adjective Disgusting, loathsome, or repellent. Feeling repugnance or loathing.
Heroicons Beautiful hand-crafted SVG icons, by the makers of Tailwind CSS. Heroicons · heroicons.com heroicons is a really nice set of many of the basic icons that you will need for building nice ui’s. They have a really nice copy as svg or jsx button, so that you can just yank it and paste it on your page without any extra packages or installation.
Uptime Kuma A self-hosted monitoring tool uptime.kuma.pet Uptime kuma is a fantastic self hosted monitoring tool. One docker run command and you are up and running. Once you are in you have full control over checking status of urls, frequency, allowed timeouts, and a HUGE list of notification providers I deployed it in my homelab today.
kv - Command | Vault | HashiCorp Developer The "kv" command groups subcommands for interacting with Vault's key/value secret engine. kv - Command | Vault | HashiCorp Developer · developer.hashicorp.com hashi vault lets you manage secrets right from your cli.
GitHub - johanhaleby/kubetail: Bash script to tail Kubernetes logs from multiple pods at the same time Bash script to tail Kubernetes logs from multiple pods at the same time - johanhaleby/kubetail GitHub · github.com Kubetail is a pretty sick bash script that allows you to tail logs for multiple pods in one stream. Very handy when you have more than one replica running. Now with kubetail I can tail all the logs for every shot-wayl-one pod in the shot namespace.