This file contains 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
<?php | |
// composer require nikic/php-parser | |
require 'vendor/autoload.php'; | |
use PhpParser\{Error, Node, NodeTraverser, NodeVisitorAbstract, ParserFactory, PhpVersion}; | |
class NoReturnMethodsVisitor extends NodeVisitorAbstract { | |
private array $noReturnMethods = []; |
This file contains 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 | |
# You will need the swaks package installed, or some other way of sending the email if required | |
# You will also need to find out what parameters you need to set to send email to yourself using swaks | |
function check_db() { | |
return 1 | |
# Example for MySQL - mysqladmin ping returns 0 if OK, 1 if not | |
USER=user | |
PASSWORD=user |
This file contains 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
// Based on https://stackoverflow.com/a/37141090/4354249 (credit https://stackoverflow.com/users/4354249/farside) | |
// Bootstrap 4 beta has changed the classes - they use d-*-none instead of hidden-*-up. | |
function getResponsiveBreakpoint() { | |
var envs = ["xs", "sm", "md", "lg", "xl"]; | |
var env = ""; | |
var $el = $("<div>"); | |
$el.appendTo($("body")); |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am gurubobnz on github. | |
* I am gurubob (https://keybase.io/gurubob) on keybase. | |
* I have a public key whose fingerprint is DF92 517D 9765 77AB 62DF 7548 E7E5 3803 C585 EEA5 | |
To claim this, I am signing this object: |