Skip to content

Instantly share code, notes, and snippets.

@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 = {};
@mistercoffee66
mistercoffee66 / jquery-dosomething-ES6.js
Last active November 6, 2019 16:03
ES6 module importing jQuery plugin
//jquery-dosomething-ES6.js
//after modification
//assumes jQuery is avail as global or via NPM etc
import jQuery from 'jquery'
export default function() {
+function($) {
var $this = $(this);
var newText = $this.data('text');