"Cherry pick" all changes required to make same as another branch:
git merge --squash -X theirs <other_branch>
Makes no commit, but stages all changes
"Cherry pick" all changes required to make same as another branch:
git merge --squash -X theirs <other_branch>
Makes no commit, but stages all changes
To get the Git top level, or root, of the repo:
git rev-parse --show-toplevel
Get the current current branch name:
git rev-parse --abbrev-ref HEAD
Get the current working directory relative to project root:
echo "${PWD##$(git rev-parse --show-toplevel)}"
Get the current working directory relative to project root and the branch name in one line:
echo "${PWD##$(git rev-parse --show-toplevel)} [$(git rev-parse --abbrev-ref HEAD)]"
This was done with pulseaudio 8.0
So, here it is:
echo $(( ($(pacmd list-sinks | sed -n -e "/$(pacmd stat | grep "Default sink name" | cut -d ' ' -f4)/,\$p" | grep -m1 volume | cut -d '/' -f2,4 | tr -d '% ' | tr '/' '+')) / 2 ))
Wow.. that's a mouthful. Let's break it down...
# make a drive image
sudo bash -c "pv -EE /dev/sdX >my_disk.img"
# make a compressed drive image
sudo bash -c "pv -EE /dev/sdX | gzip >my_disk.img.gz"
This should go without saying, but make sure you have a good backup of everything before you do any of this.. If in doubt, just backup the whole VirtualBox folder. You have been warned.
Here's some useful tricks to automate the configuration of the gnome shell
This is mostly for myself, but perhaps someone else might get some ideas from it..