- Edit
/etc/firewalld/firewalld.conf - Set
CleanupOnExit=no
sudo snap install communitheme
sudo update-alternatives --install /usr/share/gnome-shell/theme/gdm3.css gdm3.css /snap/communitheme/current/share/gnome-shell/theme/Communitheme/gnome-shell.css 15
sudo sed -ie '/^\[User\]$/,/^\[/ s/^\(XSession=\).*$/\1ubuntu-communitheme-snap/' /var/lib/AccountsService/users/${USER}Without timestamps:
#!/usr/bin/env bash
exec > >(tee -ai ~/app-stdout.log) 2> >(tee -ai ~/app-stderr.log >&2)
app $*With timestamps (requires ts from moreutils):
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
| #!/usr/bin/env bash | |
| mkfifo pipe # Created named pipe | |
| program <pipe & # Start program | |
| exec 3>pipe # Open file descriptor 3, writing to the named pipe | |
| # Write to pipe using printf, echo, cat, ... | |
| exec 3>&- # Close the named pipe (file descriptor 3) |
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
| #!/usr/bin/env bash | |
| send() | |
| { | |
| local length=${#1} | |
| printf "Content-Length: $length\r\n" >pipe | |
| printf '\r\n' >pipe | |
| printf ${1//\\/\\\\} >pipe | |
| } |
- Open PDF in InkScape. Use Poppler/Cairo import.
- Ungroup all using
CTRL + AandCTRL + SHIFT + G. - Select what you want to keep and delete the rest using
!andDELETE. - Autoresize the canvas using
CTRL + SHIFT + R. - Save as
.EMFfile.
Oneliner to diff a set of files pairwise in different tabs with Vim:
gvim -R -c 'for i in range(1, argc() - 1) | if i % 2 == 1 | rightbelow vertical diffsplit | next | diffthis | else | tabedit | next | endif | endfor' a b c d
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
| #include <cassert> | |
| #include <cstdint> | |
| #include <iostream> | |
| #include <memory> | |
| #include <sstream> | |
| #include <utility> | |
| #include <vector> | |
| // Visited hierarchy | |
| struct AstBase { |
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
| function run_in_docker() | |
| { | |
| docker run --rm -i -u "$(id -u):$(id -g)" $DOCKER_IMAGE bash -s | |
| } | |
| # Usage: | |
| run_in_docker <<EOF || echo "Failed!" | |
| set -e | |
| echo "Do something in container..." | |
| EOF |
OlderNewer