Skip to content

Instantly share code, notes, and snippets.

@sharmashivanand
Last active February 9, 2025 01:46
Show Gist options
  • Save sharmashivanand/e88d326f563c29ee549386e58ffe1a93 to your computer and use it in GitHub Desktop.
Save sharmashivanand/e88d326f563c29ee549386e58ffe1a93 to your computer and use it in GitHub Desktop.
#!/bin/sh
sudo apt-get install -y git curl wget zsh neovim htop screen
#optional
# sudo apt install openssh-server atop
# Ubuntu Samba
# sudo apt install samba system-config-samba
#sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
sed -i 's/plugins=(git)/plugins=(git zsh-completions zsh-autosuggestions wp-cli)/' ~/.zshrc
sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="agnoster"/' ~/.zshrc
# Append Zsh history options to .zshrc
cat << 'EOF' >> ~/.zshrc
# Zsh History Options
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_FIND_NO_DUPS
setopt HIST_SAVE_NO_DUPS
EOF
# AS SUDO
# php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
# sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
# composer --version
# php -r "unlink('composer-setup.php');"
# AS vscode user:
# composer global require "squizlabs/php_codesniffer=*"
# export PATH="$PATH:$HOME/.config/composer/vendor/bin"
# composer global require --dev wp-coding-standards/wpcs:"^3.0"
# .zshrc: export PATH="$PATH:$HOME/.config/composer/vendor/bin"
# phpcs --config-set installed_paths ~/.composer/vendor/wp-coding-standards/wpcs
# phpcs --config-set default_standard WordPress
# https://github.com/valeryan/vscode-phpsab
# phpcbf --config-set installed_paths D:\_TMP\wpcs
# phpcbf -i
@sharmashivanand
Copy link
Author

sharmashivanand commented Nov 18, 2021

@sharmashivanand
Copy link
Author

sharmashivanand commented Nov 20, 2021

lazy unmount to unmount sifs shares:
umount -l

Mounting protected smb shares:
//server/share/path /mount/point cifs credentials=/etc/smbcredentials,_netdev,nofail,iocharset=utf8,rw,file_mode=0777,dir_mode=0777,user 0 0

#or try
//server/share/path /mount/point cifs credentials=/etc/smbcredentials,_netdev,auto,x-systemd.automount,nofail,iocharset=utf8,rw,file_mode=0777,dir_mode=0777,user 0 0

format of smbcredentials:
username=yourusername
password=yourpa$s
domain=your-smb-hostname

You'll need sudo apt install cifs-utils

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment