Update your tsconfig.json
or jsconfig.json
"compilerOptions": {
...
"baseUrl": ".",
"paths": {
"@alias": ["components"],
const amqp = require('amqplib') | |
const connect = async () => { | |
try { | |
const connection = await amqp.connect('amqp://localhost:5672') | |
const channel = await connection.createChannel() | |
const result = await channel.assertQueue('jobs') | |
channel.consume('jobs', (message) => { |
Fail2Ban prevents linux server from brute force ssh attacks. It bans the IP Address from where multiple failed login attemps are made withing short duration of time.
fail2ban reads /var/log/auth.log
file to gether all the IP Addresses which have made
failed login attemps to the server. Based on this data fail2ban creates a ban list.
$ ifconfig -a
ens00: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::20c:29ff:feb8:214e prefixlen 64 scopeid 0x20<link>
ens01: flags=4163 mtu 1500
/** | |
* This script will traverse your filesystem and convert all | |
* Images to desired format. | |
* | |
* REQUIRED PARAMETERS | |
* 1. Source directory path. | |
* (This is the path from where images will be converted) | |
* 2. Output format. 'default = .jpg' | |
**/ |
const crypto = require('crypto') | |
const express = require('express') | |
const bodyParser = require('body-parser') | |
const app = express() | |
// To include rawBody in req parameter | |
app.use(bodyParser.json({ | |
verify: (req, res, buf) => { | |
req.rawBody = buf |