sed -i 's/XKBLAYOUT="us"/XKBLAYOUT="de"/' /etc/default/keyboard setupcon --force
The first line makes the necessary changes in the file that is responsible for the global keyboard layout. The second line applies the change to the current console.
sed -i 's/XKBLAYOUT="us"/XKBLAYOUT="de"/' /etc/default/keyboard setupcon --force
The first line makes the necessary changes in the file that is responsible for the global keyboard layout. The second line applies the change to the current console.
Set the default application for Java files to Kate and use Evince for pdfs:
echo "text/x-java=kde4-kate.desktop;" >> /usr/share/xfce4/applications/defaults.list echo "application/pdf=evince.desktop;" >> /usr/share/xfce4/applications/defaults.list
A few settings to be put into the .bashrc.
Ignore duplicates in history, but do put in comands that start with spaces:
HISTCONTROL=ignoredups # (default: ignoreboth)
Keep a lot of history:
export HISTSIZE=10000 # default: 1000 export HISTFILESIZE=10000 # default: 1000
When the shell exits, append to the history file instead of overwriting it:
shopt -s histappend
Disable the annoying password thingy in KDE:
unset SSH_ASKPASS
Hold the Shift key when you click Write, Reply or Forward, and the message format will switch to the opposite of the one defined in Account Settings.
from the Mozilla Support Forum.
There are other ways to do this, but a simple one is to replace the default directory with a symbolic link to wherever you want to have your data directory. This is tested with OpenSuse LEAP 42.3.
Stop docker (if it is running):
service docker stop
Move the contents of the docker default data directory (under Suse this is /var/lib/docker/) to somewhere else:
mv /var/lib/docker/ /path/to/new/folder/
Now create a symbolic link to the new location in place of the default directory:
ln -s /path/to/new/folder/ /var/lib/docker/
Start docker again, it should use the new location:
service docker stop
(PS: In my case I had not deleted all containers and images before, so I had some things that linux didn’t want to move to the new location. I just deleted them manually:)
btrfs subvolume delete btrfs/subvolumes/*
Mount a file system on a different computer via ssh:
sshfs -o follow_symlinks user@server:/home/user/ /path/to/mount/point
server is the other computer, user is your username on the other computer and /home/user/ is the folder you want to include from the other computer. /path/to/mount/point is the place on your drive where the files will be located. It needs to be a folder that exists and is empty.
To get rid of the mounted folder again use
umount /path/to/mount/point
With this handy script (not written by me):
https://gist.github.com/r3t/4466231
Really throw away everything (all changes!) from the last commit:
git reset --hard HEAD~1
Delete the commit, but preserve all changes:
git reset --soft HEAD~1
For more details and explanations, read this excellent answer by Ryan Lundy on stackoverflow.
LaTeX is all nice and fancy if you write technical texts, where the pictures are floating in the text (mostly at the top and/or bottom of pages) and you reference them with numbers. But as I do all sorts of things with LaTeX, sometimes I want more “fun” texts which have pictures somewhere in the pages and text flowing around them.
For this purpose, I have now discovered the package wrapfig:
\usepackage{wrapfig}
You can include a picture like this (this one floats left of the text with a width of 7em):
\begin{wrapfigure}{l}{7em}
\centering
\includegraphics[width=\linewidth]{AuthorOfArticle.png}
\end{wrapfigure}
You can control some of the appearance with different settings in the preamble (see the documentation at CTAN), e.g.,
\intextsep0.5ex
Delete all containers
docker rm $(docker container ls -a -q)
Delete all unnamed images
docker rmi $(docker image ls | grep "<none>" | tr -s ' ' | cut -d ' ' -f 3)
docker image ls lists all images,
grep "<none>" selects all that have the tag (or repository! or part of name!) “<none>” ,
tr -s ' ' merges sequences of spaces to a single space,
cut -d ' ' -f 3 splits each line at the space and gives the third column (the image id).
The list of ids is then passed on to docker rmi to be deleted.
Use at your own risk!