Skip to content

Instantly share code, notes, and snippets.

@enGMzizo
enGMzizo / html_entity_decode.js
Last active January 14, 2023 10:25
html_entity_decode in nodejs / javascript
const entities = require('./text_entities')
const html_entity_decode = (text) =>
text.replace(
/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-f]{1,6});/gi,
(t) => (entities[t] && entities[t].characters) || t
);
console.log(
html_entity_decode(
@enGMzizo
enGMzizo / install-rabbitmq.sh
Created March 19, 2019 16:40 — forked from yetanotherchris/install-rabbitmq.sh
RabbitMQ on Docker with admin UI
# AWS specific install of Docker
sudo yum update -y
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
# exit the SSH session, login again
# Docker
docker run -d --hostname my-rabbit --name some-rabbit -p 4369:4369 -p 5671:5671 -p 5672:5672 -p 15672:15672 rabbitmq