Skip to content

Instantly share code, notes, and snippets.

View Ghostbird's full-sized avatar

Gijsbert ter Horst Ghostbird

View GitHub Profile
2022-09-23 10:43:36,288 [OneDriveGUI.py:2709][fn=get_installed_client_version][DEBUG] - [GUI] Installed client version is 2420
2022-09-23 10:43:36,289 [OneDriveGUI.py:2744][fn=create_global_config][DEBUG] - [GUI] - loading default config {'onedrive': {'sync_dir': '"~/OneDrive"', 'skip_file': '"~*|.~*|*.tmp"', 'monitor_interval': '"300"', 'skip_dir': '""', 'log_dir': '"/var/log/onedrive/"', 'drive_id': '""', 'upload_only': '"false"', 'check_nomount': '"false"', 'check_nosync': '"false"', 'download_only': '"false"', 'disable_notifications': '"false"', 'disable_upload_validation': '"false"', 'enable_logging': '"false"', 'force_http_11': '"false"', 'local_first': '"false"', 'no_remote_delete': '"false"', 'skip_symlinks': '"false"', 'debug_https': '"false"', 'skip_dotfiles': '"false"', 'dry_run': '"false"', 'min_notify_changes': '"5"', 'monitor_log_frequency': '"5"', 'monitor_fullscan_frequency': '"10"', 'sync_root_files': '"false"', 'classify_as_big_delete': '"1000"', 'user_agent': '""', 'remove_source_files': '"
@Ghostbird
Ghostbird / add-repository
Last active October 9, 2023 17:05
Simple bash script to add apt keys + repositories in a better way than using apt-key. It is intended to make it easy to convert instructions online that still use apt-key, to the newer mechanism.
#!/bin/bash
# Simple script to add apt keys in a better way than using apt-key
# It is intended to make it easy to convert instructions online
# that still use apt-key, to the newer mechanism.
# Download from: https://gist.githubusercontent.com/Ghostbird/83eb5bcd2ffd4a6b6966137a2e1c4caf
# MIT LICENCE:
# Copyright © 2022 Gijsbert “Ghostbird” ter Horst
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIM
@Ghostbird
Ghostbird / build-ffmpeg-nvidia.sh
Last active April 25, 2024 02:46
Build FFMPEG with NVIDIA hardware accelleration libraries on Debian 12. Includes non-free libnpp!
#!/bin/bash
# Automatically compile and install FFMPEG with NVIDIA hardware acceleration on Debian 12
# Includes cuvid, cuda, nvenc, nvdec, and non-free libnpp
# Based on:
# https://www.tal.org/tutorials/ffmpeg_nvidia_encode
# https://developer.nvidia.com/blog/nvidia-ffmpeg-transcoding-guide/
# Abort on error
set -e
@Ghostbird
Ghostbird / pokemon-slots-android.sh
Created January 4, 2023 22:40
Automatically play the slot machine in Pokémon FireRed/LeafGreen (and maybe others) running on Android in an emulator.
#!/bin/sh
# Automatically play the slot machine in Pokémon FireRed/LeafGreen (and maybe others) running on Android in an emulator.
#
# REQUIREMENTS:
# - Android device with pokemon in suitable emulator e.g. John GBA / John GBAC
# - PC with:
# - POSIX compliant shell (duh)
# - adb installed and in PATH
#
#
@Ghostbird
Ghostbird / kdeconnect-share-to-only-device.nemo_action
Created September 13, 2023 08:10
Nemo action to send files to single available KDE connect paired device
# Put file in ~/.local/share/nemo/actions/ (single user) or /usr/share/nemo/actions/ (system install)
# Note: This will only work for a single connected KDE connect device.
[Nemo Action]
Active=true
Name=KDE Connect: Send file(s) to device
Comment=Send file(s) to the first found KDE Connect device.
Exec=sh -c 'kdeconnect-cli -d $( kdeconnect-cli --list-available --id-only ) --share %U && notify-send "File(s) transferred to $( kdeconnect-cli --list-available --name-only )" "$( for f in %F; do echo $f; done )" || notify-send "Failed to transfer, device may be offline" "$( for f in %F; do echo $f; done )"'
Icon-Name=kdeconnect
Selection=notnone
Extensions=any;
$ ./FreeCAD-0.21.2-Linux-x86_64_41d545329e0f040cf5f08885bf4ba84b.AppImage
(AppImageLauncher:1626793): dbind-WARNING **: 17:28:03.699: Couldn't connect to accessibility bus: Failed to connect to socket /root/.cache/at-spi/bus_0: Permission denied
FreeCAD 0.21.2, Libs: 0.21.2R33771 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2023
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
##### #### ### ####
# # # # # #
# ## #### #### # # # # #