Skip to content

Instantly share code, notes, and snippets.

Avatar

Bob Brown gurubobnz

  • Turboweb Ltd
  • Dunedin New Zealand
View GitHub Profile
View check-db.sh
#!/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
@gurubobnz
gurubobnz / file.js
Created Nov 23, 2017
Get responsive breakpoint in Bootstrap 4 Beta
View file.js
// 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"));
View gist:69b977846fff56eaefb8
### 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: