Put these in /etc/ufw/applications.d and use them like this:
sudo ufw allow from 192.168.1.0/24 to any app lms
sudo ufw allow from 192.168.1.0/24 to any app barrier- What ports does Synergy use? - symless.com
Put these in /etc/ufw/applications.d and use them like this:
sudo ufw allow from 192.168.1.0/24 to any app lms
sudo ufw allow from 192.168.1.0/24 to any app barrier| #!/usr/bin/env python3 | |
| ## | |
| ## watchme.py - monitor *.py files or a given path and re-run 'python <path>' | |
| ## | |
| ## Author: Kevin Ernst | |
| ## Date: 4 February 2026 | |
| ## License: Apache License Version 2.0 | |
| ## (https://github.com/gorakhargosh/watchdog/blob/master/LICENSE) | |
| ## Homepage: https://gist.github.com/ernstki/759383313185aae343bc87b989c44241 | |
| ## |
| #!/usr/bin/env perl | |
| ## | |
| ## Unwrap Outlook "safelinks" URLs passed on stdin or as arguments | |
| ## | |
| ## Author: Kevin Ernst <ernstki@mail.uc.edu> | |
| ## Date: 20 December 2024; updated 6 December 2025 | |
| ## License: ISC or WTFPL, at your option | |
| ## Homepage: https://gist.github.com/ernstki/c1408d1f938276f36b77047a4835a3de | |
| ## Bugs: Won't handle quoted printable mails or links broken across lines | |
| ## |
elementary OS's Contractor service uses standard Linux .desktop files (spec) with a .contract extension to provide context (secondary-click) menu entries for specific MIME types. System-wide apps put these in /usr/share/contractor, whatever the Flatpak version of that is, and you can create your own in ~/.local/share/contractor. Below are some examples.
If you want a specific Contractor action to apply to all filetypes, including device special files, directories, whatever, you can exploit the ! (exclusion) operator in the MimeType key, like this:
MimeType=!nothing;Original question: "Catch an entire function with grep" on Stack Overflow
It is possible to use (GNU) grep to do multiline matching[^fn1], but you're
probably making more work for yourself that way, because sed can do basically
everything grep can plus make replacements.
Using grep -zoP to do multiline matching is fundamentally the same trick as
what's proposed below: turning your file into one long string, separated by
| import sys | |
| import socket | |
| import logging | |
| logging.getLogger().setLevel(logging.DEBUG) | |
| port = None | |
| startport = 8000 | |
| MAXTRIES = 10 |
| #!/usr/bin/env python3 | |
| ## | |
| ## flatpak-orphans.py - lists orphaned Flatpak data in ~/.var/app | |
| ## | |
| ## Author: Kevin Ernst <ernstki -at- mail.uc.edu> | |
| ## Date: 16 October 2025 | |
| ## License: MPL 2.0 | |
| ## Homepage: https://gist.github.com/ernstki/f3e279e8a050c2df94e9fcfd69d67c2f | |
| ## | |
| ## Originally based on `main.py` from Flatsweep by giantpinkrobots[1], but |
| #!/usr/bin/env python3 | |
| ## | |
| ## Convert LDAP’s “number of 100-nanosecond intervals since January 1, 1601 | |
| ## (UTC)” timestamps to human-readable dates, in the local timezone. See | |
| ## reference [1] for more details. | |
| ## | |
| ## Does not use f-strings, so should work in any old Python 3. | |
| ## | |
| ## Author: Kevin Ernst <ernstki -at- mail.uc.edu> | |
| ## Date: 13 Oct 2025 |
| #!/usr/bin/bash | |
| HASHALG=sha256 | |
| files=() | |
| args=(-$HASHALG) | |
| while (( $# )); do | |
| case $1 in | |
| -*) | |
| for arg in "${args[@]}"; do | |
| if [[ $1 == $arg ]]; then |
| #!/usr/bin/env perl | |
| ## | |
| ## Print where a Perl 5 library was included from | |
| ## | |
| ## Author: Symkat | |
| ## Source: http://www.symkat.com/find-a-perl-modules-path | |
| ## License: Distributed under the same terms as Perl itself | |
| ## <https://perldoc.perl.org/perlartistic> | |
| ## | |
| use warnings; |