Check which filesystem doesn't have any space left:
sudo df -h
Check which folder uses this space most:
sudo find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n
#!/bin/bash | |
sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring | |
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null | |
gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg | |
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list | |
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx | |
sudo apt update | |
sudo apt install nginx |
#!/usr/bin/env bash | |
apt install -y apt-transport-https ca-certificates curl gnupg lsb-release | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
apt update | |
apt install -y docker-ce docker-ce-cli containerd.io | |
/bin/cat <<EOM >/etc/docker/daemon.json | |
{ | |
"metrics-addr" : "127.0.0.1:9323", |
function constants() { | |
const data = { | |
T: { // levha kalınlıkları | |
single: 3, | |
double: 5 | |
}, | |
tCostFactor: { // levha maliyetleri | |
single: 5.5, | |
double: 8.5 | |
}, |
import {execSync} from 'child_process' | |
const service = 'some_service' | |
const containerId = execSync(`docker ps -f name=${service} --quiet`).toString().trim() |
// filtering something by its lifetime with slonik | |
const filterByLifetimeQuery = sql` | |
select id | |
from eventlog | |
where | |
code=${code} and | |
payload=${sql.json(payload)} and | |
created_at + interval '1 second' * ${parseInt(ctx.threshold)} > now() | |
` |
user nginx; | |
worker_processes auto; | |
error_log syslog:server=unix:/dev/log notice; | |
pid /var/run/nginx.pid; | |
#load_module modules/ngx_http_brotli_filter_module.so; | |
#load_module modules/ngx_http_brotli_static_module.so; | |
events { | |
worker_connections 1024; |
#!/bin/bash | |
SAMPLE_DIR=/mnt/some-volume | |
# change ownership of the directory and all of its contents | |
chown -R cmsman:cmsteam $SAMPLE_DIR | |
# change permissions of the directory and all of its contents | |
chmod -R u=rwX,g=rwX,o-rwx $SAMPLE_DIR | |
# set uid and gid | |
chmod -R u+s $SAMPLE_DIR |
openssl genrsa -out cms_auth_key.pem 4096 | |
openssl rsa -in cms_auth_key.pem -outform PEM -pubout -out cms_auth_key_public.pem |
/* | |
* | |
* Purformance | |
* | |
* Simply use mark and measure methods similar to native performance api. | |
* | |
* Native performance methods are not supported by browsers | |
* and there is no better way to measure performance than Date.getTime() | |
* in those cases. | |
* |
Check which filesystem doesn't have any space left:
sudo df -h
Check which folder uses this space most:
sudo find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n