https://github.com/zyedidia/micro/blob/master/runtime/help/defaultkeys.md https://github.com/zyedidia/micro/blob/master/runtime/help/commands.md https://github.com/zyedidia/micro/blob/master/runtime/help/keybindings.md
Ctrl+E to open command panel
from fastapi import Request, Depends, HTTPException, Response | |
from fastapi.responses import RedirectResponse | |
# This must be randomly generated | |
RANDON_SESSION_ID = "iskksioskassyidd" | |
# This must be a lookup on user database | |
USER_CORRECT = ("admin", "admin") | |
# This must be Redis, Memcached, SQLite, KV, etc... |
When unsing docker compose you can have a problem with the order of dependent linked containers
The solution is to start a script which tries to access a service and waits until it gets ready before loading your program
#!/usr/bin/env python | |
""" | |
Very simple HTTP server in python (Updated for Python 3.7) | |
Usage: | |
./dummy-web-server.py -h | |
./dummy-web-server.py -l localhost -p 8000 | |
Send a GET request: |
import atexit | |
import sys | |
def main(f): | |
if f.__module__ == "__main__": | |
atexit.register(f) | |
sys.modules['main'] = main # noqa |
color-link default "#ebdbb2,#1d2021" | |
color-link comment "#928374,#1d2021" | |
color-link symbol "#d79921,#1d2021" | |
color-link constant "#d3869b,#1d2021" | |
color-link constant.string "#b8bb26,#1d2021" | |
color-link constant.string.char "#b8bb26,#1d2021" | |
color-link identifier "#8ec07c,#1d2021" | |
color-link statement "#fb4934,#1d2021" | |
color-link preproc "#fb4934,235" | |
color-link type "#fb4934,#1d2021" |
""" | |
sudo systemcrl start sendmail | |
""" | |
import smtplib | |
from dynaconf import settings | |
def get_email_server(): | |
"""Creates an instance of email server. |
{ | |
"workbench.startupEditor": "newUntitledFile", | |
"editor.fontSize": 14, | |
"editor.lineHeight": 1.8, | |
"javascript.suggest.autoImports": true, | |
"javascript.updateImportsOnFileMove.enabled": "always", | |
"editor.rulers": [80, 120], | |
"extensions.ignoreRecommendations": true, | |
"typescript.tsserver.log": "off", | |
"files.associations": { |
import curses | |
import os | |
def main(win): | |
win.nodelay(True) | |
key = "" | |
win.clear() | |
win.addstr("Detected key:") |