raynix 筆記

raynix 筆記

  • Home
  • WordPress Hosting
  • Side Quests
Illustration of a bird flying.
  • How to Serve QR Images from Memory with Django

    TL; DR: I used SpooledTemporaryFile with FileResponse to server generated QR images directly from memory, no disk IO involved. Please see my code sample with notes: 🙂

    March 29, 2023
    Opensource
    Django, Python
  • Django DB Migration Job with ArgoCD

    A Job in Kubernetes is a one-off and immutable task to be carried out during deployment. But what if a job needs to run for each deployment? A new job with the same name can’t be deployed on top of the existing one, given it in completed or failed state. Since Kubernetes 1.23, A TTL(Time…

    March 28, 2023
    Systems Admin
    ArgoCD, Django, kubernetes
  • Caching in Python with Redis + @Decorator

    TL;DR: Here’s a simple Python decorator I wrote which can cache function results with Redis. Prerequisites The Python Decorator What’s a decorator in Python? Here’s a very easy-to-understand explanation just for the question. Below is my code of the decorator with notes: Done 🙂

    March 19, 2023
    Opensource, Python & Frameworks
    Python, redis
  • How to Query in MongoDB and Group by Date

    TL;DR: Here’s a quick example to query MongoDB documents created this year(2023) and group them by date, ie. how many my_doc were created today, yesterday, the day before yesterday, etc. The following statement works in a MongoDB client such as mongosh. Then here’s an equivalent example to do it with MongoEngine in Python: Since I…

    March 13, 2023
    Opensource, Systems Admin
    MongoDB
  • New Recipes Learned!

    Some after thoughts: 🙂

    January 31, 2023
    Geek at Cook
    Cooking, Japanese Curry, Spaghetti
  • A Free Unlimited Wordle Spinoff Running in Telegram

    It’s been a while and this game I built is quite stable now. A few things about this game(I called it word squad): Feel free to join https://t.me/+nGN2rDrGBJExY2U1 for a spin or use the QR below: UPDATE: 6-letter games are now open, user /game6 to start one! 🙂

    January 23, 2023
    Games!
    Telegram, Wordle
  • Cloud SQL MySQL: Best Password is No Password

    Security for web applications has come a long way. In the case of database passwords, there is a lot of approaches to keep them safe: But isn’t it the best if there’s no need for a password at all? With IAM authentication for Cloud SQL, the password can be avoided after all. Here’s how to…

    January 12, 2023
    Systems Admin
    GCP, kubernetes, mysql
  • Fixed an A2 Error on ASUS Rampage V Extreme

    I have been a bit obsessed with PCs since my parents bought me my first PC, a 386DX with 4MB of memory, almost 30 years ago. Recently one of my friend was selling his crypto mining rig, and I bought the essential parts to start building a new server: I bought a new fan for…

    December 23, 2022
    Hardwares
    ASUS, Fedora
←Previous Page
1 … 7 8 9 10 11 … 109
Next Page→
  • Eric Lin’s Blog
  • Eddie Wang’s Blog at WP
  • GoalKeeper’s Blog

raynix 筆記

Just another WordPress blog

  • Facebook
  • Twitter
  • Instagram

Proudly powered by WordPress