@kfdm@social.tsun.co avatar

kfdm

@kfdm@social.tsun.co

Software developer living in Fukuoka #japan.
Mostly builds in #python and #django.
Interested in #quantifiedself and #iot

This profile is from a federated server and may be incomplete. Browse more on the original instance.

webology, to random
@webology@mastodon.social avatar
kfdm,
@kfdm@social.tsun.co avatar

@webology Oh, a django app for that isn't a bad idea 🤔
I had thought about making an nginx snippet I could include across my configs to make it easier, but it's much harder to write there 😆
In the past I've sometimes used open-resty to write a few checks in lua though

kfdm,
@kfdm@social.tsun.co avatar

@webology Reading through the Django source code for something else today, found this setting ( DISALLOWED_USER_AGENTS ) and example

https://github.com/django/django/blob/53719d6b5b745dd99b1ab9315afb242f706ebbf1/django/conf/global_settings.py#L241-L251

Works with django.middleware.common.CommonMiddleware by default

ernie, to linux
@ernie@writing.exchange avatar

This one’s for the normies who just want Github to give them a goddamn exe file: The case for making self-hosted apps work more like, say, Flatpak.

https://tedium.co/2024/04/15/self-hosting-docker-flatpak/

new @tedium

kfdm,
@kfdm@social.tsun.co avatar

@ernie @tedium I don't think I've seen Cosmos before. I know there are some like https://yunohost.org/ or https://umbrel.com/ that are trying to do similar things, and things like Home Assistant's Green/Yellow paired up with their Addons gets us some of the way.
I've also considered what a "flatpak" of self hosting would be though the initial setup of Cosmo/YunoHost/Umbrel/etc is still probably more challenging than most would want to attempt 🤔

kfdm,
@kfdm@social.tsun.co avatar

@ernie @tedium Aye, the first step is the hardest 😆
Perhaps the 'flatpak' of self hosting would be like a 'DockerDesktop' type app. Installing it would install and configure Docker (directly on Linux, or via a VM for Windows/Mac) and then ensure the management UI was running.

Though one catch is that a UI for installing apps is 'easy', but we should also make it easy for users to backup their data (I say this being fully aware that I'm not always good at backups myself and I'm a developer 😅)

kfdm, to django
@kfdm@social.tsun.co avatar

Working with #django and #vuejs I'm using custom tokens so that VueJS and Django tokens don't conflict, but I also have a need to escape to ensure users can't get my VueJS delimiters anywhere.
Is there a place I can hook in to add my own, additional escape code 🤔, or am I doomed to have to add {{value|myescape}} everywhere a value is used 😢

kfdm,
@kfdm@social.tsun.co avatar

@bmispelon Thanks! Might not be, but gives me something to check. My challenge is that if I have user submittable data (like a ModelForm) and somewhere In a template I use {{ instance.some_field }}, even a failed model submission populates a copy of instance.some_field with the value that can sometimes result in a VueJS directive being placed in unexpected places. (Hard to explain in a post so I might write up a blog post as part of my research)

simontatham, to random
@simontatham@hachyderm.io avatar

I just made a command-line typo: 'locat' in place of 'locate'.

Ubuntu's command-not-found package offered me 'lolcat' as a higher-ranked preference than what I actually intended.

The Internet has won.

kfdm,
@kfdm@social.tsun.co avatar

@simontatham I don’t have an ubuntu machine at the moment, but I’m guessing it’s this ?

https://github.com/busyloop/lolcat

Probably not useful ever, but it’s good to see people having fun from time to time XD

webology, to random
@webology@mastodon.social avatar

⬆️ The Upgrade Django project is a REVSYS project we launched ~3 years ago.

#Django #Python

https://micro.webology.dev/2024/04/04/the-upgrade-django.html

kfdm,
@kfdm@social.tsun.co avatar

@webology I feel like https://endoflife.date/django is a bit easier to read than https://upgradedjango.com/#supported-versions
The table and colors make it easier to understand at a glance.

