Skip to content

Instantly share code, notes, and snippets.

View pavinjosdev's full-sized avatar
🏠
Working from home

Pavin Joseph pavinjosdev

🏠
Working from home
View GitHub Profile
@GastonDonnet
GastonDonnet / python-docx-replace-text-and-retain-style.py
Last active April 11, 2024 16:55 — forked from adejones/python-docx-replace-text-and-retain-style.py
Updated to support multiple replaces of the same KEY in a PARAGRAPH
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}
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}
@Prajjwal
Prajjwal / ephemeral-file-sharing-services.md
Last active August 17, 2024 08:50
A List of Ephemeral File Sharing Services

A List of Ephemeral File Sharing Services

Contributions welcome.

~ Prajjwal Singh

Service CLI? Max Size Direct Access Files Expire? Can Limit Download Count? Password Protection HTTPS
c-v.sh curl -F 4 GB Yes Yes, by Mister Alg. No No Enforced
FileIO Yes 5 GB Yes Optionally Fixed @ 1 No Yes
@jctosta
jctosta / screen_cheatsheet.markdown
Last active September 18, 2024 10:20
Screen Cheatsheet

Screen Quick Reference

Basic

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