This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| ## | |
| # Show wireguard statistics with usernames assigned to their public keys | |
| # $> ./wg-show.py with no options will use | |
| # wg0_file="/etc/wireguard/wg0.conf" | |
| # wg_iface="wg0" | |
| # sg_to_timeout=300 seconds | |
| # | |
| # ./wg-show.py --help | |
| # usage: wg-show.py [-h] [--config CONFIG] [--interface INTERFACE] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @author knee-cola / https://github.com/knee-cola | |
| * Original file URL: https://gist.github.com/knee-cola/37875bc4359609b96c9f329cd2a68fa1 | |
| */ | |
| // This is a simple progressive image loader for Three.js | |
| // It enables the smaller image files to be loaded first, | |
| // before the big texture image is fully loaded. | |
| // | |
| // The images are loaded in the order they are passed |