Skip to content

Instantly share code, notes, and snippets.

@fomvasss
Last active February 18, 2024 19:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save fomvasss/47d4e3260d9165d78ec9b96d0c25dfbb to your computer and use it in GitHub Desktop.
Save fomvasss/47d4e3260d9165d78ec9b96d0c25dfbb to your computer and use it in GitHub Desktop.
Settings OS Linux after install

After install OS

Upgrate OS

sudo apt upgrate
sudo apt -y install linux-firmware

Add swap (optional)

sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
/swapfile swap swap defaults 0 0 в файл /etc/fstab

https://linuxize.com/post/create-a-linux-swap-file/

Install GoogleChrome

Download .deb package and run:

sudo dpkg -i ~/Downloads/google-chrome-stable_current_amd64.deb

Add & Sync Google accounts

Set SSH keys

Copy old ssh keys in ~/.ssh dir and set:

chmod 700 ~/.ssh
chmod 644 ~/.ssh/config
chmod 600 ~/.ssh/id_rsa*
chmod 644 ~/.ssh/*.pub

or generate new keys https://www.digitalocean.com/community/tutorials/ssh-ubuntu-18-04-ru:

ssh-keygen

Console apps:

sudo apt install ncal
sudo apt install htop
sudo apt install curl 
sudo apt install wget
sudo apt install git
sudo snap install screencloud
sudo apt install hardinfo

https://github.com/ohmyzsh/ohmyzsh

sudo apt install zsh
sudo apt install yadm
yadm clone git@github.com:fomvasss/dotfiles.git
chsh
Login Shell [/bin/bash]: /usr/bin/zsh

Set default ZSH in your termanal

Set git configs:

git config --global user.name YourName
git config --global user.email YourEmail@gmail.com

Vagrant/Homestead

sudo dpkg -i ~/Downloads/virtualbox...
sudo dpkg -i ~/Downloads/vagrant...

https://laravel.com/docs/8.x/homestead#installation-and-setup

Run:

vagrant up

Install vagrant plugins:

vagrant plugin install vagrant-hostsupdater

NFS (optional): http://tech.osteel.me/posts/2016/01/19/how-to-enable-nfs-on-laravel-homestead.html

Backup/Restore Laravel Homestead

Databases

  • Backup all Databases
mysqldump -u homestead -psecret --all-databases > backup.sql

or

  • Backup selected Databases
 mysqldump -u homestead -psecret --databases db1 db2 db3  > ~/www/backup/backup23112020.sql
  • Restore Databases with backup
mysql -u homestead -psecret < backup.sql

Files

  • Backup files (without compress)
tar -cvf App.tar ~/App
  • Restore files
tar -xvf App.tar -C ~/App

https://linuxize.com/post/how-to-back-up-and-restore-mysql-databases-with-mysqldump/

Interface

Download fonts (JetBrainsMono, FiraCode,...) to dir ~/.fonts:

Install Gnome Tweak Tools (https://help.ubuntu.ru/wiki/gnome-tweak-tool)

sudo apt-get install gnome-tweak-tool

Set: https://i.imgur.com/wC6c7GM.png

sudo apt-get install lm-sensors
sudo sensors-detect

Visit: https://extensions.gnome.org/ Find and install: Dash to Panel, Freon (by UshakovVasilii), Status Area Horizontal Spacing (by p91paul), Draw On You Screen (by abakkk)

sudo apt-get install dconf-editor

https://notion-enhancer.github.io/

Snap apps

sudo apt install snapd
sudo snap install opera
sudo snap install postman
sudo snap install telegram-desktop
sudo snap install code --classic
sudo snap install sublime-text --classic
sudo snap install mysql-workbench-community
sudo snap install vokoscreen-ng
sudo snap install vlc
sudo snap install youtube-dl
sudo snap install wallpaperdownloader
sudo snap install flameshot
sudo snap install pinta-james-carroll
sudo snap install xmind
sudo snap install bashtop

Add keyboard shortcuts: Shift+PrtSc => command: flameshot gui

https://dbeaver.io/download/

JatBrains

Install JatBrains Toolbox, PhpStorm, activate and sync settings: https://www.jetbrains.com/ru-ru/toolbox-app/

FNM

curl -fsSL https://fnm.vercel.app/install | bash
fnm install 12
fnm use 12
fnm default 12

https://github.com/Schniz/fnm

Example use in projects:

npm i
npm run dev
npm i gulp@3.9.1
./node_modules/.bin/gulp build; ./node_modules/.bin/gulp test --noinline --nohtmlmin
...

Other

APIDoc

npm install -g apidoc

Example generate docs:

apidoc -i app/Http/Controllers/Api -o public/docs

OLD:

Awesome programs

  • SimpleScreenRecorder?

  • Vokoscreen (sudo apt-get install vokoscreen of snap)

  • Odio (radio)

  • FreeTube

  • Pencil (prototype)

  • Pinta (graphics editor)

  • Flameshot (printscreen)

  • XMind (snap)

  • Kdenlive (video editor)

  • KDE partition manager

  • QBTorrent

  • Postman

  • WPS Office

  • Snap (sudo apt install snapd)

  • Opera

  • Chrome

  • Slac

  • Telegram

  • Tor

  • Transmission

  • Insomniya

  • Postman

  • GraphQLPlayground

  • sudo add-apt-repository ppa:obsproject/obs-studio

  • sudo apt install obs-studio

WueUSB

1. wget mirrors.kernel.org/ubuntu/pool/universe/w/wxwidgets3.0/libwxgtk3.0-0v5_3.0.4+dfsg-3_amd64.deb
2. sudo dpkg -i libwxgtk*_amd64.deb
3. sudo apt update
4. ## потому что и в этом случае ругается ## sudo apt --fix-broken install
5. sudo apt install woeusb

Linux: Gnome, Interface, Settings

sudo apt-get install gnome-tweak-tooll
sudo apt install dconf-tools
sudo apt install compizconfig-settings-manager compiz-plugins

gnome-tweak-tooll

http://compizomania.blogspot.com/2016/01/gnome-nautilus-318-ubuntu-1604.html

Gnome extensions

  • https://extensions.gnome.org

  • Freon

  • Dash to Panel

  • Bing Wallpaper

  • TopIcons Plus

  • Status Area Horizontal Spacing

  • MConnect

  • AlternateTab

  • User Themes

PHP, Git, Composer

sudo apt install git
sudo apt install composer ?

SQL

Homestead backup DB

0 11 * * * mysqldump -u homestead -psecret --all-databases > /home/vagrant/www/backup/homestead-`date +\%Y_\%m_\%d__\%H_\%M_\%S`.sql
mysqldump -u homestead -psecret --all-databases > homestead-20150727_0913.sql
mysql -u homestead -psecret < homestead-20150727_0913.sql

VPN

sudo apt install wireguard
nmcli c import type wireguard file ~/App/vpn.wg.conf
nmcli c up vpn.wg

Use:

ssh root@10.200.xxx.x

File

[Interface]
PrivateKey = ixxxxxxxxxxxxxxxI=
Address = xx.xxx.xxx.xx/xx

[Peer]
PublicKey = MxxxxxxxxxxxxxxxE=
PresharedKey = 7xxxxxxxxxxxxxxxxxxxxx8=
AllowedIPs = xx.xxx.xxx.0/24
Endpoint = xxx.xxx.xxx.xxx:xxxx
PersistentKeepalive = 15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment