Skip to content

Instantly share code, notes, and snippets.

@NitsanBaleli
Last active February 22, 2021 07:43
Show Gist options
  • Save NitsanBaleli/8634166 to your computer and use it in GitHub Desktop.
Save NitsanBaleli/8634166 to your computer and use it in GitHub Desktop.
.bash_history
sudo apt-get update
sudo apt-get install -y guake git curl g++ zsh vim build-essentia
//---------------------zsh guake etc..
---------------------------------------------------------------------------------
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
sudo chsh -s $(which zsh) $USER
git clone https://github.com/rupa/z.git ~/z
curl -L "https://raw.githubusercontent.com/NitsanBaleli/Linux-env/master/zsh/.zshrc" > ~/.zshrc
chsh -s /bin/zsh
which guake
//---------------------nodejs
---------------------------------------------------------------------------------
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g webpack-dev-server browser-sync grunt bower
//---------------------add ssh key to github:
---------------------------------------------------------------------------------
ssh-keygen -f ~/.ssh/id_rsa -t rsa -C "[email protected]"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
ssh -T [email protected]
https://gist.github.com/grenade/6318301
//add a key for specific project
git config --local --add core.sshCommand 'ssh -i ~/.ssh/my_key'
//---------------------php mysql
---------------------------------------------------------------------------------
sudo add-apt-repository ppa:olivier-berten/misc
sudo apt-get update
sudo apt-get install -y mysql-workbench
//------------------java + tomcat + env------------------//
install java: https://ubuntuforums.org/showthread.php?t=2343991
sudo apt-get install tomcat7 mysql-server mysql-client
sudo vi /etc/default/tomcat7
sudo service tomcat7 restart
systemctl status tomcat7.service
//---------------------shutter
---------------------------------------------------------------------------------
sudo add-apt-repository ppa:shutter/ppa
sudo apt-get update
sudo apt-get install shutter
https://askubuntu.com/a/239928/275359
//https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
//---------------------aws
---------------------------------------------------------------------------------
sudo apt-get install python-pip python-dev build-essential
sudo pip install --upgrade pip
pip install awscli --upgrade --user
sudo pip install --upgrade virtualenv
//---------------------tools
---------------------------------------------------------------------------------
https://github.com/sharkdp/bat
https://github.com/sharkdp/fd
curl -LO https://github.com/BurntSushi/ripgrep/releases/download/0.10.0/ripgrep_0.10.0_amd64.deb
sudo dpkg -i ripgrep_0.10.0_amd64.deb
//---------------------ssd
---------------------------------------------------------------------------------
// disable swap (minimize writing to drive)
echo -e "vm.swappiness=0" | sudo tee -a /etc/sysctl.conf
echo -e "fs.inotify.max_user_watches=524288" | sudo tee -a /etc/sysctl.conf
echo -e "kernel.sysrq = 1" | sudo tee -a /etc/sysctl.conf
echo -e "vm.oom_kill_allocating_task = 1" | sudo tee -a /etc/sysctl.conf
//fix system freeze
//https://askubuntu.com/a/801597/275359
sudo vi /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=1"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['']"
//---------------------backup
---------------------------------------------------------------------------------
** add -n to make a dry run
sudo rsync -av --progress ~/junk /media/usb/ --exclude node_modules --exclude bower_components --exclude .git
sudo rsync -av -n --progress ~/learn /media/usb/ --exclude node_modules --exclude bower_components --exclude .git --exclude dist --exclude build
sudo rsync -av --progress /home/nbaleli/Pictures /media/usb/ --exclude node_modules --exclude bower_components --exclude .git --exclude dist --exclude build
sudo rsync -av --progress /home/nbaleli/projects /media/usb/ --exclude node_modules --exclude bower_components --exclude --exclude dist --exclude build --exclude target --exclude out --exclude app/dist
sudo rsync -av --progress /home/nbaleli/scripts /media/usb/ --exclude node_modules --exclude bower_components --exclude .git --exclude dist --exclude build --exclude target --exclude out --exclude app/dist
sudo rsync -av --progress /home/nbaleli/stuff /media/usb/
sudo rsync -av --progress /CONFIGS /media/usb/
sudo rsync -av --progress /home/nbaleli/.ssh /media/usb/
sudo rsync -av --progress /home/nbaleli/.aws /media/usb/
sudo rsync -av --progress /home/nbaleli/.gitkraken /media/usb/
sudo rsync -av --progress /home/nbaleli/Downloads /media/usb/
sudo rsync -av --progress /home/nbaleli/work /media/usb/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment