Skip to content

Instantly share code, notes, and snippets.

View jeliasson's full-sized avatar
👋

Johan Eliasson jeliasson

👋
View GitHub Profile
@subzero79
subzero79 / Clean source
Last active October 12, 2022 01:14
Sonarr post processing script to clean video files if the source is rar (packed) content
#!/bin/bash
#sonarr_episodefile_sourcefolder="/torrent/finish/tv-sonarr/Penny.Dreadful.S01E01.720p.HDTV.x264-2HD"
#sonarr_episodefile_sourcepath="/torrent/finish/tv-sonarr/Penny.Dreadful.S01E01.720p.HDTV.x264-2HD/penny.dreadful.s01e01.720p.hdtv.x264-2hd.mkv"
sonarr_label="tv-sonarr"
base_dir=$(basename $sonarr_episodefile_sourcefolder)
if [ "${base_dir}" == "${sonarr_label}" ];then
echo "Single file torrent"
@kentbrew
kentbrew / tiny-web-server.js
Created January 4, 2011 00:49
A tiny Web server, written in node.js
// hey, everybody! it's a tiny Web server!
// instead of a bunch of foo = reqire("foo")
// list our required modules and loop through
var r = [ "fs", "http", "mime", "path", "url" ];
for (var i = 0; i < r.length; i++) {
global[r[i]] = require(r[i]);
}
// some constants