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");
@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 / sp
Created November 8, 2018 23:36 — forked from streetturtle/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/bin/bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@bergercookie
bergercookie / setup-franz-ubuntu.sh
Last active January 6, 2018 13:08 — forked from ruebenramirez/setup-franz-ubuntu.sh
setup franz on ubuntu
#!/bin/bash
sudo rm -fr /opt/franz
sudo rm -fr /usr/share/applications/franz.desktop
# create installation dir
sudo mkdir -p /opt/franz
#install franz
@bergercookie
bergercookie / setup.md
Created September 14, 2017 19:21 — forked from chris-jamieson/setup.md
Set up Franz for Ubuntu
  • Download Franz for your distribution from MeetFranz.com
  • change into the same directory as the downloaded file, then sudo tar -xf Franz-linux-x64-0.9.10.tgz -C /opt/franz
  • (optional) wget "https://cdn-images-1.medium.com/max/360/1*v86tTomtFZIdqzMNpvwIZw.png" -O franz-icon.png then sudo cp franz-icon.png /opt/franz
  • (optional) sudo touch /usr/share/applications/franz.desktop then sudo vim /usr/share/applications/franz.desktop

paste the following lines into the file, then save the file:

[Desktop Entry]
Name=Franz
Comment=
_drive()
{
COMPREPLY=()
local cur prev cmd cmds files flags
cur="${COMP_WORDS[COMP_CWORD]}"
pre="${COMP_WORDS[COMP_CWORD-1]}"
cmds="about clashes copy cp deinit del delete diff du edit-desc edit-description emptytrash features file-id help id index init issue list ls md5sum move mv new open pub pull push qr quota rename report repor"
files="del delete diff edit-desc edit-description file-id id new open pub pull push rename share star stat unpub unshare untrash url"
if [ $COMP_CWORD -eq 1 ]; then