@e11bits@fosstodon.org
@e11bits@fosstodon.org avatar

e11bits

@e11bits@fosstodon.org

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

bmispelon, to random
@bmispelon@mastodon.social avatar

I published a new article on my blog: How to do search and replace with https://blog.bmispelon.rocks/articles/2024/2024-06-03-git-search-and-replace.html

e11bits,
@e11bits@fosstodon.org avatar

@bmispelon Nice, didn't know git could grep! Besides 'grep' and 'git grep' I would throw the "silver searcher" aka ag into the mix for blazingly fast code search from the command line (or from within #emacs of course 😉).

https://github.com/ggreer/the_silver_searcher

e11bits,
@e11bits@fosstodon.org avatar

@holgerschurig What package are you using with rg in #emacs?

e11bits, to emacs
@e11bits@fosstodon.org avatar

I rediscovered #emacs abbreviations after watching this video by Protesilaos Stavrou. It shows how you can define abbrevs in code and even use interactive functions with them. It also gave me the idea to see, if having some personal abbrevs can be useful. Like having meemail, merepo, memastodon and so forth. So typing merepo will be replaced by https://github.com/e11bits while typing. https://protesilaos.com/codelog/2024-02-03-emacs-abbrev-mode/

adamchainz, to django
@adamchainz@fosstodon.org avatar

✍️ New post on my new package django-harlequin.

🦆 This package provides a small launcher command for Harlequin, the Terminal-based SQL IDE by Ted Conbeer.

💽 Try it out and let me know what you think!

#Django #SQL

https://adamj.eu/tech/2024/05/07/django-harlequin/

e11bits,
@e11bits@fosstodon.org avatar

@adamchainz Didn't know about harlequin and it's great to have a shortcut from #Django, when tinkering with it. Only thing was that the django-harlequin package does not have harlequin itself as a dependency? In the end harlequin seems not to be my thing. The 90s norton commander vibe and especially the key bindings. And installing harlequin pulls in 29 packages with ~400MB by itself (10 x django), among them numpy, pyarrow. In my case a bit much for the occasional SQL queries I do.

e11bits,
@e11bits@fosstodon.org avatar

@adamchainz For my own use I just modified the django-harlequin package to not use harlequin, but 🥁 #emacs 😆 . It works quite well for sqlite with emacs sqlite-mode and should work for postgresql with pgmacs as well.

https://github.com/emarsden/pgmacs

ghickman, to django
@ghickman@mastodon.social avatar

What are folks using for linting and/or formatting templates these days?

e11bits,
@e11bits@fosstodon.org avatar

@ghickman Nice, I could see myself using this as a pre-commit.

@danjac How good is the formatting in your experience? Because the docs say: "Formatting is a beta tool."

https://www.djlint.com/docs/integrations/

webology, to random
@webology@mastodon.social avatar

🎒 Everyone struggles with Django's static files: https://micro.webology.dev/2024/04/30/everyone-struggles-with.html

e11bits,
@e11bits@fosstodon.org avatar

@webology Using the last couple of days I asked myself what the difference is between the assets and static folder? And I wasn't the first. So assets hosts files that can/must be processed and static contains files that are used as is. For I think it is more obvious what the purpose of those two directories are by naming them static/src and static/public as suggested by @josh.

e11bits, to rust
@e11bits@fosstodon.org avatar

Want to change a file with structured data from json, yaml or toml to any of those formats? E.g. a config file from toml to yaml?

I think one of the easiest way to do this is using the tool convfmt.

If you have installed, installing convfmt is just as quick as:

cargo install convfmt

After that the transformation from toml to yaml is just this:

convfmt -f toml -t yaml < hugo.toml > hugo.yaml

Helps if you start from an example project with an hugo.toml config.

e11bits,
@e11bits@fosstodon.org avatar

@mykhaylo I had #rust installed already, so this was ok. The #emacs integration with jet through the jet emacs packages looks great. But jet does not seem to support toml? I have to admit I have never heard of edn?

e11bits,
@e11bits@fosstodon.org avatar

@mykhaylo I bet 😄

simon, to random
@simon@simonwillison.net avatar

