Skip to content

Instantly share code, notes, and snippets.

@mistercoffee66
mistercoffee66 / mobileUtils.js
Created September 8, 2017 19:17
quick n dirty user agent tests
const isMobile = () =>{
return ( navigator.userAgent.match(/Android/i) ||
navigator.userAgent.match(/BlackBerry/i) ||
navigator.userAgent.match(/iPhone/i) ||
navigator.userAgent.match(/iPad/i) ||
navigator.userAgent.match(/iPod/i) ||
navigator.userAgent.match(/iPhone|iPad|iPod/i) ||
navigator.userAgent.match(/IEMobile/i) )
}
@mistercoffee66
mistercoffee66 / .gitignore
Last active September 5, 2017 17:14
general purpose .gitignore for VS projects
#npm
node_modules/
bower_components/
#jetbrains
.idea/
#OS junk files
[Tt]humbs.db
*.DS_Store
var reggie = {
email: /^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i,
password: /^[a-z0-9]{4,25}$/i
},
valid = {
email: false,
password: false
},
data = {};