Skip to content

Instantly share code, notes, and snippets.

View altitdb's full-sized avatar

Altieres de Matos altitdb

View GitHub Profile
@altitdb
altitdb / gist:7f23620b5ab24ed7debb8ff268f1c073
Created October 16, 2023 17:54
Remove big files github
git filter-branch --tree-filter 'rm -rf games.md' HEAD
sudo apt-get install realmd -y
realm join $DOMAIN --user $USER
echo "Installing JDK8"
sudo mkdir -p /opt/java/jdk8
sudo tar -xzf jdk-8u251-linux-x64.tar.gz -C /opt/java/jdk8 --strip-components=1 jdk1.8.0_251
echo "Installing JDK11"
sudo mkdir -p /opt/java/jdk11
sudo tar -xzf jdk-11.0.7_linux-x64_bin.tar.gz -C /opt/java/jdk11 --strip-components=1 jdk-11.0.7
echo "Installing JDK13"
sudo mkdir -p /opt/java/jdk13
sudo setfacl -m user:$USER:rw /var/run/docker.sock
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu bionic main universe'
sudo apt install -t bionic libwebkitgtk-1.0-0
sudo sysctl -w vm.max_map_count=262144
@altitdb
altitdb / dos2unix.sh
Created November 6, 2019 19:38
Convert Dos to Unix files
sudo apt-get install -y dos2unix # Installs dos2unix Linux
sudo find . -type f -exec dos2unix {} \; # recursively removes windows related stuff
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
add to /etc/resolv.conf the namespaces:
nameserver 8.8.8.8
nameserver 8.8.4.4
sudo systemctl restart docker
sudo systemctl daemon-reload
select * from
(select count(*) used from pg_stat_activity) q1,
(select setting::int res_for_super from pg_settings where name=$$superuser_reserved_connections$$) q2,
(select setting::int max_conn from pg_settings where name=$$max_connections$$) q3;