Though I wish I knew about https://upgradedjango.com/4.2/ in the past. I spent a while trying to figure out that I needed CSRF_TRUSTED_ORIGINS in the past 😅

kfdm,
@kfdm@social.tsun.co avatar

@webology I can't quite put my finger on it, but when I'm reading a comparison, I feel like I want a more compact layout whereas https://upgradedjango.com/#supported-versions feels like there's a lot space between it all. Maybe that's why it feels a little off to me.

kfdm,
@kfdm@social.tsun.co avatar

@webology Tangentially related, when I first saw the domain name, I was reminded of the similarly named project on PyPi
https://pypi.org/project/django-upgrade/

simon, to random
@simon@simonwillison.net avatar

Do you have anything special setup as your default new browser window URL? What is it?

I've been getting a huge amount of value out of having my daily private GitHub issues thread (effectively a scratchpad notebook and daily todo list) as my default for new Firefox windows

kfdm,
@kfdm@social.tsun.co avatar

@webology @simon Oh, I quite like that idea! Is there a reason you bundled it as an extension instead of just being a regular page ?

kfdm,
@kfdm@social.tsun.co avatar

@webology @simon Does building it as an extension help with load/render speed ? Does it keep things in cache better ? I guess if you had some personal APIs it might make it easier to keep the credentials logged in or something

I quite like the idea of https://momentumdash.com but customized with my own queries, but thought an extension would be more annoying to maintain and less automatable to re-install on each update 🤔

drewdevault, to random
@drewdevault@fosstodon.org avatar

Me and my boy

kfdm,
@kfdm@social.tsun.co avatar

@drewdevault 猫の手も借りたい!

kfdm, to random Japanese
@kfdm@social.tsun.co avatar

Tonight's project is getting distracted and hacking together an #alfred workflow for #forgejo
Mostly hard coded and a prototype, but I'll see if I end up doing anything with it later.
#worklog

webology, to random
@webology@mastodon.social avatar

Having used FUSE with S3 way, way, way back, that certainly gives me the chills.

I have one Obsidian extension that can update a public or private gist from a document that works really. It works on any platform which is why this path feels doable. I don't have the JS/TS scripts yet to pull it off, but I suspect it can't be that hard.

video/mp4

kfdm,
@kfdm@social.tsun.co avatar

@webology When you get it figured out, please blog about it 😉
Even if I'm not using Obsidan right now, the directory of markdown files + frontmatter probably covers enough tooling that it will be useful to many 🙇

webology, to random
@webology@mastodon.social avatar

🎉 I posted for 29/30 days in a row on my micro blog. https://micro.webology.dev/archive/

I am not necessarily sold on the platform, but it did well enough (sans lack of image support) to get the job done.

My goal from here will be to port this back to my blog and to migrate my blog from static back to Django.

I'll probably do a write-up later or tomorrow on the rest of the wonderful @wigglework folks who also joined me for the last month.

kfdm,
@kfdm@social.tsun.co avatar

@webology I'm also tempted to move my blog from Hugo to a Django hosted blog where I can experiment more, but I keep over thinking things XD

I like writing markdown in a local text editor, but that doesn't work as easily if I'm on my iPad and want to save it in Git.

I've thought about trying https://github.com/andrewgodwin/yamdl or figuring out if there's some kind of 'common' blog API that I could implement 🤔

hynek, to random
@hynek@mastodon.social avatar

It would be harsh to say that requests is a pile of poorly-written attractive nuisances on top of urllib3. But, unfortunately, it wouldn’t be wrong.

Many diligent devs have spent countless work hours trying to unfuck the project over the years, but there’s only so much you can do when:

“After receiving our first security disclosure, I was told that Requests wasn't a serious project but instead one person's art project and thus we shouldn't fix the vulnerability.” https://hachyderm.io/@sigmavirus24/111986425127558764

kfdm,
@kfdm@social.tsun.co avatar

@hynek For those who may not have seen your previous comments, what do you typically recommend? Most of my projects typically use the equivalent of request.get/requests.post so I’ve typically not searched for anything else

webology, to random
@webology@mastodon.social avatar

The Django apps I actually use (rough cut): https://micro.webology.dev/2024/02/04/the-django-apps.html

kfdm,
@kfdm@social.tsun.co avatar

@webology @FunkyBob Interesting 🤔
I've been using https://github.com/python-social-auth/social-app-django for most of my projects, but I'll have to see how django-allauth compares. Thank you for the list. Always nice to be introduced to some other projects 😄

kfdm,
@kfdm@social.tsun.co avatar

@FunkyBob @webology I haven't had any particular issues with django-social-auth, though I know the maintainer has an open request (for a while) for more maintainers (though this is probably the same case for many projects)
https://github.com/python-social-auth/social-core/issues/539

TechConnectify, to random
@TechConnectify@mas.to avatar

I have been working an unhealthy amount the last two weeks on what I believe is my most complex video yet. It's a video I've been wanting to make for years about a subject I've always loved.

It's finally finished, rendered, and uploading now. Coming to a screen near you soon!

kfdm,
@kfdm@social.tsun.co avatar

@TechConnectify Having recently read a book about how CPUs work, your explanation of the score motor, and showing the paths of all the relays and connections reminded me a lot of how the CPU stepper works.
Thanks again for another great video

dansup, to random
@dansup@mastodon.social avatar

I’ve been using Sublime Text for almost a decade now and love it, but I started using vscode for pixelfed app development

I like the IDE and better autocomplete that vscode offers, but I can’t fathom switching php dev to it because I’m so stuck on Sublime and feel some form of attachment to it

It’s weird, I know, it’s probably cuz I’m getting older and stuck in my ways lol

kfdm,
@kfdm@social.tsun.co avatar

@dansup I feel you there, though I switched to VSCode a while back. At least with many languages prioritizing language server support, we’re in a pretty great spot with editors :D

evan, (edited ) to random
@evan@cosocial.ca avatar

Would you eat an omelet with chicken in it?

#EvanPoll #poll

kfdm,
@kfdm@social.tsun.co avatar

@evan In Japan, there's something called Oyakodon 親子丼 (parent-child rice bowl) which is chicken and egg on top of rice 😆
https://en.wikipedia.org/wiki/Oyakodon

simon, to random
@simon@simonwillison.net avatar

Introducing datasette-write-ui: a Datasette plugin for editing, inserting, and deleting rows

I've been working with @alexgarciaxyz to get Datasette Cloud ready for wider launch - we're announcing his first project on the brand new Datasette Cloud blog

https://www.datasette.cloud/blog/2023/datasette-write-ui/

kfdm,
@kfdm@social.tsun.co avatar

@simon Out of curiosity, is there a reason you don't use class based views like ListView or DetailView? Or is it because these pages are currently very simple?

kfdm,
@kfdm@social.tsun.co avatar

@simon That was a good read. Thank you for sharing! :)

dansup, to random
@dansup@mastodon.social avatar

I will be surprised if threads.net rolls out nodeinfo support, might have to manually track stats based on whatever stats they release publicly

kfdm,
@kfdm@social.tsun.co avatar

@dansup That's an interesting point. I guess a more corporate project would be wary of exposing numbers like that. I think we sometimes take for granted the data the existing fediverse projects provide 🤔

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • kavyap
  • DreamBathrooms
  • osvaldo12
  • magazineikmin
  • khanakhh
  • tacticalgear
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • ethstaker
  • Durango
  • normalnudes
  • provamag3
  • ngwrru68w68
  • InstantRegret
  • cubers
  • modclub
  • everett
  • thenastyranch
  • cisconetworking
  • Leos
  • GTA5RPClips
  • tester
  • vwfavf
  • anitta
  • JUstTest
  • All magazines