Run this command on your directory to reformat imports on a directory:
find . -iname '*.py' | tr '\n' ' ' | zimports `find . -iname '*.py' | tr '\n' ' ' ` -i
dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:escape']" |
#! /usr/local/bin/python3.7 | |
import sys | |
import argparse | |
from pathlib import Path | |
from os import path, makedirs | |
def read_file(file_path, chunksize=8192): | |
with open(file_path, mode='rb') as f: |
[Unit] | |
Description=nl SSH proxy service | |
After=network-online.target | |
Wants=network-online.target | |
[Service] | |
ExecStart=/usr/bin/ssh -D 1234 -C -N -F %h/.ssh/config vps-nl -o ServerAliveInterval=1 | |
ExecReload=/bin/kill -s HUP | |
ExecStop=/bin/kill -s TERM | |
Type=idle |
[Unit] | |
Description=nl SSH proxy service | |
After=network-online.target | |
Wants=network-online.target | |
[Service] | |
ExecStart=/usr/bin/ssh -D 1234 -C -N -F %h/.ssh/config vps-nl -o ServerAliveInterval=1 | |
ExecReload=/bin/kill -s HUP | |
ExecStop=/bin/kill -s TERM | |
Type=idle |
Run this command on your directory to reformat imports on a directory:
find . -iname '*.py' | tr '\n' ' ' | zimports `find . -iname '*.py' | tr '\n' ' ' ` -i
echo "function download_from_file() { | |
while IFS='' read -r line || [[ -n \$line ]]; | |
do axel \$line \${@:2} | |
done < \$1 | |
}" >> ~/.bashrc | |
source ~/.bashrc |
sudo apt-get install python3-dev | |
curl https://bootstrap.pypa.io/get-pip.py | sudo -H python3.6 | |
sudo -H pip3.6 install virtualenvwrapper | |
echo "export VIRTUALENVWRAPPER_PYTHON=`which python3.6`" >> ~/.bashrc | |
echo "source $(which virtualenvwrapper.sh)" >> ~/.bashrc | |
source ~/.bashrc |
docker run -it -e SS_PASSWORD={your_password_here} -e SS_METHOD= -p 1144:8388 leizongmin/shadowsocks:latest |
[Interface] | |
PrivateKey = ... | |
Address = 192.168.111.2 | |
[Peer] | |
PublicKey = ... | |
AllowedIPs = 0.0.0.0/0 | |
Endpoint = <external-ip>:443 | |
PersistentKeepalive = 19 |
#!/bin/bash | |
echo -e "Please enter the full (escaped) file path:" | |
read -r path | |
echo "Path: $path" | |
echo -e "Enter the destination:" | |
read -r dst | |
echo "Destination: $dst" | |
while [ 1 ] | |
do | |
rsync --progress --partial --delete -az -e ssh "USER@HOST:$path" $dst |