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
| # === Disable Microsoft AutoUpdate (MAU) + OneDrive auto-update === | |
| # === macOS cheat sheet === | |
| # My profile: Mac only / Office 365 (Word, Excel, PPT, OneDrive) / Teams in browser | |
| # STEP 1: Add blocklist to /etc/hosts | |
| sudo vi /etc/hosts | |
| # Add this block: | |
| 127.0.0.1 officecdn.microsoft.com | |
| 127.0.0.1 officecdn.microsoft.com.edgesuite.net |
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 python3 | |
| import csv | |
| import logging | |
| from collections import Counter | |
| from pathlib import Path | |
| logging.basicConfig(level=logging.INFO) | |
| class CSVSquarer: |
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 sh | |
| HELP_MESSAGE="Usage: $(basename "$0") <file> | |
| Remove BOM (Byte Order Mark) sequence from a file. | |
| Arguments: | |
| <file> Input file to process | |
| Options: | |
| -h, --help Show this help message" |
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 python3 | |
| # noinspection PyUnresolvedReferences | |
| """ | |
| This script initializes and provides reusable constants and paths | |
| for various project subdirectories such as `src`, `config`, `data`, | |
| `tests`, and `logs`. It uses the `pathlib` library to construct | |
| platform-independent paths relative to the directory where this file resides | |
| (assumed to be the project root). | |
| Module Constants: |
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 python3 | |
| # Combine multiple CSV files into a single Excel workbook. | |
| import re | |
| from dataclasses import dataclass | |
| from pathlib import Path | |
| import pandas as pd | |
| from openpyxl import Workbook | |
| from openpyxl.workbook.views import BookView |
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 sh | |
| # Echo how many calendar days have passed between the REFERENCE_DATE and today. | |
| readonly REFERENCE_DATE='2025-01-01' | |
| readonly SECONDS_PER_DAY=86400 | |
| error_exit() { | |
| echo "$1" >&2 | |
| exit "${2:-1}" | |
| } |
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 python3 | |
| import json | |
| import os | |
| import shutil | |
| import subprocess | |
| from pathlib import Path | |
| class GPGJSONReaderError(Exception): |
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 python3 | |
| """ | |
| A class that provides a simplified interface for common GPG operations | |
| like encryption, decryption, signing, and key management. `GPGWrapper` | |
| """ | |
| from functools import wraps | |
| from pathlib import Path | |
| from typing import Optional, List, Dict, Any, Callable | |
| import gnupg |
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
| gitmsg () { | |
| read -r "type?Type (feat/fix/refactor/docs/test/chore/style): " | |
| read -r "desc?Description: " | |
| read -r "file?File name: " | |
| msg="${type}: ${desc} (${file})" | |
| echo "git commit -m '${msg}'" | |
| } |
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 python3 | |
| """ | |
| Add a fiscal year column to a CSV file based on dates, | |
| supporting both US and Japanese fiscal calendar systems. | |
| """ | |
| import argparse | |
| from datetime import datetime | |
| from pathlib import Path | |
| import pandas as pd |