Video Link: Apache Kafka Crash Course | What is Kafka?
- Knowledge
- Node.JS Intermediate level
- Experience with designing distributed systems
- Tools
- Node.js: Download Node.JS
- Docker: Download Docker
- VsCode: Download VSCode
Video Link: Apache Kafka Crash Course | What is Kafka?
const TOKEN_SECRET="7bc78545b1a3923cc1e1e19523fd5c3f20b409509"; | |
const jwt = require("jsonwebtoken"); | |
const request = require("request"); | |
let usernam = "gtarun"; | |
let token = jwt.sign(username, TOKEN_SECRET, { expiresIn: '1800s' }); | |
// Make an HTTP POST request |
sudo apt-get install libapache2-mod-evasive | |
# edit Config | |
sudo nano /etc/apache2/mods-available/evasive.conf | |
sudo mkdir /var/log/mod_evasive | |
sudo chown :www-data /var/log/mod_evasive | |
sudo chmod 771 /var/log/mod_evasive | |
a2enmod evasive |
# Redis configuration file example. | |
# | |
# Note that in order to read the configuration file, Redis must be | |
# started with the file path as first argument: | |
# | |
# ./redis-server /path/to/redis.conf | |
# Note on units: when memory size is needed, it is possible to specify | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# |
FYI much quicker to set them all in one heroku config:set a=b c=d etc | |
If you prefer a manual review and you do have bash/zsh: | |
heroku config -s -a source-heroku-app > config.txt | |
Now review config.txt and remove any unwanted config lines | |
cat config.txt | tr '\n' ' ' | xargs heroku config:set -a target-heroku-app |
## | |
# You should look at the following URL's in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# http://wiki.nginx.org/Pitfalls | |
# http://wiki.nginx.org/QuickStart | |
# http://wiki.nginx.org/Configuration | |
# | |
# Generally, you will want to move this file somewhere, and start with a clean | |
# file but keep this around for reference. Or just disable in sites-enabled. | |
# |
http { | |
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m; | |
proxy_temp_path /var/tmp; | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
keepalive_timeout 65; | |
gzip on; | |
gzip_comp_level 6; |
swagger: "2.0" | |
info: | |
version: v1 | |
title: Outgrow Public API | |
host: api.outgrow.co | |
basePath: /api/v1 | |
schemes: | |
- https | |
- http | |
consumes: |