Skip to content

Instantly share code, notes, and snippets.

View grenade's full-sized avatar

rob thijssen grenade

View GitHub Profile
grenade /
Last active June 13, 2024 11:03
create gnome wallpaper with different random images for each screen
#!/usr/bin/env bash
# usage: curl -sLH 'Cache-Control: no-cache, no-store' | bash
grenade /
Last active November 5, 2023 11:29
set all wifi connections to use cloudflare dns
for line in $(nmcli --fields UUID,TYPE,NAME connection show); do
conn_uuid=$(echo ${line} | cut -d ' ' -f 1)
conn_type=$(echo ${line} | cut -d ' ' -f 3)
conn_name=$(echo ${line} | cut -d ' ' -f 4- | xargs)
if [ "${conn_type}" = "wifi" ]; then
echo "name: $(tput bold)${conn_name}"
echo "$(tput dim)uuid: ${conn_uuid}, type: ${conn_type}"
nmcli connection modify ${conn_uuid} ipv4.dns ","
grenade /
Last active May 12, 2023 13:27
migrate and sync a live mongo database to a new cluster deployment


a systemd service for migrating a live atlas cluster to a self-hosted cluster

coyote uses mongodump and mongorestore to perform:

  • a point in time restore (pitr) of a live source cluster to a new target cluster
  • subsequent source operation log replays on the target, in perpetuity, to keep target synced with source until the source goes offline
grenade /
Created February 7, 2023 08:37
install mongodb compass 1.35 on fedora 37
#!/usr/bin/env bash
# usage: curl -sL | bash
sudo curl -Lo /etc/yum.repos.d/mongodb.repo
sudo dnf update
sudo dnf install mongodb-mongosh mongodb-database-tools mongodb-org-tools
sudo dnf install
"бг": {
"аз вземам": {
"аз": "аз ще взема",
"ти": "ти ще вземеш",
"той": "той ще вземе"
"en": {
bg en
Аз вземам I take
Аз ще взема I will take
Ти ще вземеш You will take
Той ще вземе He will take
auth_enabled: false
http_listen_port: 3100
grpc_listen_port: 9096
# path_prefix: /tmp/loki
# storage:
# filesystem:
grenade /
Last active November 30, 2023 15:00
fetch aws ec2 pricing data for on-demand, license free, instances
#!/usr/bin/env bash
# usage: curl -sL | bash
# csv filenames
grenade / dns-ip-sync.service
Last active February 7, 2024 07:21
diy dynamic dns - sync cloudflare domain name with dynamic ip address every 60 seconds
Description=dns ip sync
ExecStartPre=curl \
--silent \
grenade /
Created December 16, 2021 06:29
generate pragmatic passwords that are also secure

add to ~/.bashrc to have a password generator that:

  • removes problematic characters
  • always starts and ends with an english alphabet character
  • is of configurable length
pwg() {
  case ${1} in
    ''|*[!0-9]*) password_length=12 ;;
    *) password_length=${1} ;;