| Description | Command |
|---|---|
| Start a new session with session name | screen -S <session_name> |
| List running sessions / screens | screen -ls |
| Attach to a running session | screen -x |
| Attach to a running session with name | screen -r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # Author: Markus (MawKKe) ekkwam@gmail.com | |
| # Date: 2018-03-19 | |
| # | |
| # | |
| # What? | |
| # | |
| # Linux dm-crypt + dm-integrity + dm-raid (RAID1) | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def docx_replace(doc, data): | |
| paragraphs = list(doc.paragraphs) | |
| for t in doc.tables: | |
| for row in t.rows: | |
| for cell in row.cells: | |
| for paragraph in cell.paragraphs: | |
| paragraphs.append(paragraph) | |
| for p in paragraphs: | |
| for key, val in data.items(): | |
| key_name = '${{{}}}'.format(key) # use placeholders in the form ${PlaceholderName} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def docx_replace(doc, data): | |
| paragraphs = list(doc.paragraphs) | |
| for t in doc.tables: | |
| for row in t.rows: | |
| for cell in row.cells: | |
| for paragraph in cell.paragraphs: | |
| paragraphs.append(paragraph) | |
| for p in paragraphs: | |
| for key, val in data.items(): | |
| key_name = '${{{}}}'.format(key) # use placeholders in the form ${PlaceholderName} |
If a Linux machine locks up or freezes completely, use REISUB to restart it more gently than pushing the Power Button.
Hold down Alt and the SysReq (Print Screen) keys, and then type R E I S U B, with 2-3 second delays between the key presses to give the commands a better chance to complete.
R: Switch the keyboard from raw mode to XLATE modeE: Send the SIGTERM signal to all processes except initI: Send the SIGKILL signal to all processes except initS: Sync all mounted filesystems