Skip to content

Instantly share code, notes, and snippets.

@monperrus
monperrus / export-keepass-to-bitwarden-json.py
Last active April 27, 2025 01:01
Export KeePass KDBX (folders and passwords) to Bitwarden JSON
#!/usr/bin/python3
# Export KeePass folders and passwords to Bitwarden JSON
# The resulting JSON can be imported in Bitwarden, Nextcloud Passwords,
# or any password manager that supports the Bitwarden JSON format
#
# Prerequisites
# --------------
# pip3 install pykeepass
#
# Usage
@superseb
superseb / restore_rancher2_agents.md
Last active November 14, 2024 10:09
Restore Rancher 2 cluster/node agents on clusters

Restore Rancher 2 cluster/node agents on clusters

This is an unsupported scenario, see rancher/rancher#14731 when there is an official solution.

When cattle-cluster-agent and/or cattle-node-agent are accidentally deleted, or when server-url/cacerts are changed.

Generate definitions

  • Generate API token in the UI (user -> API & Keys) and save the Bearer token
  • Find the clusterid in the Rancher UI (format is c-xxxxx), its in the address bar when the cluster is selected
@jrichardsz
jrichardsz / bitbucket_json_webhook_push_payload.json
Last active June 29, 2022 20:37
Sample json Payload from Bitbucket WebHook
{
"push": {
"changes": [
{
"forced": false,
"old": {
"target": {
"hash": "80c4c8ec647a28073f06dd3cda61b6aefbb30c09",
"links": {
"self": {
@Evildethow
Evildethow / create-ssh-node.sh
Last active April 14, 2025 04:11
Jenkins: Create SSH node, using bash and curl
#!/usr/bin/env bash
set -o nounset -o errexit -o pipefail
usage() {
cat <<EOM
Usage:
$(basename $0) [OPTIONS]
$(basename $0) [ -j | --jenkins-url | -n | --node-name | -s | -d | --desc | --slave-home | -e | --executors | -sh | --ssh-host | -sp | --ssh-port
| -c | --cred-id | -l | --labels | -u | --user-id | -p | --password | -h | --help ]