#!/bin/bash
branches=$(git branch --all | grep -v HEAD) &&
branch=$(echo "$branches" |
fzf -d $(( 2 + $(wc -l <<< "$branches") )) +m) &&
git checkout $(echo "$branch" | sed "s/.* //" | sed "s#remotes/[^/]*/##")
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
{} |
Logrotate is a powerful utility designed to manage and automate the rotation, compression, removal, and mailing of log files. This comprehensive guide covers all essential aspects of logrotate to help you effectively manage system logs.
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
#!/bin/bash | |
# Configuration | |
GITEA_REPO="username/repository" | |
GITEA_API_TOKEN="your_gitea_api_token" | |
GITHUB_REPO="username/repository" | |
GITHUB_API_TOKEN="your_github_api_token" | |
GITEA_API_URL="https://your_gitea_instance/api/v1" | |
GITHUB_API_URL="https://api.github.com" | |
ISSUE_FILE="gitea_issues.json" |
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
$to = "user1@email.com,user2@email.com" # comma separate multiple recipients | |
$from = "sender@email.com" | |
$subject = "subject goes here" | |
$body = "message body goes here" | |
$smtpServer = "smtp.gmail.com" | |
$smtpClient = New-Object Net.Mail.SmtpClient($smtpServer, 587) # port 25 for non SSL, port 587 for SSL | |
$smtpClient.EnableSsl = $true # set to $true for SSL |