Paste your clipboard to a file and open it with VIM
in your bashrc:
viclipboard () {
( tmpfile=~/.clips/$(date +%Y%m%d%H%M%S);
pbpaste > $tmpfile && vim $tmpfile && pbcopy < $tmpfile )
}
youtube-dl --write-description --write-info-json --write-annotations --write-sub --write-thumbnail |
gtf X Y FREQ give you the parameters | |
xrandr --newmode $(gtf 1600 900 60 | grep Modeline | sed s/Modeline\ // | tr -d '"') | |
xrandr --addmode "eDP-1" "1600x900_60.00" | |
xrandr --output "eDP-1" "1600x900_60.00" | |
gsettings set org.gnome.desktop.interface scaling-factor 2 |
Paste your clipboard to a file and open it with VIM
in your bashrc:
viclipboard () {
( tmpfile=~/.clips/$(date +%Y%m%d%H%M%S);
pbpaste > $tmpfile && vim $tmpfile && pbcopy < $tmpfile )
}
This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.
Here is an incomplete list of things that are different from other approaches:
:: list images
sudo docker images
:: list the containers
sudo docker ps
sudo docker ps -a
:: start/stop a container
## redirect http to https | |
server { | |
listen 0.0.0.0:80; | |
server_name YOUR_DOMAIN; | |
rewrite ^ https://$http_host$request_uri? permanent; # force redirect http to https | |
} | |
## https | |
server { |
[program:SERVICE_NAME] | |
command = /srv/<SERVICE>/venv/bin/gunicorn <SERVICE>:app --bind=127.0.0.1:5000 -w 4 | |
directory = /srv/demo | |
user = <USER> | |
stdout_logfile = /var/log/<SERVICE_NAME>/<SERVICE_NAME>.log | |
stderr_logfile = /var/log/<SERVICE_NAME>/<SERVICE_NAME>_error.log | |
redirect_stderr = True | |
restart = True | |
environment=USER=<USER> |
"""fabfile.py example | |
Deploy <APP_TO_DEPLOY>: | |
fab deploy:<APP_TO_DEPLOY> | |
""" | |
import os,sys | |
from fabric.api import local |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add -
I hereby claim:
To claim this, I am signing this object: