Skip to content

Instantly share code, notes, and snippets.

View farnetani's full-sized avatar
🎯
Desenvolvendo em Golang

Arlei F. Farnetani Junior farnetani

🎯
Desenvolvendo em Golang
View GitHub Profile
@farnetani
farnetani / clean.sh
Created October 19, 2023 12:33 — forked from Iman/clean.sh
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/bin/sh
#Check the Drive Space Used by Cached Files
du -sh /var/cache/apt/archives
#Clean all the log file
#for logs in `find /var/log -type f`; do > $logs; done
logs=`find /var/log -type f`
for i in $logs
@farnetani
farnetani / pgsql-size.sql
Created May 29, 2022 23:47
PostgreSQL: Como ver o tamanho das bases de dados de um servidor
-- Para saber o tamanho de todas as bases de dados:
SELECT pg_database.datname, pg_size_pretty(pg_database_size(pg_database.datname)) AS size FROM pg_database;
@farnetani
farnetani / links-vscode-setup.md
Created October 25, 2019 23:14 — forked from plinionaves/links-vscode-setup.md
Default VSCode Setup (for all projects)

Remove all node_modules

choose the dir and run...

mac / linux

find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \;

windows prompt

FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" rm -rf "%d"

@farnetani
farnetani / LVM on Ubuntu howto
Created August 12, 2019 00:44 — forked from runozo/LVM on Ubuntu howto
Using LVM on Linux and resize swap partition
# RESCAN FOR NEWLY ADDED HDS
echo "- - -" > /sys/class/scsi_host/host#/scan
fdisk -l
# NEW LOGICAL VOLUME
sudo fdisk /dev/sdb
# then create a new partition of type 8e (Linux LVM)
# create a phisical volume
sudo pvcreate /dev/sdb1
# create new volume group
@farnetani
farnetani / my.cnf
Created August 11, 2019 15:36 — forked from peerax/my.cnf
mySQL config file for ram 8GB
# my.cnf for TAKIS Server
# BEGIN CONFIG INFO
# DESCR: 8 GB RAM, InnoDB only, ACID, few connections, heavy queries
# TYPE: SYSTEM
# END CONFIG INFO
[client]
port = 7000
socket = /var/lib/mysql/mysql.sock