Skip to content

Instantly share code, notes, and snippets.

View DiegoFleitas's full-sized avatar
:shipit:
Bring me pictures of spiderman, Parker

Diego Fleitas DiegoFleitas

:shipit:
Bring me pictures of spiderman, Parker
  • Montevideo
  • 14:20 (UTC -03:00)
View GitHub Profile
@DiegoFleitas
DiegoFleitas / remove_swap.sh
Created July 20, 2021 17:12 — forked from garystafford/remove_swap.sh
From my blog post, Scripting Linux Swap Space: Scripting Linux Swap Space
#!/bin/sh
# does the swap file exist?
grep -q "swapfile" /etc/fstab
# if it does then remove it
if [ $? -eq 0 ]; then
echo 'swapfile found. Removing swapfile.'
sed -i '/swapfile/d' /etc/fstab
echo "3" > /proc/sys/vm/drop_caches
@DiegoFleitas
DiegoFleitas / increase_swap.sh
Created July 20, 2021 17:10 — forked from shovon/increase_swap.sh
Increasing swap size. Only tested on the ubuntu/trusty64 Vagrant box. CREDIT GOES TO ---> http://jeqo.github.io/blog/devops/vagrant-quickstart/
#!/bin/sh
# size of swapfile in megabytes
swapsize=8000
# does the swap file already exist?
grep -q "swapfile" /etc/fstab
# if not then create it
if [ $? -ne 0 ]; then