tmux shortcuts & cheatsheet
start new:
tmux
start new with session name:
tmux new -s myname
# Hautelook experienced an outage where their services crashed overnight (no particular elevated build volume. | |
# They attempted a restart and received errors such as: | |
### - Timeout waiting for event Migrator Finished - VM Service | |
### - Timeout waiting for event Migrator Finished - Permissions Service | |
### - Timeout waiting for event Postgresql 9.4 ready-5432 | |
# | |
# Weirdly enough, the container logs for each of those looked to be just fine. Replicated logs would show the timeout errors, however. | |
# Doing the Replicated dance did not fix the issue, so I had them nuke all existing images and containers and reinstall Replicated. | |
# Good to reassure them that no data will be destroyed through all this. |
#!/usr/bin/env sh | |
get_user() { | |
URL="https://api.github.com/users/$1" | |
RESULT=$(curl -s "$URL") | |
ID=$(echo "$RESULT" | sed -En 's/.*"id": ([0-9]+).*/\1/p') | |
NAME=$(echo "$RESULT" | sed -En 's/.*"name": "(.*)".*/\1/p') | |
echo "Co-authored-by: $NAME <$ID+$1@users.noreply.github.com>" | |
} |
#!/usr/bin/env bash | |
# | |
# Download all artitacts for given build, mimicing structure locally. | |
# | |
# Batch size is slighly misleading, as it;s only how many URLs to attempt before momentary pause | |
# | |
# Can be used on CCI builds with parallelism and will only download the files for matcing index. | |
# | |
# | |
USAGE="$0 username/repo 123 [bitbucket] [batch_size]" |
> Thank you for reaching out to Autonomous! I am sorry to hear that you are having some trouble with your SmartDesk | |
> but I will be glad to assist. It sounds like your system needs a "hard reset" can I please have you follow these | |
> steps thoroughly. | |
Reset Steps: | |
1. Unplug the desk for 20 seconds. Plug it back in. Wait a full 20 seconds. | |
2. Press the up and down buttons until the desk lowers all the way and beeps or 20 seconds pass. | |
3. Release both buttons. | |
4. Press the down buttons until the desk beeps one more time or 20 seconds pass. |
start new:
tmux
start new with session name:
tmux new -s myname
#!/usr/bin/env python | |
""" | |
Very simple HTTP server in python (Updated for Python 3.7) | |
Usage: | |
./dummy-web-server.py -h | |
./dummy-web-server.py -l localhost -p 8000 | |
Send a GET request: |