Skip to content

Instantly share code, notes, and snippets.

@plembo
plembo / RcloneMountOneDrive.md
Last active June 20, 2024 15:14
Rclone mount onedrive

Using rclone to mount OneDrive on Linux

Introduction

Yes. Use rclone to mount OneDrive to a folder in your home directory on Linux. "How to Mount OneDrive In Linux Using Rclone (Supports Business and Personal Accounts". Linux Uprising, 17 March 2020, https://www.linuxuprising.com/2018/07/how-to-mount-onedrive-in-linux-using.html.

I really like this solution. The availability of 1 Gb/s bandwidth (thank you, Google Fiber!) at home has made the difference for me. Although I currently have this set up on both my personal desktop and laptop, it obviously doesn't work as well outside the high bandwidth envelope of my home network.

Rclone is my weapon of choice because it has proven itself both stable and performant over the years. It also has many options to improve both, and the doc for rclone mount is excellent.

Procedure

@Bsebring
Bsebring / abuseipdb_block.py
Last active February 14, 2024 12:37
Python implementation of csf integration
#!/usr/bin/env python
import requests
import json
import sys
# Defining the api-endpoint
url = 'https://api.abuseipdb.com/api/v2/report'
ports = sys.argv[2]
inOut = sys.argv[4]
@HirbodBehnam
HirbodBehnam / tg.sh
Last active March 18, 2025 08:14
A dead simple script to upload files on your server through Telegram bot
#!/bin/bash
# This is a simple script that takes some files as arguments and sends them to a special chat
# Just create a new bot at @BotFather and get your chat ID from @myidbot and enter them here
# You can also make a shortcut in '~/.bashrc' like "alias tg='bash /opt/scripts/tg.sh'"
# After that restart bash and use it like 'tg file1.txt file2.jpg'
# EDIT TOKEN and CHAT_ID:
TOKEN="TOKEN"
CHAT_ID="12341234"
# Make sure curl is installed
for arg in "$@"
@greew
greew / README.md
Last active July 29, 2023 16:50
Fix Spotify stuck in full screen (Ubuntu) installed from snap

Problem: I experienced Spotify being stuck in full screen mode. The title bar with minimize, maximize and close wasn't present and no keyboard shortcut I know about would exit full screen.

Solution:

@mastier has improved the solution - see here

Solution (old):

@vikassaini01
vikassaini01 / gist:76b1d31f052ad1b95cb71988db9b3ffb
Created March 29, 2020 05:10 — forked from xboston/gist:6130534
php torrent seed+leeches http udp
<?php
class Torrent
{
public function scrape(array $announce = [ ] , $hash_info = null)
{
$r = [
'seeders' => 0 ,
'leechers' => 0
@nosmall
nosmall / qBittorrent with Web UI on Ubuntu 20.04 (lazy guide).md
Last active February 28, 2025 00:32
qBittorrent with Web UI on Ubuntu 20.04 (lazy guide)

qBittorrent with Web UI on Ubuntu 20.04 (lazy guide)

WARNING: this guide is not about security, but about functionality, for example, never run applications as root. Be cautious.

sudo su
add-apt-repository ppa:qbittorrent-team/qbittorrent-stable && \
apt install -y qbittorrent qbittorrent-nox
@yasinkuyu
yasinkuyu / cloudflare_bypass.php
Created November 2, 2020 11:39
PHP CURL function which bypasses the Cloudflare
<?php
/*
PHP CURL function which bypasses the Cloudflare
@yasinkuyu
*/
function cloudFlareBypass($url){
$useragent = "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/W.X.Y.Z‡ Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)";
@apolzek
apolzek / rmhash.sh
Last active March 31, 2022 14:31
Remove files with the same hash
# by: apolzek
md5sum * | sort -n > .file
filename='.file'
n=1
x=1
while read line; do
current_hash=$(echo $line | awk {'print $1'})
echo "[debugging] current_hash: $current_hash"
x=$(($n + 1))
FROM golang:1.16 AS build
WORKDIR /app
COPY . .
RUN env CGO_ENABLED=0 go build -o summer-host-storage main.go
FROM scratch
COPY --from=build /app/summer-host-storage /summer-host-storage
ENTRYPOINT ["/summer-host-storage"]
CMD ["-listen=:8000"]
This gist has moved to https://github.com/AndrewBreyen/Jellyfin-TV-Post-Process