sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot
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 tqdm import trange | |
import argparse | |
import boto3 | |
parser = argparse.ArgumentParser(description="Migrate messages from SQS queues.") | |
parser.add_argument('--src', required=True, help='Name of the source queue.') | |
parser.add_argument('--dst', required=True, help='Name of the destination queue.') | |
parser.add_argument('--batches', help='Number of batches to process', default=1, type=int) | |
parser.add_argument('--batch-size', help='Number of messages in a batch', default=10, type=int) | |
args = parser.parse_args() |
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
""" Download all albums/tracks of all of your favorite artists on TIDAL. | |
# Usage | |
- Install dependency: `pip install -U tidal-dl` | |
- Create tidal-dl.ini with following content and then fill your username and password | |
``` | |
username = <username> | |
password = <password> |
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
{"lastUpload":"2021-05-25T00:08:16.901Z","extensionVersion":"v3.4.3"} |
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
########################################################## | |
# Use cases | |
# 1. Start an async function in __init__ | |
# 2. Start an endless (while loop) async function while current event loop is running | |
# 3. ... | |
# | |
# Limitations | |
# 1. Some libraries (eg. motor) cannot be executed using this method, because you can't control how event loop is retrieved. (See another method below) | |
# | |
# Usage: |
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 argparse | |
from app import app | |
def main(): | |
parser = argparse.ArgumentParser( | |
description='Sanic test server', | |
formatter_class=argparse.ArgumentDefaultsHelpFormatter | |
) |
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
# As of writing this, 4.11 kernel fails, 4.10.15 fails, 4.11rc8 seems to be working. Apply the graphics patches first. | |
# Install Intel Graphics Patch Firmwares (This should reboot your system): | |
bash -c "$(curl -fsSL http://bit.ly/IGFWL-install)" | |
# Update to 4.11.2 kernel. nvidia-375 compiles fine >=4.11.1 | |
cd /tmp | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11.2/linux-headers-4.11.2-041102_4.11.2-041102.201705201036_all.deb | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11.2/linux-headers-4.11.2-041102-generic_4.11.2-041102.201705201036_amd64.deb | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11.2/linux-image-4.11.2-041102-generic_4.11.2-041102.201705201036_amd64.deb |
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
program_NAME := myprogram | |
program_C_SRCS := $(wildcard *.c) | |
program_CXX_SRCS := $(wildcard *.cpp) | |
program_C_OBJS := ${program_C_SRCS:.c=.o} | |
program_CXX_OBJS := ${program_CXX_SRCS:.cpp=.o} | |
program_OBJS := $(program_C_OBJS) $(program_CXX_OBJS) | |
program_INCLUDE_DIRS := | |
program_LIBRARY_DIRS := | |
program_LIBRARIES := |