Skip to content

Instantly share code, notes, and snippets.

View LiberQuack's full-sized avatar

LiberQuack LiberQuack

  • Brazil
  • 21:42 (UTC -03:00)
View GitHub Profile
apt-get install -y tightvncserver
export USER=`whoami`
vncserver $DISPLAY -geometry 1024x768 -depth 24
tightvncserver
mkdir ~/internet
while true; do
ping -w1 -W1 youtube.com |& while read pong; do
echo "$(date +%x.%X) >>> $pong" | grep -E "rtt|100%|unknown" >> ~/internet/$(date +%x).txt
done
done
SWAP_SIZE=2G
# See more: http://goo.gl/jN3NFO
sudo fallocate -l $SWAP_SIZE /swapfile
sudo chown root:root /swapfile
sudo chmod 0600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee --append /etc/fstab
#IMPORTANT
sudo apt update &&
sudo apt install -y software-properties-common curl wget pavucontrol #pavucontrol is for audio configs
#Themes and Tweak (Ubuntu)
sudo add-apt-repository ppa:numix/ppa
sudo apt update
sudo apt install -y numix-gtk-theme numix-icon-theme-circle
sudo apt install -y unity-tweak-tool gnome-tweak-tool
#FORCE MIC VOLUME
cat <<'EOF' >> ~/.bashrc
### Want to see if linux is gonna change mic volume!!!
export MICVOLUME=35
export MICCALC=$(bc <<< "scale=2; 65535 * ($MICVOLUME / 100)" | grep -oP '^\d+')
while sleep 0.25; do
export MICNAME=$(pacmd list-sources | grep -zoP '\*.*\n.*name.*<(.+)>' | grep -zoP '<.*>' | grep -UzoP '[^<>]' | tr -d '\n')
pacmd set-source-volume $MICNAME $MICCALC
done
EOF