Skip to content

Instantly share code, notes, and snippets.

@gr8den
gr8den / mongo-logrotate
Last active May 31, 2022 12:17
MongoDB (v4.4) log rotation
# nano /etc/logrotate.d/mongodb
/var/log/mongodb/mongod.log {
rotate 7
daily
size 100M
missingok
create 0600 mongodb mongodb
delaycompress
compress
sharedscripts
@gr8den
gr8den / show-address.fif
Created October 23, 2019 17:49
Read (or generate) private key from file and print human-readable public key for creating new wallet
"TonUtil.fif" include
{ ."usage: " @' $0 type ." <your.pk>" cr
cr
."Read (or generate) private key from file and print human-readable public key for creating new wallet" cr
1 halt
} : usage
$# 1 <> ' usage if
apt-get install -y sudo curl
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs build-essential mongodb-org
sudo service mongod start