Nginx catch-all config for http:// and https://Catch-all for Port 80 (http://) server { listen 80 default_server; server_name _; return 404; } Catch-all for Port 443 (https://) First generate a self signed cert: openssl req -nodes -x509 -newkey rsa:4096 -keyout self_key.pem -out self_...1 min read·shrwn.com.npNov 28, 2023
Talk session on WASM: Into WASM the easy wayWasm, wasm outside the web, wasmer, wasmtime1 min read·shrwn.com.npJun 14, 2023
Cloudflare R2 - Generating Presigned URLSince, cloudflare R2 is compatible with S3 API, we can simply use boto3 to work with R2 as wll import logging import boto3 from botocore.exceptions import ClientError from botocore.client import Config def create_presigned_url(bucket_name, object_...1 min read·shrwn.com.npJul 15, 2022
SSL with certbot on nginx/apache on Ubuntu ServerFirst Thing first sudo add-apt-repository ppa:certbot/certbot sudo apt-get update On Nginx Server sudo apt-get install python3-certbot-nginx sudo certbot --nginx On Apache Server sudo apt-get install python3-certbot-apache sudo certbot --apache Note ...1 min read·shrwn.com.npApr 25, 2022
Fernet Encryption in PythonWe will be using python cryptography library install cryptography library using pip install cryptography from cryptography.fernet import Fernet KEY = "" # Fernet compatible key or; # you can generate key using Fernet.generate_key() CIP...1 min read·shrwn.com.npMar 16, 2022