Skip to content

Instantly share code, notes, and snippets.

@jwelker110
jwelker110 / mouse.js
Created March 17, 2018 13:58 — forked from electricg/mouse.js
Mouse position relative to document and element
// Which HTML element is the target of the event
function mouseTarget(e) {
var targ;
if (!e) var e = window.event;
if (e.target) targ = e.target;
else if (e.srcElement) targ = e.srcElement;
if (targ.nodeType == 3) // defeat Safari bug
targ = targ.parentNode;
return targ;
}
@jwelker110
jwelker110 / mongo-autostart-osx.md
Created January 12, 2018 14:53 — forked from subfuzion/mongo-autostart-osx.md
mongo auto start on OS X

Install with Homebrew

brew install mongodb

Set up launchctl to auto start mongod

$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents

/usr/local/opt/mongodb/ is a symlink to /usr/local/Cellar/mongodb/x.y.z (e.g., 2.4.9)

Keybase proof

I hereby claim:

  • I am jwelker110 on github.
  • I am jwelker (https://keybase.io/jwelker) on keybase.
  • I have a public key whose fingerprint is CDB3 1A6F B00B 903D 2666 1E68 6223 6C73 9865 D80A

To claim this, I am signing this object: