Skip to content

Instantly share code, notes, and snippets.

View vdupain's full-sized avatar

ⓥⓘⓝⓒⓔ⑨ⓟⓐⓡⓐ vdupain

View GitHub Profile
@vdupain
vdupain / rrdbackup
Created September 22, 2023 12:22 — forked from tmkasun/rrdbackup
OpenWrt /etc/init.d/ script to backup and restore the rrd (collectd) database, to preserve data across reboots
#!/bin/sh /etc/rc.common
# OpenWrt /etc/init.d/ script to backup and restore the rrd (collectd) database, to preserve data across reboots
#
#
# howto:
# - upload this file as /etc/init.d/rrdbackup
# - (optional) adjust BACKUP_DIR below to point to a different target directory for the backup (e.g., a USB drive)
# - # chmod +x /etc/init.d/rrdbackup
# - # /etc/init.d/rrdbackup enable
#!/bin/bash
set -e
TOKEN=xxx
AUTH="Basic $(echo -n $TOKEN: | base64)"
SONARAPI="http://sonarqube/api"
for projKey in $(curl -s -X GET $SONARAPI/projects/search -H "Authorization: $AUTH" | \
jq -r '.components[].key')
@vdupain
vdupain / cleanrepo.sh
Created December 8, 2022 10:13 — forked from legege/cleanrepo.sh
Intelligently clean a Sonatype Nexus repository... keep the last 2 released versions of each "major.minor" artifact
#!/bin/bash
DRY_RUN=1
if [ "$1" != "" ]; then
DRY_RUN="$1"
fi
MAX_VERSION=2
if [ "$2" != "" ]; then
MAX_VERSION="$2"
fi
@vdupain
vdupain / _Jenkins+Script+Console.md
Created July 8, 2022 08:10 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
@vdupain
vdupain / proxvm.sh
Created February 14, 2022 18:15 — forked from huksley/proxvm.sh
Get list of all virtual machines on proxmox 4+, both LXC and QEMU and detect IP addresses
#!/bin/bash
# proxvm
# Output in specifed format (default csv) all virtual machines on proxmox 4+
SERVER=localhost
USERNAME=apiread@pve
PASSWORD=123456
FORMAT=csv
while [[ $# > 0 ]]; do
key="$1"