Skip to content

Instantly share code, notes, and snippets.

View quantumwebco's full-sized avatar

Rusty quantumwebco

View GitHub Profile
@quantumwebco
quantumwebco / platform.js
Created September 10, 2022 13:13
Get platform and standalone mode
isInStandaloneMode() {
return (window.matchMedia("(display-mode: standalone)").matches) ||
(("standalone" in window.navigator) && (window.navigator.standalone));
}
isMac() {
return /(macintosh|macintel|macppc|mac68k|macos)/i.test(window.navigator.userAgent.toLowerCase());
}
isIos() {
return /iphone|ipad|ipod/i.test(window.navigator.userAgent.toLowerCase());
}
@quantumwebco
quantumwebco / generate-ssh-key.sh
Created March 31, 2020 16:05 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@quantumwebco
quantumwebco / mobile-friendly-bootstrap-modals-bottom-sheet.scss
Created September 19, 2019 10:45
A Sass snippet to make bootstrap modals more mobile friendly by turning them into a 'bottom sheet' on smaller screens
.modal {
display: flex;
align-items: flex-end;
&.fade {
.modal-dialog-bottom {
position: absolute;
bottom: 0;
transition: transform 0.4s;