This file contains 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
# Step 1: Configure our argument parser. | |
import argparse | |
parser = argparse.ArgumentParser( | |
formatter_class=argparse.ArgumentDefaultsHelpFormatter, | |
description='Simple Python script to get your hidden CI tokens to an private Telegram chat.' | |
) | |
# Step 2: Add arguments needed | |
parser.add_argument("--bot-token", help="Telegram Bot API token, generated with BotFather.", required=True, default="123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11") | |
parser.add_argument("--client-id", help="Telegram API client ID, generated from https://my.telegram.org/apps", type=int, required=True, default=87528) |
This file contains 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
# Originally forked from https://gist.github.com/lfalck/fbb04ef438b521064e0c5742bcd28c2f, I just added | |
# another Remove-Item for wget, because I'm not a fan of Invoke-WebRequest | |
$removeCurlAlias = @" | |
# Remove Alias curl -> Invoke-WebRequest | |
Remove-Item alias:curl | |
Remove-Item alias:wget | |
"@ | |
if (-Not (Test-Path $Profile)) |