Skip to content

Instantly share code, notes, and snippets.

View Hosampor1's full-sized avatar
🎯
التركيز

Hosampor1

🎯
التركيز
View GitHub Profile
@ajhalili2006
ajhalili2006 / get_actions_secrets.py
Last active September 27, 2021 05:53
Get an specific Actions secret and send it as an Telegram message from an bot.
# 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)
@ajhalili2006
ajhalili2006 / RemoveCurlAndWgetAlias.ps1
Last active September 27, 2021 05:51 — forked from lfalck/RemoveCurlAlias.ps1
Remove the PowerShell alias curl/wget -> Invoke-WebRequest
# 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))