All Articles
Ping / monitoring: Alternative to uptimerobot_com
- uptime kuma
^ that's a self-hosted alternative to Uptimerobot.
Handle configuration settings in custom Drupal modules and example of using the configuration API in Drupal
Handling configuration settings in custom modules involves using the Configuration API provided by Drupal. This API allows you to define, manage, and access configuration settings in a structured and consistent way. Here’s how I approach it and an example of using the Configuration API in Drupal 10/11:
Using the Configuration API
Keycloak: How to override the password reset emails
In order to override the text of the password reset emails in Keycloak, you want to do the following.
Make your own copy of the default themes. These can currently be found at: https://github.com/Halazv2/keycloak-theme/tree/master/themes/base/email
Then, make changes to the theme as appropriate. There are several themes: the login theme stores the styling of the login pages. But the email theme contains the wording of the emails.
An open letter to marvil07
Hello,
I'll write english - hope that's okay.
Me and several other people would like drupal's vote_up_down to be ported to drupal 10. It's not that difficult, it's been done, here is my branch: https://github.com/wasya-co/vote_up_down
Converting mbox to maildir
From Mellowhost blog.
mbox and maildir both are popularly used techniques to store mails. The simple way to understand the difference is, mbox uses a single directory to store all mails while maildir would utilize a directory structure to store mails. Most of the cases, advance mail receiving techniques IMAP over POP3 uses these sort of folder based concept to provide enhancement in mail organizing.
[FIXED]: drush The specified database connection is not defined: default
Fixing this took me years... I can't believe how long it took. The answers on stack overflow did not help.
The error was due to a mismatching php configuration for running in the shell ( /etc/php/8.1/cli/php.ini ) and in apache (/etc/php/8.1/apache2/php.ini ).
Specifically, I had to enable short tags for the shell:
short_open_tag = OnWith that, this particular error was fixed, and I was off to fixing the next error!
20250424 Scrum: Switch from consumption to production
...then, the current idea, from completely lacking motivation to work, is as follows. Instead of reading news, etc, and being generally unuseful, I will spend time *writing* news, or scrum updates, or 2d sketches, or whatever else that can be generated, rather than consumed.
[FIXED] ruby on rails :: LoadError: cannot load such file -- distribution
Specifically for the wco stack, gem 'iron_warbler' had to be included in that particular instance's (micros_*) Gemfile. Which is a bit disappointing since I wanted libraries to be decoupled - but hey, I'm not going to fix this right now. But please be aware: it may seem that there is a separation between libraries and some libraries (namely models and content) can be installed without the rest of the stack - but that's not the case. The whole stack must be installed.
Open-source antivirus
Check it out: https://www.clamav.net/
HTML class naming conventions, and id naming conventions
In HTML, classes should be lower-case with dashes:
<div class="class-name-1 another-class-name"> </div>
There are exceptions:
<div class="BookChapter" ></div>
However, ids should be camelCase or PascalCase (capitalized first letter):
<div id="thisDiv"></div><div id="anotherArray"></div>
What's a better name: tag1 or tag_1 ? Should it be tag-1 or tag_1 ?
Or the same question can be asked as: what's a better name: tag1 or tag-1? Depending on if underscores are disallowed, or dashes are disallowed.
While we are on the topic of dashes vs underscores, check out when to capitalize HTML classes, and when to keep ids in Pascal Case.
[FIXED]: An external drive not mounting on mac (fsck, not fdisk)
This happened to me recently... I may have unplugged an external 5Tb harddrive without ejecting it from mac os x 13, and it could not be mounted again. I plugged the harddrive into a windows machine, run "repair" there (whatever that means) and the data was perfectly readable. It's just that the disk would not mount on mac.
Stackoverflow to the rescue! The solution is:
sudo pkill -f fsck
Or actually
ps aux | grep fsck
[FIXED]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' when running mysql database in docker, for a ruby on rails application
Change
host: localhost
to
host: 127.0.0.1
in config/database.yml, to make the connection over TCP/IP rather than local socket.
You may also need to specify port 3306 explicitly.
How to run cron from docker
tl;dr: bind the cron definition file as a volume, and wire running it, as part of the image (in your Dockerfile).
Here is frmo a Stackoverflow answer:
Let's say you have a file hello-cron: