Skip to content

Instantly share code, notes, and snippets.

@wal-f
wal-f / read-new-certs-services.sh
Last active April 18, 2024 06:37
A script for triggering service reload/restart in order to re-read updated certificates.
#!/bin/sh
run_base=/run
dir_reloads="$run_base/new-cert-reloads"
dir_restarts="$run_base/new-cert-restarts"
if [ $# -gt 0 ]; then
some=0
dir="$dir_reloads"
while [ $# -gt 0 ]; do
@wal-f
wal-f / access-to-elementor-form-submissions.php
Last active March 11, 2025 14:15
A method to provide full management of form submissions to less-privileged WP roles.
<?php
/*
Plugin Name: Elementor form submission access
Description: Promotes the Elementor Pro form submissions page to top level, and bypasses the excessive and inflexible restrictions on access.
Version: 2.0.0
Author: Some netizen
Update URI: do-not-auto-update
*/
namespace Elementor\Core\Admin\Menu;
@wal-f
wal-f / generate new password bookmarklet.js
Last active August 29, 2015 14:22 — forked from seabre/random_password.js
Password generator bookmarklet. Can set length (default's 20) and whether to include special characters, per use. Option to regen if not happy with output. Ideal for use with password managers.
javascript:(function(){var%20c=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3','4','5','6','7','8','9'],l=prompt('Password%20length?',20),p;if(!l)return;if(isNaN(l=parseInt(l))||l<1){alert('Invalid%20length');return}if(confirm('Special%20characters?'))Array.prototype.push.apply(c,['!','@','#','$','%','^','&','*','(',')','-','_','=','+','[','{',']','}','\\','|',';',':',"'",'"',',','<','.','>','/','?','`','~']);do{p='';while(p.length<l)p+=c[Math.floor(Math.random()*c.length)]}while(prompt('Copy%20and%20OK,%20or%20cancel%20for%20new%20one',p)==null)})();