Skip to content

Instantly share code, notes, and snippets.

@zavod
Created April 9, 2019 13:01
Show Gist options
  • Save zavod/a8265e4ee4eec077ecb30dc770f31e85 to your computer and use it in GitHub Desktop.
Save zavod/a8265e4ee4eec077ecb30dc770f31e85 to your computer and use it in GitHub Desktop.
alp
@zavod
Copy link
Author

zavod commented Mar 18, 2020

@zavod
Copy link
Author

zavod commented Apr 4, 2020

brew find path

brew --prefix qt

@zavod
Copy link
Author

zavod commented May 13, 2020

@zavod
Copy link
Author

zavod commented Dec 26, 2020

MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.
2020-12-26 05:42:07,663 ERROR Exception inside application: MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.

solution

redis-cli
config set stop-writes-on-bgsave-error no

restart

macOS (brew): brew services restart redis.
Linux: sudo service redis restart / sudo systemctl restart redis
Windows: Windows + R -> Type services.msc, Enter -> Search for Redis then click on restart.

@zavod
Copy link
Author

zavod commented Jun 15, 2021

Find process

grep -iR "smartsreda" /etc

@zavod
Copy link
Author

zavod commented Aug 25, 2021

display permissions of files and date

ls -l

@zavod
Copy link
Author

zavod commented Aug 26, 2021

memory usage by process

ps -o pid,user,%mem,command ax | sort -b -k3 -r

@zavod
Copy link
Author

zavod commented Aug 27, 2021

cpu usage by process

ps -o pid,user,%cpu,command ax | sort -b -k3 -r

@zavod
Copy link
Author

zavod commented Dec 20, 2021

add second ssh-key

cat id_rsa_one.pub >> authorized_keys

replace key

cat id_rsa_one.pub > authorized_keys

add second ssh-key to bitbucket

eval ssh-agent -s
ssh-add ~/.ssh/id_rsa_new

@zavodIT
Copy link

zavodIT commented Feb 22, 2023

Redis

set key

SET key1 "Hello"

get key value

get key1

del key

DEL key1

STREAM

add to stream

XADD mystream * name Sara surname OConnor

read from stream

XREAD COUNT 1 STREAMS mystream 3

del from stream

XTRIM mystream MAXLEN 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment