Skip to content

Instantly share code, notes, and snippets.

View thuvh's full-sized avatar
😀
hello world

Hoai-Thu Vuong thuvh

😀
hello world
View GitHub Profile
@thuvh
thuvh / redis_proxy_connection.py
Created March 13, 2024 02:45 — forked from Hanny2010/redis_proxy_connection.py
Connect to Redis server over Squid Proxy
import socket
from redis.client import Redis
from redis.connection import Connection, ConnectionPool
from redis._compat import iteritems
class ProxyConnection(Connection):
def __init__(self, host='localhost', port=6379, db=0, password=None,
socket_timeout=None, socket_connect_timeout=None,
socket_keepalive=False, socket_keepalive_options=None,
@thuvh
thuvh / demo
Created March 11, 2025 03:25
demo
hello world
@thuvh
thuvh / README.md
Created March 24, 2025 05:39
fix ceph metrics

metric l_rgw_pubsub_push_pending

in http, it's implemented here

with amqp

check function send

  • case ack_level == ack_level_t::None -> increase then decrease
  • case y, increase before line amqp::publish_with_confirm (L216), decrease after check rc < 0
  • case y false, increase before amqp::publish_with_confirm (L228), decrease after amqp::publish_with_confirm (???)
@thuvh
thuvh / README.md
Created September 18, 2025 09:52 — forked from theCalcaholic/README.md
Logseq advanced query for tasks table (including scheduled/deadline dates)

This is a logseq advanced query which fetches all your tasks, sorts them by (the earlier of) scheduled and deadline date if those are defined and then displays them in a table.

Here's how the query looks for the example tasks above:

image

@thuvh
thuvh / README.md
Last active December 19, 2025 09:22
bug-73663-remove-boto

Remove boto package

  • remove boto in requirements.txt
  • remove boto in setup.py
  • remove boto in test_bn.py
  • test_bn.py
    • L22 boto.s3.connection import S3Connection -> migrate
    • L48 boto.s3.tagging
    • L572 boto.s3.connection.OrdinaryCallingFormat
  • L584 boto.s3.connection.OrdinaryCallingFormat