Last active
July 7, 2023 10:11
-
-
Save Surzhko/e041a609c1a3f62f7298 to your computer and use it in GitHub Desktop.
Installation bash script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" | |
. $HOME/.asdf/asdf.sh | |
. $HOME/.asdf/completions/asdf.bash | |
alias gg='git gui' | |
alias gw='github_workflow' | |
alias be='bundle exec' | |
__git_color_ps1 () | |
{ | |
if [ -n "$(__git_ps1)" ]; then | |
local WORKING_TREE_CLEAN_MESSAGE="working tree clean" | |
local COLOR_DIRTY="\033[01;31m" | |
local COLOR_CLEAN="\033[01;32m" | |
local IS_CLEAN=$(git status | grep -c "$WORKING_TREE_CLEAN_MESSAGE"); | |
if [ $IS_CLEAN -eq 0 ]; then | |
echo -e $COLOR_DIRTY | |
else | |
echo -e $COLOR_CLEAN | |
fi | |
fi | |
} | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;33m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[$(__git_color_ps1)\]$(__git_ps1)\[\033[00m\]\$ ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bashs | |
sudo apt update | |
snap refresh | |
sudo apt install -q -y curl git git-gui | |
snap install gh | |
snap install telegram-desktop | |
snap install slack | |
echo "\pset null 'Ø'" > ~/.psqlrc | |
echo "legacy_version_file = yes" > .asdfrc | |
mkdir ~/projects | |
echo ".ruby-version" > ~/projects/.gitignore | |
echo ".ruby-gemset" >> ~/projects/.gitignore | |
echo ".idea" >> ~/projects/.gitignore | |
echo "temp/" >> ~/projects/.gitignore | |
git config --global core.excludesfile ~/projects/.gitignore | |
git config --global color.ui auto | |
git config --global user.name '' | |
git config --global user.email '' | |
# git aliases | |
git config --global alias.refetch '!git fetch origin && git reset --hard origin/$(git rev-parse --abbrev-ref HEAD)' | |
git config --global alias.refresh '!git fetch origin && git rebase origin/main' | |
git config --global alias.cb 'checkout @{-1}' | |
git config --global alias.fpush 'push --force-with-lease' | |
# psql> CREATE ROLE $here$ WITH SUPERUSER CREATEDB CREATEROLE LOGIN REPLICATION; | |
# sudo ln -s ~/.asdf/installs/ruby/2.7.6/openssl/lib/libssl.so.1.1 /usr/lib/x86_64-linux-gnu/libssl.so.1.1 | |
# sudo ln -s ~/.asdf/installs/ruby/2.7.6/openssl/lib/libcrypto.so.1.1 /usr/lib/x86_64-linux-gnu/libssl.so.1.1 | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment