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
bergercookie / trakt-backup.php
Created February 22, 2024 10:49 — forked from darekkay/trakt-backup.php
Trakt.tv backup script
<?php
/*
Backup script for trakt.tv (API v2).
Live demo: https://darekkay.com/blog/trakt-tv-backup/
*/
// create a Trakt app to get a client API key: http://docs.trakt.apiary.io/#introduction/create-an-app
$apikey = "CLIENT_API_KEY";
@bergercookie
bergercookie / AllGattCharacteristics.java
Created May 22, 2022 12:23 — forked from sam016/AllGattCharacteristics.java
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/meson.build b/data/meson.build
index 464ff3a..15d4ab2 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -70,19 +70,8 @@ fish_completion = configure_file(
configuration: conf_data
)
-bash_comp = dependency('bash-completion', required: false)
-if bash_comp.found()
@bergercookie
bergercookie / README.md
Created February 21, 2022 18:57 — forked from zoilomora/README.md
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • 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
bergercookie / stats-on-mins-and-secs.py
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
bergercookie / list-ppas.sh
Last active April 22, 2021 11:26
Script to get all the PPA installed on a system
#! /bin/sh
# Link: https://askubuntu.com/questions/148932/how-can-i-get-a-list-of-all-repositories-and-ppas-from-the-command-line-into-an
for APT in `find /etc/apt/ -name \*.list`; do
grep -o "^deb http://ppa.launchpad.net/[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
done
done
@bergercookie
bergercookie / ppa-purge
Created April 22, 2021 11:13
Version of ppa-purge with a way of skipping updating the packages on every run
#!/bin/bash
# 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)
PPA_PKGS=$(mktemp)
REVERTS=$(mktemp)
@bergercookie
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)
args=$@
function usage() {
@bergercookie
bergercookie / install_ros2.sh
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: https://index.ros.org/doc/ros2/Installation/Linux-Install-Debians/
set -e
# flags
INSTALL_OPTIONAL=1
USE_ROS1_PKGS=1 # additional packages for examples
INSTALL_BASHRC_LINE=1

Keybase proof

I hereby claim:

  • I am bergercookie on github.
  • I am bergercookie (https://keybase.io/bergercookie) on keybase.
  • I have a public key ASCxEtQVlL-1GkPKmucVZLWiESMMZetqFMRosyf1XPSqywo

To claim this, I am signing this object: