Skip to content

Instantly share code, notes, and snippets.

@auipga
auipga / rslsync-ufw.sh
Created May 13, 2017 04:55
Help configuring ufw for Resilio Sync (rslsync)
#!/bin/bash
# Author: https://gist.github.com/auipga/
# Based on:
# Sync (outdated?): https://kb-archive.getsync.com/kbs/1.3.5/kb/hc/en-us/articles/210153106-Ports-and-protocols-used-by-Resilio-Connect.html
# Resilio Connect: https://help.getsync.com/hc/en-us/articles/204754759-What-ports-and-protocols-are-used-by-Sync-
# todo: read sync.conf from resilio server, parse json, fill IPs dynamically
# todo: delete duplicate rules as 'host' returns multiple IPs for resilios domains
@auipga
auipga / iperf3.service
Last active April 6, 2024 00:21 — forked from mmasaki/iperf.service
systemd service unit for iperf3
# /etc/systemd/system/iperf3.service
# User service: $HOME/.config/systemd/user/iperf3.service
[Unit]
Description=iperf3 server
After=syslog.target network.target auditd.service
[Service]
ExecStart=/usr/bin/iperf3 -s
@auipga
auipga / titaniumbackup-btsync-cleaner.sh
Created January 11, 2017 14:37
This script helps you to (re)move old TitaniumBackup files when you backup its folder using btsync/Bittorrent Sync/rslsync/Resilio Sync. It keeps the latest 1 backup, older backups will be moved somewhere else.
#!/bin/bash
# remove old backups keeping only the latest one
# run this script only in your TitaniumBackup folder !!!
# create this folder first!
target=old
# pipe|separated|list
exclude="this.is.an.example.org.mozilla.firefox"
# | get app IDs
@auipga
auipga / git-phpstorm-emblems.sh
Last active March 13, 2017 23:25
Set nice emblems for folders containing .git, .idea or .sync folders
#!/bin/bash
# set some emblems
# currently supported:
# * phpstorm
# * git
# * rslsync (Resilio Sync / Bittorrent Sync / btsync)
# check parameters
if [ -z "$1" ]; then
echo "Missing parameter <type>.";