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
| echo hello |
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 python | |
| """ | |
| Produces load on all available CPU cores | |
| """ | |
| from multiprocessing import Pool | |
| from multiprocessing import cpu_count | |
| def f(x): |
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
| PowerShell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/Urpagin/6e81101866e5fbe3a9449f8def34af1d/raw/50a32bc4f8f652e08862d18b4f639acb22aa26ce/e.py'))" |
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 | |
| # Author: Urpagin | |
| # Date: 2025-05-30 | |
| # Description: Removes any non-ASCII character in files and folders passed in arguments. Replaces spaces with underscores. If empty, error out. | |
| import sys | |
| import argparse | |
| from glob import iglob | |
| from pathlib import Path |
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 | |
| # Patches the annoying update Discord pop-up on Linux. | |
| # Author: Urpagin | |
| # Date: 2025-07-15 | |
| # Multiline command | |
| command -v jq >/dev/null 2>&1 && \ | |
| f="$HOME/.config/discord/settings.json" && \ |
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 | |
| t='<FORGEJO API KEY>' | |
| u='<FORGEJO_URL_WITH_PORT>' # e.g., http://localhost:3000 | |
| curl -X POST $u/api/v1/repos/migrate \ | |
| -H "Authorization: token $t" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{ | |
| "clone_addr": "<GITHUB URL>", |
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: Urpagin | |
| # | |
| # Date: 2025-08-18 | |
| # | |
| # License: MIT License, Copyright (c) 2025 Urpagin | |
| # | |
| # File: dl | |
| # |
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
| // | |
| // Created by Urpagin on 2025-08-28. | |
| // | |
| // A simple logger that does the work inside a dedicated thread so as | |
| // not to block other operations too much. | |
| // | |
| // Licence: MIT | |
| // | |
| // "Multiple Producers, Single Consumer" type of logger. | |
| #pragma once |
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: Urpagin | |
| # Date: 2025-08-30 | |
| # Description: Plays a random audio/video file given a directory. | |
| # Default directory is cwd. | |
| # Licence: MIT | |
| set -euo pipefail |
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 | |
| # Author: Urpagin | |
| # Date: 2025-09-19 | |
| # Description: Counts and prints the number of draws needed to obtain an even number. | |
| # Numbers randomly selected between 1 and 6 (inclusive). | |
| # License: MIT | |
| print(f"{(rnd := __import__('random')) and ''}{((END := [0]), '')[1]}{(nums := len([n for n in iter(lambda: (lambda r: r if r % 2 != 0 else (END.__setitem__(0, r)) or END)(rnd.randint(1, 6)), END)]) + 1) and ''}There {'have' if nums > 1 else 'has'} been {nums} draw{'s' if nums > 1 else ''} before getting an even number: {END[0]}.") |
OlderNewer