Skip to content

Instantly share code, notes, and snippets.

View Tyrrrz's full-sized avatar
🇺🇦
Fuck russia 🖕

Oleksii Holub Tyrrrz

🇺🇦
Fuck russia 🖕
View GitHub Profile
@Tyrrrz
Tyrrrz / Remove-Issues.ps1
Created June 22, 2023 18:07
GitHub CLI script to delete all issues by a user
gh auth login --web
$repo = "" # set repo here
$author = "" # set author here
$issues = gh issue list --repo $repo --author $author --limit 1000 --json number,author,title | ConvertFrom-Json
foreach ($issue in $issues) {
$issueNumber = $issue.number
$issueAuthor = $issue.author.login
@Tyrrrz
Tyrrrz / Remove-Forks.ps1
Created May 26, 2023 12:00
GitHub CLI script to delete all forks
gh auth login --web
$owner = "" # leave empty for current user
$repos = gh repo list $owner --fork --json nameWithOwner | ConvertFrom-Json
foreach ($repo in $repos) {
$repoName = $repo.nameWithOwner
Write-Host "Deleting repository: $repoName..."
Read-Host -Prompt "Press ENTER to confirm..."
@Tyrrrz
Tyrrrz / Start-ChromeTempProfile.ps1
Created September 26, 2022 20:44
Start Google Chrome with a disposable profile
$profileDirPath = New-TemporaryFile | %{ Remove-Item $_; New-Item -ItemType Directory $_ }
Start-Process "c:/Program Files/Google/Chrome/Application/chrome" -ArgumentList "--user-data-dir=$profileDirPath" -Wait
Remove-Item $profileDirPath -Recurse -Force