This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| from inspect import getmembers, isclass | |
| from os import path | |
| from posixpath import abspath | |
| from schemas import settings | |
| base = settings.BaseSettings.schema() | |
| info = '' | |
| toc = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| 1. Launch Kafka: | |
| - $KAFKA_HOME/bin/zookeeper-server-start.sh $KAFKA_HOME/config/zookeeper.properties | |
| - $KAFKA_HOME/bin/kafka-server-start.sh $KAFKA_HOME/config/server.properties | |
| run via faust -A <filename> worker -l info | |
| 2. Faust library: | |
| faust.App.agent: - main processing actor in Faust App | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys,os | |
| import curses | |
| def draw_menu(stdscr): | |
| k = 0 | |
| cursor_x = 0 | |
| cursor_y = 0 | |
| # Clear and refresh the screen for a blank canvas | |
| stdscr.clear() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| setup: | |
| pip install requests | |
| pip install requests[socks] | |
| super helpful: | |
| - http://packetforger.wordpress.com/2013/08/27/pythons-requests-module-with-socks-support-requesocks/ | |
| - http://docs.python-requests.org/en/master/user/advanced/#proxies | |
| """ |