1
0
Fork 0

Adding upstream version 1.9.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 16:57:44 +01:00
parent 2bf0435a35
commit 031879240c
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
356 changed files with 26924 additions and 0 deletions

View file

@ -0,0 +1 @@
SADD fooset alligator ant bear bee bird camel cat cheetah chicken chimpanzee cow crocodile deer dog dolphin duck eagle elephant fish fly fox frog giraffe goat goldfish hamster hippopotamus horse kangaroo kitten lion lobster monkey octopus owl panda pig puppy rabbit rat scorpion seal shark sheep snail snake spider squirrel tiger turtle wolf zebra

3
scripts/add_hash.txt Normal file
View file

@ -0,0 +1,3 @@
HMSET hash1 Tolerant intolerant Decent indecent Discreet indiscreet Excusable inexcusable
HMSET hash2 Behave misbehave Interpret misinterpret Lead mislead Trust mistrust Likely unlikely Able unable Fortunate unfortunate Forgiving unforgiving
HMSET hash3 Entity nonentity Conformist nonconformist Payment nonpayment Sense nonsense

3
scripts/add_lists.txt Normal file
View file

@ -0,0 +1,3 @@
LPUSH list:animals alligator ant bear bee bird camel cat cheetah chicken chimpanzee cow crocodile deer dog dolphin duck eagle elephant fish fly fox frog giraffe goat goldfish hamster hippopotamus horse kangaroo kitten lion lobster monkey octopus owl panda pig puppy rabbit rat scorpion seal shark sheep snail snake spider squirrel tiger turtle wolf zebra
LPUSH list:buildings "airport" "apartment building" "bank" "barber shop" "book store" "bowling alley" "bus stop" "church" "convenience store" "department store" "fire department" "gas station" "hospital" "house" "library" "movie theater" "museum" "office building" "post office" "restaurant" "school" "mall" "supermarket" "train station"
LPUSH list:restaurant bill breakfast check cup dessert dinner dressing drink fork hamburger knife lunch menu napkin order salt spoon water coffee tea

View file

@ -0,0 +1,52 @@
ZADD myzset 28693 alligator
ZADD myzset 29596 ant
ZADD myzset 11320 bear
ZADD myzset 28872 bee
ZADD myzset 26656 bird
ZADD myzset 708 camel
ZADD myzset 31829 cat
ZADD myzset 7424 cheetah
ZADD myzset 30668 chicken
ZADD myzset 154 chimpanzee
ZADD myzset 24709 cow
ZADD myzset 25916 crocodile
ZADD myzset 6888 deer
ZADD myzset 32034 dog
ZADD myzset 15528 dolphin
ZADD myzset 667 duck
ZADD myzset 202 eagle
ZADD myzset 19551 elephant
ZADD myzset 32231 fish
ZADD myzset 4002 fly
ZADD myzset 18679 fox
ZADD myzset 10147 frog
ZADD myzset 28405 giraffe
ZADD myzset 15557 goat
ZADD myzset 2062 goldfish
ZADD myzset 25018 hamster
ZADD myzset 19888 hippopotamus
ZADD myzset 24984 horse
ZADD myzset 16088 kangaroo
ZADD myzset 7907 kitten
ZADD myzset 9814 lion
ZADD myzset 32194 lobster
ZADD myzset 8036 monkey
ZADD myzset 19483 octopus
ZADD myzset 9398 owl
ZADD myzset 24987 panda
ZADD myzset 28153 pig
ZADD myzset 28829 puppy
ZADD myzset 9709 rabbit
ZADD myzset 14184 rat
ZADD myzset 11208 scorpion
ZADD myzset 11385 seal
ZADD myzset 1900 shark
ZADD myzset 6890 sheep
ZADD myzset 6897 snail
ZADD myzset 7659 snake
ZADD myzset 22338 spider
ZADD myzset 3676 squirrel
ZADD myzset 1490 tiger
ZADD myzset 31275 turtle
ZADD myzset 8113 wolf
ZADD myzset 1601 zebra

1
scripts/check_renders.sh Executable file
View file

@ -0,0 +1 @@
rg -vw render_int iredis/data/command_syntax.csv | rg -vw render_simple_string | rg -wv render_bulk_string | rg -vw render_list | rg -vw render_members | rg -vw render_bulk_string_decode | rg -vw render_string_or_int | rg -wv render_list_or_string

View file

@ -0,0 +1,2 @@
slaveof localhost 6379
port 6479

View file

@ -0,0 +1,7 @@
from iredis.utils import command_syntax
from iredis.style import STYLE
from iredis.commands import commands_summary
from prompt_toolkit import print_formatted_text
for command, info in commands_summary.items():
print_formatted_text(command_syntax(command, info), style=STYLE)

View file

@ -0,0 +1,50 @@
#!python3
"""
Download all Reids commands from https://redis.io/commands.
Output to csv format.
"""
import sys
import csv
from lxml import etree
import requests
stdout_writer = csv.writer(sys.stdout)
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
eprint("Download https://redis.io/commands page...")
page = requests.get("https://redis.io/commands").text
eprint("Download finished!")
eprint("Start prase page...")
html = etree.HTML(page)
commands = html.xpath("//div[@class='container']/ul/li")
stdout_writer.writerow(["Group", "Command", "Args", "Summary", "Redis.io link"])
command_rows = []
# parse page
for command in commands:
group = command.attrib["data-group"]
command_name = command.xpath("./a/span[@class='command']/text()")[0].strip()
command_args = command.xpath(
"./a/span[@class='command']/span[@class='args']/text()"
)[0].strip()
command_summary = command.xpath("./a/span[@class='summary']/text()")[0].strip()
command_link = "https://redis.io" + command.xpath("./a/@href")[0].strip()
command_rows.append(
[
group,
command_name,
" ".join(command_args.split()),
command_summary,
command_link,
]
)
# write to stdout
for row in sorted(command_rows):
stdout_writer.writerow(row)
eprint("Down.")

4
scripts/multi_del.txt Normal file
View file

@ -0,0 +1,4 @@
DEL key-001
DEL key-002
DEL key-003
DEL key-004

4
scripts/redis.conf Normal file
View file

@ -0,0 +1,4 @@
port 7379
unixsocket /tmp/redis.sock
unixsocketperm 775
aclfile /tmp/redis.acl

View file

@ -0,0 +1,6 @@
import redis
client = redis.StrictRedis(db=3)
for i in range(100000):
client.set(f"key-{i}", "hello world")

20
scripts/tcp-proxy.sh Executable file
View file

@ -0,0 +1,20 @@
#!/bin/sh -e
# Display TCP packets
# code from:
# https://notes.tweakblogs.net/blog/7955/using-netcat-to-build-a-simple-tcp-proxy-in-linux.html
if [ $# != 3 ]
then
echo "usage: $0 <src-port> <dst-host> <dst-port>"
exit 0
fi
TMP=`mktemp -d`
BACK=$TMP/pipe.back
SENT=$TMP/pipe.sent
RCVD=$TMP/pipe.rcvd
trap 'rm -rf "$TMP"' EXIT
mkfifo -m 0600 "$BACK" "$SENT" "$RCVD"
sed 's/^/ => /' <"$SENT" &
sed 's/^/<= /' <"$RCVD" &
nc -l 127.0.0.1 "$1" <"$BACK" | tee "$SENT" | nc "$2" "$3" | tee "$RCVD" >"$BACK"

View file

@ -0,0 +1 @@
wget https://raw.githubusercontent.com/antirez/redis-doc/master/commands.json -O commands.json