View transcode.sh
#!/bin/sh
INPUT=$1
FILENAME=${INPUT%.*}
ffmpeg -threads 4 \
-init_hw_device vaapi=fallback:/dev/dri/renderD128 \
-hwaccel vaapi \
-hwaccel_output_format vaapi \
-hwaccel_device fallback -i "${INPUT}" \
-filter_hw_device fallback \
View nginx.conf
user http;
worker_processes 1;
events {
worker_connections 1024;
multi_accept on;
use epoll;
}
http {
View retrieve.py
import libtorrent as lt
import time
import json
def write_file(filename, contents):
file = open(filename, 'w')
file.write(contents)
file.close()
def add_torrent(session, filename, options):
View INSTALL
Install the `mod_fcgid` and `php-cgi` packages.
# mkdir /srv/http/fcgid-bin
# ln -s /usr/bin/php-cgi /srv/http/fcgid-bin/php-fcgid-wrapper
# mkdir /srv/http/fcgid55-bin
# ln -s /usr/bin/php55-cgi /srv/http/fcgid55-bin/php-fcgid-wrapper
Restart `httpd.service`
View generator.php
<?php
/*
* Your settings here
*/
define('DB_DSN', 'mysql:host=localhost;dbname=mydb;charset=UTF8');
define('DB_USER', 'myuser');
define('DB_PASS', 'mypass');
define('DB_TABLE', 'mytable');
define('DB_OPTIONS', [
View mnt-device-export.mount
[Unit]
Description=Mount Export at boot
Requires=network-online.target
After=network-online.target
[Mount]
What=device.home.lan:/srv/nfs4/export
Where=/mnt/device/export
Options=noauto,x-systemd.automount,noatime,vers=4,rsize=8192,wsize=8192
Type=nfs
View dvb_core.conf
options dvb_core dvb_powerdown_on_sleep=0 dvb_shutdown_timeout=0 dvb_demux_tscheck=0 dvb_demux_speedcheck=0
View smb.conf
[global]
workgroup = WORKGROUP
server string = %h Samba Server
wins support = no
dns proxy = no
map to guest = bad user
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
View 98-smargo.rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", GROUP="video", MODE="0660", SYMLINK+="smargo"
View form.html
<form id="myForm">
<div class="form-group">
<label for="title">Title</label>
<input type="text" name="title" class="form-control" id="title" placeholder="Title">
</div>
<div class="form-group">
<label for="description">Description</label>
<textarea id="description" name="description" class="form-control" rows="3"></textarea>
</div>
</form>