Skip to content

Instantly share code, notes, and snippets.

@stracqan
stracqan / loopback-production-deploy
Last active May 4, 2018 23:03
StrongLoop Loopback Node.js Production Deploy Commands on Loopback AWS AMI
#######
## StrongLoop Loopback Node.js Production Deployment on Loopback AWS AMI
#######
#first install npm package
npm install -g strong-pm
#then install the service
#since I'm running loopback's AWS AMI, it's critical to use the --upstart=0.6 command
sudo slc pm-install --port 8701 --upstart=0.6
@stracqan
stracqan / usb-credit-card-reader.js
Last active October 28, 2023 14:14
Very simple jQuery implementation that reads card data from a USB Magnetic Strip Credit Card Reader.
/**
*
* Simple jQuery Script to parse credit card data
* that was collected via a USB Magnetic Stripe
* Credit Card Reader.
*
* To get this to work, focus your cursor (either
* programmatically or via a click, it's your choice) on an input field #credit-card-number
* and then with the card reader plugged in, swipe
* the card and it will take over from there