Skip to content

Instantly share code, notes, and snippets.

View typomedia's full-sized avatar

Philipp Speck typomedia

View GitHub Profile
@typomedia
typomedia / ffmpeg.h264.sh
Last active December 21, 2015 10:29
FFMPEG Transcoder Script
#!/bin/sh
# Copyright 2014 Typomedia Foundation. All rights reserved.
# Released under GPL version 3.
#
# FFMPEG Transcoder Script v1.2
EXEC=/usr/bin/ffmpeg
INPUT=/mnt/media/Movies
FTYPE=*.rip.mkv
SUFFIX=.h264.mkv
@typomedia
typomedia / init.btsync.sh
Last active December 21, 2015 10:29
BitTorrent Sync Init Script
#!/bin/sh
### BEGIN INIT INFO
# Provides: btsync
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: BitTorrent Sync
# Description: Automatically sync files via secure, distributed technology
# Author: Typomedia Foundation
@typomedia
typomedia / init.plex.sh
Last active March 24, 2017 09:57
Plex Media Server Init Script
#!/bin/sh
### BEGIN INIT INFO
# Provides: plexmediaserver
# Required-Start: $remote_fs $syslog $all
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Plex Media Server
# Description: Plex is a smart Media Server application for playing Music, Movies and other media
# Author: Typomedia Foundation
@typomedia
typomedia / rsync.backup.sh
Last active December 22, 2015 14:18
Rsync Remote Backup Script
#!/bin/sh
# Copyright 2013 Typomedia Foundation. All rights reserved.
# Use is subject to license terms.
#
# Rsync Backup Script v1.3
EXEC=/usr/bin/rsync
SOURCEPATH=/mnt/dpool
DIRECTORIES=( media share works )
EXCLUDELIST=/etc/scripts/rsync.exclude.list
@typomedia
typomedia / rsync.exclude.list
Last active December 22, 2015 15:28
Rsync Exclude List Sample
# /etc/default/rsync.exclude.list
# Copyright 2013 Typomedia Foundation. All rights reserved.
# Use is subject to license terms.
#
# Rsync Exclude List v1.0
#/boot
/cdrom
/dev
/lost+found
@typomedia
typomedia / mail.zfs.status.sh
Last active December 22, 2015 15:29
ZFS Status Report Mailer
#!/bin/sh
# Copyright 2013 Typomedia Foundation. All rights reserved.
# Released under GPL version 3.
#
# ZFS Status Report Mailer v1.2
mailx -t \
<<EOF
MIME-Version: 1.0
FROM:Fileserver <server@domain.tld>
@typomedia
typomedia / mail.newfiles.vbs
Last active December 23, 2015 06:19
This Visual Basic script sends an email if it finds files in a specific folder or subfolder which are newer than x minutes.
' Copyright 2013 Typomedia Foundation. All rights reserved.
' Released under GPL version 3.
'
' VBS New Files Mailer v1.0
' Send a mail if files of a specific dir are newer than x minutes
Const strPath = "C:\foo\bar" 'or \\SERVER\foo\bar
Const intMin = 120 'Minutes
Set fso = CreateObject("Scripting.FileSystemObject")
@typomedia
typomedia / Roundcube.schema
Last active December 27, 2015 20:49
OpenLDAP Object Class for Roundcube
# Roundcube.schema is from <http://www.typomedia.org/>.
#
# Copyright 2013 Typomedia Foundation.
# All rights reserved.
#
# This schema is released under GPL version 3.
#
# OpenLDAP schema for Roundcube Webmail v1.4
objectIdentifier RoundcubeRoot 1.3.6.1.4.1.42766.4.2
@typomedia
typomedia / restart.mysql.sh
Last active December 29, 2015 14:19
MySQL Auto Restart Script
#!/bin/sh
# Copyright 2013 Typomedia Foundation. All rights reserved.
# Released under GPL version 3.
#
# MySQL Auto Restart Script v1.0
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DBHOST=localhost
DBUSER=root
PASSWORD=********
@typomedia
typomedia / openvpn.xml
Created December 7, 2013 19:03 — forked from mattconnolly/openvpn.xml
OpenVPN SMF Manifest
<?xml version="1.0" ?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="export">
<service name="network/openvpn" type="service" version="0">
<create_default_instance enabled="true"/>
<single_instance/>
<dependency name="fs" grouping="require_all" restart_on="none" type="service">
<service_fmri value="svc:/system/filesystem/local"/>
</dependency>
<dependency name="net" grouping="require_all" restart_on="none" type="service">