Last active
March 16, 2025 21:32
-
-
Save PetrGlad/6492586 to your computer and use it in GitHub Desktop.
My ubuntu setup
This file contains hidden or 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
shopt -s histappend | |
export PATH=$PATH:$HOME/.local/bin:$HOME/bin | |
stty -ixon | |
# export PS1='\n\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]`__git_ps1` \n\$ ' | |
# export PS1='\n\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[38;5;250m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\033[38;5;250m\]`__git_ps1`\[\033[00m\] \n\[\033[01;32m\]☯\[\033[00m\] ' | |
# export PS1='\n\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[38;5;243m\]\u@\h\[\033[00m\]:\[\033[38;2;140;140;200m\]\w\[\033[00m\]\[\033[38;5;243m\]`__git_ps1`\[\033[00m\] \n\[\033[01;32m\]☯\[\033[00m\] ' | |
export PS1='\n\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[38;5;243m\]\u@\h\[\033[00m\]:\[\033[38;2;140;140;200m\]\w\[\033[00m\]\[\033[38;5;243m\]`__git_ps1`\[\033[00m\] \n\[\033[01;3`[ $(id -u) == "0" ] && echo 3 || echo 2`m\]☯\[\033[00m\] ' | |
alias Df='df -B1m' | |
alias Gdc='git svn dcommit' | |
alias Gg='git gui&' | |
alias Ggm='A=$(__git_ps1); echo "${A:2:-1} -" > .git/GITGUI_BCK' | |
alias Gk='gitk&' | |
alias Gp='git stash pop' | |
alias Gq='qgit&' | |
alias Grl='git reflog --decorate --color | grep -E "^\S+ \(" | head -n 20' | |
alias Gs='git status' | |
alias Gsh='git stash save' | |
alias Gsr='git stash && git svn rebase' | |
alias Gpff='git pull --ff-only' | |
alias Hi='hoogle --info --color' | |
alias Ho='hoogle --color' | |
alias Lr='lein repl' | |
alias Mc='mc -u' | |
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' | |
alias egrep='egrep --color=auto' | |
alias fgrep='fgrep --color=auto' | |
alias grep='grep --color=auto' | |
alias l='ls -CF' | |
alias la='ls -A' | |
alias ll='ls -alF' | |
alias ls='ls --color=auto' | |
alias Gpsu='git push --set-upstream origin $(git branch --points-at HEAD | sed -E "s/^\s*\*\s*//g")' | |
alias Gtl='git tag --list --sort=v:refname' | |
alias TpadOff='synclient TouchPadOff=1' | |
alias TpadOn='synclient TouchPadOff=0' | |
export EDITOR=vim | |
# OpenShift/OKD | |
source <(oc completion bash) |
This file contains hidden or 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
# https://askubuntu.com/questions/176565/why-does-kworker-cpu-usage-get-so-high | |
grep . -r /sys/firmware/acpi/interrupts/ | |
# Find ones with high count | |
crontab -e | |
### add | |
@reboot echo disable >/sys/firmware/acpi/interrupts/gpe11 | |
#### | |
# For more diagnostics | |
powertop | |
# http://www.brendangregg.com/perf.html | |
sudo apt install linux-tools-generic | |
perf -r -a sleep 20 | |
perf report |
This file contains hidden or 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
echo "fs.inotify.max_user_watches = 524288" >>/etc/sysctl.conf | |
sysctl -p | |
apt-get remove zeitgeist | |
apt-get install \ | |
ecryptfs-utils emacs24 vim mc synaptic openjdk-8-jdk openjdk-8-source visualvm \ | |
git git-gui git-svn gitk qgit meld \ | |
subversion maven ant \ | |
tree jq ranger mc sshfs autossh htop byobu rlwrap pv tmux \ | |
wine virtualbox \ | |
vlc keepassx tomboy gimp alacarte chromium-browser \ | |
lm-sensors dstat cpufrequtils \ | |
menulibre | |
# HEIF, HEIC, HIF support | |
# https://askubuntu.com/questions/586476/how-to-assign-set-a-mime-type-to-a-file | |
# https://askubuntu.com/questions/1114127/how-to-display-heic-thumbnails-in-nautilus | |
apt-get install libheif1 heif-thumbnailer | |
# https://askubuntu.com/a/965306/16193 | |
sudo apt install heif-gdk-pixbuf | |
# Then edit /usr/share/mime/packages/heif.xml | |
sudo update-mime-database /usr/share/mime | |
apt-get install viewnior gpicview feh | |
apt-get install \ | |
mysql-client mysql-server mysql-workbench | |
sudo apt-get install \ | |
xfce4 xubuntu-icon-theme xubuntu-default-settings | |
# wget lein, gradle | |
# gsettings set com.canonical.Unity.Lenses disabled-scopes \ | |
# "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', | |
# 'more_suggestions-populartracks.scope', 'music-musicstore.scope', | |
# 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', | |
# 'more_suggestions-skimlinks.scope', | |
# 'more_suggestions-soundcloud.scope']"; | |
git config --global core.excludesfile '~/.gitignore' | |
# dev: perf/profiler setup | |
sudo apt install linux-tools-common linux-tools-generic linux-tools-`uname -r` | |
sudo sh -c 'echo 1 > /proc/sys/kernel/perf_event_paranoid' | |
sudo sh -c 'echo 0 > /proc/sys/kernel/kptr_restrict' | |
# Allow IDEs to set more FS watchers | |
echo "fs.inotify.max_user_watches=262144" >/etc/sysctl.d/local.conf | |
sysctl -p |
This file contains hidden or 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
# https://docs.docker.com/engine/installation/ | |
apt update | |
apt upgrade | |
# apt install apt-transport-https ca-certificates | |
apt-key adv \ | |
--keyserver hkp://ha.pool.sks-keyservers.net:80 \ | |
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
echo 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' /etc/apt/sources.list.d/docker.list | |
apt update | |
apt-cache policy docker-engine | |
apt install linux-image-extra-$(uname -r) linux-image-extra-virtual | |
apt install docker-engine docker-compose debootstrap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment