I hereby claim:
- I am wpapper on github.
- I am wp (https://keybase.io/wp) on keybase.
- I have a public key whose fingerprint is 1F3D 6529 A56E FBAB 88A6 5D5C 3CB9 CC48 AE9B 33D7
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# Useful for when you want to simultaneously store a website in master and GitHub pages | |
# Copy this into /usr/bin/ with sudo | |
# Uncomment the cd line if you want to be able to invoke this script on a specific directory from anywhere | |
# cd /home/user/github-repo | |
git checkout gh-pages | |
git rebase master | |
git push origin gh-pages | |
git checkout master |
import os | |
# Specify the folder path containing the Markdown files | |
folder_path = "./path-goes-here" | |
# Specify the output file path | |
output_file = "concatenated_markdown.md" | |
# Get a list of Markdown files in the specified folder | |
markdown_files = [file for file in os.listdir(folder_path) if file.endswith(".md")] |
import os | |
# Specify the folder path containing the Markdown files | |
folder_path = "./path-goes-here" | |
# Specify the output file path | |
output_file = "concatenated_markdown.md" | |
# Open the output file in write mode | |
with open(output_file, "w") as outfile: |
import os | |
import mimetypes | |
# Specify the folder path containing the text files | |
folder_path = "./path-goes-here" | |
# Specify the output file path | |
output_file = "concatenated_text.txt" | |
# Open the output file in write mode |
import os | |
import mimetypes | |
import datetime | |
def is_text_file(file_path): | |
# First, try using mimetypes | |
mime_type, _ = mimetypes.guess_type(file_path) | |
if mime_type and mime_type.startswith('text/'): | |
return True | |