dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2
  
    
      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
    
  
  
    
  | #! /bin/bash | |
| # | |
| # Copyright (c) 2020 Víctor Molina García | |
| # MIT License | |
| # | |
| # Script to install Python environments 2.6+ and 3.2+ using PyEnv | |
| # and the installation steps for OpenSSL 1.0.2 mostly based on the | |
| # information available in the following link: | |
| # http://www.linuxfromscratch.org/blfs/view/7.7/postlfs/openssl.html | |
| # | 
  
    
      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
    
  
  
    
  | from fastapi import FastAPI, Depends, Query | |
| from starlette.requests import Request | |
| from starlette.responses import JSONResponse | |
| import starlette.status | |
| from pydantic import BaseModel, validator | |
| import datetime | |
| from typing import List | |
| from dataclasses import dataclass, field | |
  
    
      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 os | |
| import asyncio | |
| import aiobotocore | |
| import io | |
| from PIL import Image | |
| AWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID'] | |
| AWS_SECRET_ACCESS_KEY = os.environ['AWS_SECRET_ACCESS_KEY'] | 
Based on RESTful API Design — Step By Step Guide
- Держать простым
 - Не забывать про методы
 - Использовать корректные статус-коды в ответах
 - Ресурсы как существительное, не глагол
 - Использовать множественное значение
 - Использовать пагинацию, а не выдавать всё разом
 - В коллекциях возвращать информацию о пагинации
 - Использовать квери-параметры для GET запросов, если нужно сузить выборку
 
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
  
    
      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
    
  
  
    
  | # dump all databases once every 24 hours | |
| 45 4 * * * root nice -n 19 su - postgres -c "pg_dumpall --clean" | gzip -9 > /var/local/backup/postgres/postgres_all.sql.gz | |
| # vacuum all databases every night (full vacuum on Sunday night, lazy vacuum every other night) | |
| 45 3 * * 0 root nice -n 19 su - postgres -c "vacuumdb --all --full --analyze" | |
| 45 3 * * 1-6 root nice -n 19 su - postgres -c "vacuumdb --all --analyze --quiet" | |
| # re-index all databases once a week | |
| 0 3 * * 0 root nice -n 19 su - postgres -c 'psql -t -c "select datname from pg_database order by datname;" | xargs -n 1 -I"{}" -- psql -U postgres {} -c "reindex database {};"' | 
  
    
      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
    
  
  
    
  | """ | |
| A perl Data.Dumper clone for Python | |
| Author: simon@log4think.com | |
| 2011-07-08 | |
| Copyright 2011 Jinyu LIU | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |