Skip to content

Instantly share code, notes, and snippets.

@ad2ien
ad2ien / Gihub-scripts_accept_pr.sh
Last active January 5, 2023 07:24
Create a PR adding a file in several projects
#! /bin/bash
set -eu
BRANCH=''
ORG='okp4'
USER=ad2ien
REPOS=$(gh repo list ${ORG} --source --limit 150 --no-archived --json name --template '{{range .}}{{ .name }} {{end}}')
echo $REPOS
@ad2ien
ad2ien / distribute-Cosmos-wallets.sh
Last active September 5, 2022 06:50
Generate address / mnemonics CSV for a cosmos blockchain
#!/bin/bash
source .env
# create some wallets, strore address and mnemonics in a file
# use stargaze tool with airdrop_file
# distribute 0.5 Stars on each wallet
# make crypted files with mnemonics
# affect an email to each wallet
# send mails with attached mnemonics
@ad2ien
ad2ien / aliases.sh
Last active February 19, 2024 08:35
Station conf
alias pw="pwgen -cnyB1 16"
alias chx="chmod +x $1"
alias wgup="sudo wg-quick up /etc/wireguard/wg0.conf"
alias wgdown="sudo wg-quick down /etc/wireguard/wg0.conf"
alias dc="docker compose"
@ad2ien
ad2ien / signing-commits.sh
Created January 18, 2023 14:29
configure git and github to sign commits
#! /bin/bash
set -euo pipefail
# Interactively generate a new GPG key
gpg --default-new-key-algo rsa4096 --gen-key
# Get key id
KEY=$(gpg --list-secret-keys --keyid-format=long \
| grep '^sec.*$' \
@ad2ien
ad2ien / 1_gh-md-report.py
Last active June 26, 2024 15:17
A markdown Github report about closed issues
from datetime import datetime
from github import Github
start_date = datetime.strptime('2023-12-01', '%Y-%m-%d')
end_date = datetime.strptime('2023-12-01', '%Y-%m-%d')
project = 'org/repo'
output_file = './gh-report.md'
escaped_triple_backquotes = '\\```'