Skip to content

Instantly share code, notes, and snippets.

View rwclarke's full-sized avatar

Ryan Clarke rwclarke

  • Collective Software Inc
  • Ottawa, ON
View GitHub Profile
@rwclarke
rwclarke / imageController.js
Last active October 30, 2018 20:23
Sails js v0.10 Uploading image to Cloudinary (Image Management)
var cloudinary = require('cloudinary');
cloudinary.config({
cloud_name: '',
api_key: '',
api_secret: ''
});
module.exports = {
@rwclarke
rwclarke / honeywell-barcode-label.js
Last active November 20, 2023 13:00
Automate Honeywell barcode label printing with Node.js
const net = require('net');
const client = new net.Socket();
const IP_ADDRESS = "your-honeywell-ip-address";
const PORT = 9100;
/*
Intermec Printer Language (IPL) exported from Bartender
File > Printer Code Template
*/
export default defineEventHandler((event) => {
if (process.env.NODE_ENV === 'production' && event.req.headers['x-forwarded-proto'] !== 'https') {
sendRedirect(event, `https://${event.req.headers['host']}${event.req.url}`)
}
})