Right way to mount Samba on Debian and Ubuntu

I was trying to mount Samba with following commands: sudo apt-get update sudo apt-get install cifs-utils mkdir -p /mnt/smbshare sudo mount.cifs //192.168.0.200 /mnt/smbshare -o username=admin,password=1234 Then I create a folder myshare under the samba server and run: sudo mount.cifs //192.168.0.200/myshare /mn…

Simulate streaming API with FastAPI

151 , , Leave a Comment
The server code import asyncio import uvicorn from fastapi import FastAPI from fastapi.responses import StreamingResponse app = FastAPI() async def fake_text_streaming(): for i in range(1000): yield b"Fake text #" + str(i).encode() + b"\n" await asyncio.sleep(1) @app.post("/") @app…

Crab Hunting in Abu Dhabi: Places and Time

As the capital of the United Arab Emirates, Abu Dhabi has a unique geographical environment, with a large number of islands and rich seawater resources. These resources provide a large amount of aquatic products, including a huge number of crabs. So, how do we enjoy crabbing in Abu Dhabi? When and where can we …

Java Image base64 to Spring Boot MultipartFile

Java code: package com.awaimai; import cn.hutool.core.lang.Assert; import lombok.extern.slf4j.Slf4j; import org.apache.tika.mime.MimeTypeException; import org.apache.tika.mime.MimeTypes; import org.springframework.mock.web.MockMultipartFile; import org.springframework.web.multipart.MultipartFile; import java.ut…

Complete Guide: Sending Emails via AWS SES using SMTP

95 , , , Leave a Comment
While I started to send email via AWS SES, it took me a long time to config it to make it working. So I wrote it down once I success doing it. Here are the important poinits: Verified identities Create SMTP credentials Send email with smtplib Raise ticket to AWS (default the SMTP is in sandbox, you can only sen…
Next Page »