Skip to content

Instantly share code, notes, and snippets.

[
{
"input_combination": [
{
"type": 1,
"code": 41,
"origin_hash": "3ec1d6855bcbfeb40a349959fe9c5b73"
}
],
"target_uinput": "keyboard",
@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 = '\\```'
@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 / aliases.sh
Last active October 22, 2024 18:48
Station conf
alias pw="pwgen -cnyB1 16 | tee /dev/tty | xclip -selection clipboard"
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"
# contained building tools
alias dmvn=\
'docker run -it --ulimit nofile=122880:122880 -m 3G --rm -v maven-repo:/root/.m2 -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven:3.3-jdk-8 mvn'
alias pandoc=\
'docker run --rm -v "$(pwd):/data" -u $(id -u):$(id -g) pandoc/core'
@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 / 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