Bash: Auto-add User to Groups

I wrote a snippet at work today for the following scenario: we have an environment at work where websites are owned by separate users and groups. In order to modify files in the site directories, our usernames must belong to these groups. It’s a pain to manually add oneself to these groups, especially when new sites are being created all the time. This script runs through all the groups on the server following the standard pattern for our website users groups (using regex) and adds the user running the script to these groups. The script displays verbosely what groups are to be added and the user expressly gives permission prior to performing any actions.

Python: Grab Latest Plugin Version Number from WordPress API

This should be a useful snippet for anyone that needs to do a lookup for a WordPress plugin’s latest available version number. I will be using this snippet to create a function in a larger WordPress environment operations script I have been developing for work.