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
| #!/bin/bash | |
| # This script is designed to work only with recent bash implementations, not busybox/ash/dash etc... | |
| # BEWARE - THIS IS SYMLINKED TO FROM THE NETRIX REPO ON DGC'S DESKTOP | |
| # IF YOU EDIT IT THERE IT ALSO CHANGES THE MASTER ONE | |
| # @FIXME DGC 6-May-2022 | |
| # This script has a large issue, which I have failed to notice ( or to fix ) earlier. | |
| # It does a very bad job of labelling hourly/daily etc jobs with an 'execution time. | |
| # |
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
| # visit https://accounts.google.com/DisplayUnlockCaptcha and click to allow access | |
| # edit /etc/monit/monitrc to include the following | |
| set mailserver smtp.gmail.com port 587 | |
| username "[email protected]" password "whatever" | |
| using tlsv1 | |
| with timeout 30 seconds | |
| # run the following to validate access |
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
| #!/bin/bash | |
| # | |
| # Generate an SSHA password for .htpasswd files | |
| # | |
| # Output can be redirected (while asking for password on screen). | |
| # Password has to be entered twice. | |
| # | |
| # * https://www.nginx.com/resources/wiki/community/faq/#how-do-i-generate-an-htpasswd-file-without-having-apache-tools-installed | |
| # * https://nginx.org/en/docs/http/ngx_http_auth_basic_module.html#auth_basic_user_file | |
| # |
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
| <div class="btns"> | |
| <p>Write JavaScript (using jQuery is fine) so that clicking on any button will cause an alert to popup with the text of the button that was clicked.</p> | |
| <p>Make sure your solution is as efficient as possible even if there are a lot more <code>button.btn</code>'s added on the page. Do not use unnecessary event listeners.</p> | |
| <button class="btn">c</button> | |
| <button class="btn">l</button> | |
| <button class="btn">o</button> | |
| <button class="btn">s</button> | |
| <button class="btn">e</button> |
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
| /* :has-n-children([<|>|<=|>=]n) | |
| * requires Slick | |
| * selects elements with (less/more than (or equal to)) n elements as children | |
| * [2011-07-11] doesn't work yet (tested with 1.1.5) | |
| * [2016-01-24] works now (testet with 1.6); https://jsfiddle.net/ugLaexhc/2/ | |
| */ | |
| Slick.definePseudo('has-n-children', function(arg) { | |
| var childrenLen = this.children.length; | |
| var parsedArg = arg.match(/(<|>|<=|>=)?(\d+)/); |