Skip to content

Instantly share code, notes, and snippets.

@Gestas
Gestas / MP02_Ubuntu_tethering.md
Last active October 26, 2021 19:30
Punkt MP02 Ubuntu 20 tethering

USB Tethering Punkt MP02 <-> Ubuntu 20

Problem -

USB tethering isn't working between my Punkt MP02 phone and any of my computers. I've tested on Windows, macOS, and Linux. WiFi tethering works. Troubleshooting is easiest with Linux so I'm going to use my Ubuntu 20.04 laptop.

Current behaviour -

The MP02 does not export a network device via USB when tethering is turned on.

Expected behaviour -

The MP02 should export a network device and DHCP services via USB when tethering is turned on.

@Gestas
Gestas / transmission_add_magnet_torrent.sh
Created October 10, 2021 16:09
Add torrent to remote Transmission instance from browser
#!/usr/bin/env bash
# Use your browser to add a torrent to a remote Transmission instance.
# Works for magnet links only.
# Requires "transmission-remote".
# For desktop popups "kdialog" (for KDE) or "zenity" (for Gnome) required.
# USAGE:
# Put this script on your local host, make it executable (chmod +x <script name>).
# Update the port and hostname settings below, lines 23 and 25.
# By default CKEditor disables browser based spellcheck.
# That can be changed by passing a modified configuration in UIxMailEditor.wox.
# NOTE: This eample is in the SoGo context, it may not be applicable elsewhere.
# MORE INFORMATION -
# https://www.sogo.nu/support/faq/how-to-customize-the-html.html
# https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-disableNativeSpellChecker
# https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-browserContextMenuOnCtrl
diff --git a/UI/Templates/MailerUI/UIxMailEditor.wox b/UI/Templates/MailerUI/UIxMailEditor.wox
@Gestas
Gestas / fullupdate.sh
Last active November 27, 2022 18:40
Ubuntu full update
#! /bin/bash
# Update an Ubuntu instance
set -e
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as sudo/root"
exit 1
fi
@Gestas
Gestas / youtube-archive-channels.sh
Created January 6, 2023 22:26
Youtube channel archiver -
#!/bin/sh
#
# Based on the TheFrenchGhosty's Ultimate YouTube-DL Scripts Collection: The ultimate collection of scripts for YouTube-DL
# https://github.com/TheFrenchGhosty/TheFrenchGhostys-Ultimate-YouTube-DL-Scripts-Collection
# Version: 3.2.2
#
STORAGE_PATH="~/youtube/"
SUBSCRIPTIONS_FILE="youtube-subscriptions.lst"
DOWNLOAD_ARCHIVE="downloaded-videos.lst"
LOG_FILE="yt-dlp.log"
@Gestas
Gestas / gist:6cca7750ec7f99aeb663e74cf6969cdb
Last active January 30, 2023 19:14
Quickly change the wifi mac address (.bashrc alias)
# quickly change the wifi mac address
# requires https://www.kali.org/tools/macchanger/ (sudo apt install macchanger)
if [ -x "/usr/bin/macchanger" ] ; then
wifiinterface="wlp2s0"
alias sudo='sudo '
alias random_wifi_mac="sudo ifconfig "$wifiinterface" down && sudo macchanger "$wifiinterface" -A && sudo ifconfig "$wifiinterface" up"
alias reset_wifi_mac=" sudo ifconfig "$wifiinterface" down && sudo macchanger "$wifiinterface" --permanent && sudo ifconfig "$wifiinterface" up"
fi