Refer to Rsync#Full_system_backup for details.
# rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /path/to/backup/folder
import asyncio | |
import logging | |
# XXX: REMOVE THIS LINE IN PRODUCTION! | |
logging.basicConfig(format='%(asctime)s %(lineno)d %(levelname)s:%(message)s', level=logging.DEBUG) | |
logger = logging.getLogger(__name__) | |
# Connected client records | |
clients = dict() | |
import asyncio | |
import random | |
from uuid import uuid4 | |
MAX_WORKERS = 20 | |
# The semaphore for synchronization | |
sema = asyncio.Semaphore(MAX_WORKERS) | |
# Storing currently running tasks | |
tasks = set() |
import pty | |
import time | |
import os | |
import sys | |
pid, fd = pty.fork() | |
if pid == 0: | |
# Child process | |
while True: |
import logging | |
import select | |
import signal | |
import pty | |
import os | |
logger = logging.getLogger(__name__) | |
import time | |
import requests | |
TOKEN = 'Your access token here' | |
def fetch_track(track_id): | |
"""Fetch track data using a track ID.""" | |
resp = requests.get( |
import time | |
import asyncio | |
import aiohttp | |
TOKEN = 'Your access token here' | |
async def fetch_track(track_id): | |
"""Async. fetch track data using a track ID.""" |
Refer to Rsync#Full_system_backup for details.
# rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /path/to/backup/folder
#!/bin/bash | |
SCRIPT_NAME="first_time_setup.sh" | |
info() { | |
printf -- "$SCRIPT_NAME INFO: $*\n" >&2 | |
} | |
error() { | |
printf -- "$SCRIPT_NAME ERROR: $*\n" >&2 |
$ ssh-keygen -p -f ~/.ssh/id_rsa
Refer to Rsync#Full_system_backup for details.
*
favorite (saved) networkA
autoconnectableO
onlineR
readyIf no letter is shown in the O/R column, the network is not connected.
A network is in state 'ready' once it has obtained an IPv4 or IPv6 address or both. The addresses can be acquired via DHCPv4 or DHCPv6, IPv6 address autoconfiguration, IPv4 link local assignment or statically configured for IPv4 or IPv6. A network is in state 'online' if ConnMan has verified connectivity to Internet, i.e. it has managed to look up and connect to ipv4.connman.net or ipv6.connman.net. For all practical purposes 'ready' and 'online' are usually equivalent for the intended connectivity experience. The 'ready' state gives and indication that the network might need a proxy set up to get connected from a company intranet, airport WiFi or similar. In the worst case the network really has limited outside connectivity for one or another reason.