SPShrawan Poudelinshrwn.com.np·Nov 28, 2023 · 1 min readNginx 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_...00
SPShrawan Poudelinshrwn.com.np·Jun 14, 2023 · 1 min readTalk session on WASM: Into WASM the easy wayWebAssembly (wasm) Designed as a portable compilation target for programming languages Loading…00
SPShrawan Poudelinshrwn.com.np·Jul 15, 2022 · 1 min readCloudflare 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_...00
SPShrawan Poudelinshrwn.com.np·Apr 25, 2022 · 1 min readSSL 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 ...00
SPShrawan Poudelinshrwn.com.np·Mar 16, 2022 · 1 min readFernet 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...00