Skip to content

Instantly share code, notes, and snippets.

@g-r-a-v-e-l-y
g-r-a-v-e-l-y / move-torrent-files-folder-action.applescript
Last active November 4, 2022 18:56
An applescript folder action that moves downloaded torrent files to a different directory.
on adding folder items to thisFolder after receiving added_items
mount volume "afp://user@host/share"
delay 1
repeat with addedFile in added_items
tell application "Finder"
if (the name of the addedFile ends with "torrent" or "nzb") then
display notification "Queueing " & (name of addedFile) & "."
try
tell application "Finder"
move addedFile to "spool" with replacing
@hugoboos
hugoboos / trakt-remove-history.js
Created February 14, 2015 12:14
Remove history from Trakt
// Run in console on the history page (http://trakt.tv/users/<username>/history)
// Will remove all the items, on that page, from the watched history.
$(".posters .grid-item").each(function(){
var $this = $(this);
historyRemove($this, $this.data("history-id"));
})
@hjbotha
hjbotha / free_ports.sh
Last active November 17, 2024 08:58
Free ports 80 and 443 on Synology NAS
#! /bin/bash
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION
# Developed for DSM 6 - 7.0.1. Not tested on other versions.
# Steps to install
# Save this script in one of your shares
# Edit it according to your requirements
# Backup /usr/syno/share/nginx/ as follows:
# # cd /usr/syno/share/
# # tar cvf ~/nginx.tar nginx
@movd
movd / emails_from_ubuntu.md
Created June 6, 2019 11:02
Set up msmtp to send emails emails from Ubuntu/Debian Servers

Setting up email with SMTP on Ubuntu/Debian Servers

I used to sift trough my shell history and bookmarks every time I set up a new testing server in order to be able to send mails. So this should help...

Be aware don't use ssmtp anymore. It's unmaintained and has been removed from Debian and Ubuntu will most definitely follow suit.

Install msmtp