Skip to content

Instantly share code, notes, and snippets.

View bergercookie's full-sized avatar
How much wood would a woodchuck chuck if a woodchuck could chuck wood?

Nikos Koukis bergercookie

How much wood would a woodchuck chuck if a woodchuck could chuck wood?
View GitHub Profile
bergercookie /
Last active July 1, 2024 07:32
Mealie automatic backups script
#!/usr/bin/env bash
# This script is used to backup mealie data from a mealie server instance to a
# local directory.
# It will request a backup to be created in the server and it will then request
# its download.
# Usage: [server_addr] [backup_dir] [username] [password]
# server_addr: The address:port of the mealie server instance.
bergercookie / trakt-backup.php
Created February 22, 2024 10:49 — forked from darekkay/trakt-backup.php backup script
Backup script for (API v2).
Live demo:
// create a Trakt app to get a client API key:
$apikey = "CLIENT_API_KEY";
bergercookie /
Created May 22, 2022 12:23 — forked from sam016/
Bluetooth GATT Services & Characteristics
package com.sam016.vsflatomation.service.ble;
import java.util.HashMap;
import java.util.UUID;
public class AllGattCharacteristics {
private static HashMap<String, String> attributes = new HashMap();
static {
attributes.put("00002a00-0000-1000-8000-00805f9b34fb", "Device Name");
diff --git a/data/ b/data/
index 464ff3a..15d4ab2 100644
--- a/data/
+++ b/data/
@@ -70,19 +70,8 @@ fish_completion = configure_file(
configuration: conf_data
-bash_comp = dependency('bash-completion', required: false)
-if bash_comp.found()
bergercookie /
Created February 21, 2022 18:57 — forked from zoilomora/
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu


  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

bergercookie /
Created September 15, 2021 16:46
Compute stats for time-data returned from the time shell command
#!/usr/bin/env python3
import argparse
import operator
import sys
from enum import Enum
from functools import cached_property, reduce
from pathlib import Path
from typing import List
bergercookie /
Last active April 22, 2021 11:26
Script to get all the PPA installed on a system
#! /bin/sh
# Link:
for APT in `find /etc/apt/ -name \*.list`; do
grep -o "^deb[a-z0-9\-]\+/[a-z0-9\-]\+" $APT | while read ENTRY ; do
USER=`echo $ENTRY | cut -d/ -f4`
PPA=`echo $ENTRY | cut -d/ -f5`
echo ppa:$USER/$PPA
bergercookie / ppa-purge
Created April 22, 2021 11:13
Version of ppa-purge with a way of skipping updating the packages on every run
# A script to remove all packages in a PPA and revert back to the normal
# distribution ones.
# AUTHORS: Robert Hooker (Sarvatt), Tormod Volden
# Defaults
F_ARCHS=$(dpkg --print-foreign-architectures)
bergercookie / mvip
Last active September 25, 2020 22:03
mv-in-place a file, keep it under the same directory - change just the basename
#!/usr/bin/env bash
# Change the name of a file without having to specify its full path from
# scratch. Instead specify only the modified filename, and keep it under the
# same parent directory.
name=$(basename $0)
function usage() {
bergercookie /
Last active April 11, 2019 09:39
Bash script for installing ROS2 binary packages on Ubuntu 16.04 / Ubuntu 18.04
#!/usr/bin/env bash
# Instructions:
set -e
# flags
USE_ROS1_PKGS=1 # additional packages for examples