Si ça intéresse du monde, j’ai appris hier soir qu’il existe une version open source et auto-hébergeable de Gist, l’outil de Github, ça s’appelle Drift. J’ai beaucoup utilisé Gist à une époque et je trouvais dommage d’être dépendante de Github, alors si comme moi d’autres personnes en auraient utilité, voici le lien.
#gist #git #drift #opensource #github
I sometimes just love #regex!
I am busy with testing for my next #MastoBot implementation, for a remindMe bot idea.
The main idea is to allow users to mention it and say `@botAccount 2 weeks 3 days 2 hours 5 minutes`, which would then in turn message them, reminding them of the post which they replied to with this comment.
Such functionality can sometimes be difficult, and regex gets its hate for speed, complexity and readibility. But this just works great in #Python for a problem like this.
Here is the #Gist of an early prototype and example for those interested!
https://gist.github.com/e-dreyer/ce0f5e8c51d6454f91901f78f9e04b77
#regex #mastobot #python #gist
I just found #MassCode free and #opensource code snippets manager for #developers. It helps you create and organize your own personal snippet collection and have quick access to it.
It doesn't have the online sharing capabilities of #Gist, obviously, but I like the idea. I've been meaning to create a library of design patterns for myself. Using #Gist is too public for sensitive information, and it isn't as accessible as a local implementation, although it does support versioning.
#masscode #opensource #developers #gist
@folkerschamel recently introduced me to product in #Python. At first, it was odd and weird, but it really makes nested loops more elegant.
Original post: https://mastodon.social/@folkerschamel/110820141813190538
Here is the #gist of a great example: https://gist.github.com/e-dreyer/81b5bc96c90926939ba8057109dfb202
The best solution is to proably make an ABC class of dict and then parse the JSON and throw your own exceptions.
I recently did something similar with the config files for my bots. I have a ConfigAccessor class, which reads a YAML file to a dict. What I found was, that if a user miss-configured their file, everything crashed due to missing keys etc.
So I made this class which handled it for me, and I just treat it like a normal dictionary. Here is the #gist
https://gist.github.com/e-dreyer/878d2e8de3686495cbd1fc001f2231f7
Final one, you just triggered my #Python itch. Copying missing keys between dicts.
This one, for example, I used with an #Octoprint plugin:
https://gist.github.com/e-dreyer/eb421026e66ed4ad92140803df95dbfe
I got it to work now. Seems because you need to use asyncio.run() you need to wrap al the functions with async, then have another function which you then call.
Will share the #gist once I clean it up.
I am busy messing around with #Python #async, for API consumption, but the API library isn't implemented with asyncio.
I can either fork the library and possibly switch its request object with an async version, but often we might not be able to do this and we need to work with blocking functions.
I struggled to get this working in my current code, so I tried it in another file and got it to work. There are still a few things I could change, allowing for more threads and using an executor, but here is the #gist
https://gist.github.com/e-dreyer/82196b2781b3ebc9429c8bb6607651ff
Better <sub> and <sup> tags. #HTML #CSS #code #snippet #gist
sup, sub {
position: relative;
vertical-align: middle;
font-size: 75%;
font-weight: normal;
}
sup {
bottom: 0.5em;
}
sub {
top: 0.5em;
}
https://gist.github.com/onsamyj/bb3a7894db5cb5e8f4e664ae1f1033e4
#html #css #code #snippet #gist
just sharing A little #Unity3D #Gist to adjust the pivot of a parent object in Unity by context menu in the hierarchy.
Hope it's useful for someone!
https://gist.github.com/havchr/3fcbee65a8c3a7fe1391708ddda7e7e0
Found this very handy script (and comment thread) to allow me to break free from paying #AWS about USD 0.18 a month for the past almost 2 years) for an errant #Glacier vault I had lying around with some 2,000+ archives in it. I was too lazy to do anything about it until this weekend. And thanks to AWS, you can’t effectively manage a Glacier’s vault from the web console. 🤷♂️ https://gist.github.com/veuncent/ac21ae8131f24d3971a621fac0d95be5 #python #gist
📢 Exciting news! Today, Zotiquest Games is showcasing! Check out my website at https://zotiquestgames.com for updates.
🌐 Migrating subsites and web SRDs from http://zeruhur.space to GIST's web SRD. Stay tuned! #ZotiquestGames #GIST
📧 Contact me: zotiquest.games@gmail.com.
RT @AntonioDePoli: 🔴📣 In #Senato abbiamo presentato il protocollo di intesa tra #ProLoco @UNPLI e #Gist Stampa Turistica, una sinergia positiva per valorizzare la tradizione culturale ed enogastronomica della nostra bellissima Italia. Guarda qui 👉 https://antoniodepoli.it/index.php/firma-del-protocollo-dintesa-tra-unpli-e-il-gruppo-italiano-stampa-turistica-gist/
#turismo #turismolento https://t.co/skPswnM4eB
🐦🔗: https://n.respublicae.eu/L_Cesa/status/1665725268575629315
#Senato #ProLoco #gist #Turismo #turismolento
#PSA: #GitHub #Gist embeds in vanilla #WordPress has stopped working. Here's how to get it back.
You used to be able to embed a GitHub Gist in a WordPress blog posting by pasting the URL of the Gist. This recently stopped working. The WordPress devs claim they haven't changed anything and this must be because GitHub was previously supporting oEmbed (https://oembed.com/) but has stopped. 1/?
The Stripe API doesn’t include a way to validate publishable and secret API keys.
Here’s a simple function you can use to do that:
https://codeberg.org/aral/gists/src/branch/main/validateStripeKey.md
#stripe #api #stripeapi #js #nodejs #web #dev #gist
SystemError typedef for Node.js (gist)
https://codeberg.org/aral/gists/src/branch/main/SystemError.md
Node.js doesn’t expose the SystemError class in any way. This JSDoc type definition works around this limitation.
#nodejs #codeberg #gist #jsdoc
#link: GitHub - thomiceli/opengist: Self-hosted pastebin powered by Git https://link.hostux.net/shaare/oQJY-g https://github.com/thomiceli/opengist #pastebin #git #gist #Selfhosted
#link #pastebin #Git #gist #selfhosted