By resources
sessions
list-sessions ls -- List sessions managed by server
new-session new -- Create a new session
| ʘ‿ʘ | |
| Innocent face | |
| ಠ_ಠ | |
| Reddit disapproval face | |
| (╯°□°)╯︵ ┻━┻ | |
| Table Flip / Flipping Table | |
| ┬─┬ ノ( ゜-゜ノ) |
Shell initialization files are ways to persist common shell configuration, such as:
$PATH and other environment variables| from __future__ import print_function | |
| from time import time | |
| class BSFile(object): | |
| def __init__(self, filename, key_func): | |
| self.filename = filename | |
| self.key_func = key_func | |
| def find(self, key): | |
| ''' |
| import time | |
| import datetime | |
| timestamp_format = '%Y-%m-%d %H:%M:%S,%f' # 2018-06-28 13:34:04,776 | |
| epoch = datetime.datetime.utcfromtimestamp(0) # timestamp at 1970-01-01 00:00:00 | |
| def timestamp_to_int(ts): | |
| dt = datetime.datetime.strptime(ts, timestamp_format) | |
| return int((dt-epoch).total_seconds()*1000) |
| Test | Description |
|---|---|
| -e | file exists |
| -f | file is a regular file (not a directory or device file) |
| -s | file is not zero size |
| -d | file is a directory |
| -b | file is a block device |
| -c | file is a character device |
| -p | file is a pipe |
| -L | file is a symbolic link |
| #!/usr/bin/env bash | |
| ROOT_DIR='/directory/with/artist/album/song' # root directory which will be traversed | |
| ALBUM='Unknown Album' # only set artwork for songs in given album (for each artist) | |
| pushd "$(pwd)" | |
| cd "$ROOT_DIR" | |
| for artist in *; do | |
| cd "$artist" | |
| if [ -d "$ALBUM" ]; then |
| #!/usr/bin/env python3 | |
| import fileinput | |
| import os | |
| import random | |
| import re | |
| import string | |
| import subprocess | |
| def rand_str(k=12): |