Skip to content

Instantly share code, notes, and snippets.

View aptxx's full-sized avatar
🎯
Focusing

Kehan Pan aptxx

🎯
Focusing
View GitHub Profile
@aptxx
aptxx / ops_redis.sh
Created May 21, 2022 18:31
redis operations
# delete keys
redis-cli --scan --pattern users:* | xargs redis-cli unlink
# expire keys after 600 seconds
redis-cli --scan --pattern users:* | xargs -L1 -I{} redis-cli expire {} 600
@aptxx
aptxx / sudoer_to_root.sh
Created April 24, 2018 02:32
to root without root's password
sudo su -