Submitted by Dale on October 2, 2021 - 10:34am
The Python script below creates an RSS file from a git commit log. I'm using an expanded version of this script to generate the RSS feed for my notes.group42.ca site. It can be used as a starting template or demo of the GitPython and feedgen modules. Although the script is runnable the resulting RSS file is only useful as sample output.
To use the script the following modules must be installed:
Links
Submitted by Dale on September 11, 2021 - 10:49am
The rsync command is my go-to utility for sync'ing files from one folder to another, but it has issues with bidirectional synchronization (Search "rsync bidirectional sync" for explanations of the problem). Fortunately there are other options.
In the discussions I looked at a program named Unison was consistently suggested for bidirectional syncs. If you're a MacOS user like me, it can be installed with Homebrew. I gave it a try for synchronizing markdown files between two directories on the same computer. It's working perfectly.
Thoughts and observations on Unison:
Submitted by Dale on June 18, 2021 - 12:18pm
Have you written shell scripts or helper programs and wondered how to organize them? Or been frustrated with always updating path or aliases? Here are two tips that helped me.
- Create a /bin or /script directory in your home directory and add it to your path. Use it for your custom scripts and other executables you want to treat as shell commands.
- Use Symlinks (symbolic link files) for scripts or binaries that won't go directly into the bin directory. For example, scripts or binaries that are part of a repository or project structure.
While these may seem obvious, it took a tip from a colleague before I organized this way. I've never looked back. Read on for more details
Submitted by Dale on June 6, 2021 - 11:28am
Submitted by Dale on November 11, 2020 - 11:09am
Checklvst, https://checkvist.com, is a web-based list editor (I like its keyboard-driven user experience). Given some of my Ansible playbooks generate to-do lists and Checklvst has an API, I wondered how hard integration could be?
Submitted by Dale on October 19, 2020 - 9:13pm
After using Ansible as a personal DevOps tool for a couple of months, here are some impressions.
Context
- Outside of work (web development) I look after six Drupal 7 and WordPress sites on shared hosting
- My local development is done on a MacBook using apache (with some dabbling in Lando/Docker). I've done some wildcarding with dnsmasq and vhosts to streamline local dev site configuration. CMS code is in git repos.
- My Ansible work is a personal project and I'm the only stakeholder
- I learned Ansible doing this work
Submitted by Dale on October 1, 2020 - 1:17pm
Ansible variables are evaluated each time they're used. This means the following playbook vars declaration will always return the current time where ever it's used in the playbook!:
vars:
timestamp: "{{ lookup('pipe', 'date +%Y-%m-%d-%H%M') }}"
This is not the desired situation if the timestamp is used as part of a filename. For example: filename:
"backup-{{timestamp}}.sql"
.
Fortunately, there's an easy solution.
Submitted by Dale on September 21, 2020 - 11:55am
Ansible is an open source IT automation tool. I tend to describe it as a task-runner with a host database (which Ansible calls the inventory). A big selling point is no agent software is needed on managed remote hosts. Details at the Ansible website: https://www.ansible.com/use-cases
tl;dr: If you're just beginning with Ansible this might help: https://github.com/dale42/ansible-starter
Submitted by group42prime on June 23, 2017 - 1:57pm
I'm experimenting with Drupal 8 and some its new features like migration and configuration management. A reset script is a convenient timesaver and many people have shared their techniques for doing so. Having benefited from other's generosity I wanted to return the favour by sharing my current work-in-progress.
This script:
Submitted by Dale on May 8, 2017 - 9:24am
H5P is an open source platform-independent authoring and display system for interactive content. Presentations, quizzes, and other interactive content can be created and displayed using building blocks known as H5P content types (different from Drupal content types). Once a piece of content is created it's easily exported to another H5P system. The development environment is open and well documented, allowing the creation of custom H5P content types.
Pages