Any macOS users ever hit that bug where sometimes activating exposé (or whatever that's called these days) freezes your screen such that only the mouse pointer can move but you can't interact with anything?

Any fixes? I find I sometimes have to hard-reboot

e11bits,
@e11bits@fosstodon.org avatar

@simon macbook hooked to an external monitor? Haven't been using a macbook for a long time now, but I faintly remember something like this:
No reboot, but still annoying:

  • Disconnect external monitor
  • Close MacBook and let it sleep
  • Open MacBook - now everything work again (monitor can be connected as well)

taken from
https://apple.stackexchange.com/questions/356327/mission-control-freezes-restarting-dock-doesnt-help

e11bits, to GNOME
@e11bits@fosstodon.org avatar

I tried the tiling window manager forge with #gnome . As much as I can see the value of having a twm, the forge keybindings seem alien to me coming from #emacs, where I use ACE window movement (and the great AVY). Like with ACE I just would like to press a hotkey and select a number for the window I want to focus. Not to move a focus hint cursor around with <Super> + hlkj. This would work for me in #emacs and #gnome. Some suggestions for another twm like that, which works with #gnome?

e11bits, to linux
@e11bits@fosstodon.org avatar

What's great about #linux? It has your back! Imagine your bread and butter notebook dies on you and the only thing that you can get a hold of here and now in that emergency situation is that 10 year old computer. Installation of a current(!) distro just works and after restoring the backup you're ready to go again. Not as fast as you're used too, but also not as bad as you think. And it keeps you afloat unitl a replacement arrives. Try that with some mac/win.

e11bits, to emacs
@e11bits@fosstodon.org avatar

I love that the first chapter of the #gnus #emacs documentation is "Don't Panic". In some regard it is a hitchhiker's guide through the cyberspace. 👽👾

e11bits, to django
@e11bits@fosstodon.org avatar

After the PR of ticket #35171 got merged I cleaned my workdir. But before removing all test images, I put them in a video. 😁

#Django

The video shows the "congratulation" page, that appears after a successful Django installation in many different languages.

e11bits, to django
@e11bits@fosstodon.org avatar

Yeah! #Django

e11bits, to django
@e11bits@fosstodon.org avatar

Today I was years old, when I found out that there is a bash script for tab-completion to django-admin and manage.py in the #Django repository. 🤦

I always wondered about that, but never really bothered to look anywhere for it. Now I added this to my #ansible scripts which setup my work environment, so I'll never forget.

https://github.com/django/django/blob/main/extras/django_bash_completion

The video shows a terminal on black background. The #Django manage.py command is typed in and the various completions after pressing the TAB key are shown.

e11bits, to django
@e11bits@fosstodon.org avatar

My second tiny PR got merged into #Django . The previous/next month buttons on the calendar widget at the admin site had some sort of glitch when hovering over them. Yes, tiny steps. Tiny steps.

https://github.com/django/django/commit/5a46f3fad7a1a0955d68e76a9b48daf7c4f7c1e0

The calendar widget of the #Django admin site (in dark mode). When the mouse is moving over the previous or next month button a glitch can be seen, like some bad "scroll up" animation.

e11bits, to django
@e11bits@fosstodon.org avatar

A smaller change for #Django , but a bigger change for me. My PR got accepted. Thanks to @sarahboyce @felixxm for your patience with me! 😆 🍾

e11bits, to python
@e11bits@fosstodon.org avatar

In the past I saw developers writing functions like func_a (just for illustration). Heavily nested and over a screen page long. They argued, that it had to be like that, because it would be better to have one and only one return statement at the end of the function. I'm in favor of something like func_b. It avoids nesting and exits as soon as the return value is known at the "cost" of multiple return statements. So "a", "b", "personal preference" or as always "it depends"? #python #programming

e11bits,
@e11bits@fosstodon.org avatar

@TomSwirly @danjac > Multiple returns are a proven source of bugs, particularly in long methods.

You got some reference, where this has been proven?

e11bits, to django
@e11bits@fosstodon.org avatar

With Heroku's free tier gone, has a clear favorite emerged for free #Django app hosting?

e11bits,
@e11bits@fosstodon.org avatar

@SebastianM6L @danjac 😄 Ok, so I read this as there is none and heroku monthly cost for one app is so low anyway, why bother?

e11bits,
@e11bits@fosstodon.org avatar

@SebastianM6L tbh I was mainly asking because the copy of #Django for Beginners that I had to learn #Django, used quite heavily the heroku free tier for deployment. Easy to use, free and the great feeling your app is running on the web. yeah! I guess I could buy a recent copy to see what's used in there now instead of heroku, but I thought I ask if there is a well known replacement. I myself use #dokku on a VM at a hoster for dabbling with apps and other stuff.

e11bits, to manjaro
@e11bits@fosstodon.org avatar

Until now I was a happy camper using #manjaro as my new workhorse. But this morning I tried to update the system and I got a lot of "Error: GPGME error: No data" and "invalid or corrupted database (PGP signature)" see https://dpaste.org/ahQWb.

e11bits,
@e11bits@fosstodon.org avatar

@danie10 Tried it again today and still the same issue. https://dpaste.org/Q7txn sudo pacman-key --refresh-keys did not compelete on the first run after an hour and took around 15min on the second, with 109 keys refreshed and ~250 errors. https://dpaste.org/5hF3X #manjaro #linux

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