Skip to content

Instantly share code, notes, and snippets.

#/bin/sh
apt-get update
apt-get install firefox-esr xfce4 xfce4-goodies gnome-icon-theme tightvncserver -y
cd /etc/init.d/
wget https://gist.githubusercontent.com/Domin8-IPTV/efcf0a118b6eab7a5461e4afab608437/raw/d926bdfb4f802e53b97e9c4b74552874397fa1a7/vncserver && chmod +x vncserver
systemctl daemon-reload
systemctl enable vncserver
vncserver
@Domin8-IPTV
Domin8-IPTV / letv-nginx.sh
Last active February 16, 2019 00:53
nginx letv rp
#!/bin/bash
#
# MAUNDYS LETV with lets encrypt config setup
#
if [ "$(id -u)" != "0" ]; then
echo "This script requires root privileges."
exit 1
fi
@Domin8-IPTV
Domin8-IPTV / composer.sh
Last active February 27, 2019 11:04
compser install
#!/bin/sh
EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
#!/usr/bin/env python
import sys
import urllib2
import codecs
from contextlib import closing
class Track:
def __init__(self, length, title, path):
self.length = length
#!/bin/bash
#
# APACHE2 INSTALL
#
sudo apt-get install apache2
apt-get install mcrypt
apt-get install curl
apt-get install php5-curl
apt-get install php5-mcrypt
apt-get update
#!/usr/bin/env python
#
# CloudFlare DDNS script.
#
# usage:
# cloudflare_ddns.py [config]
#
# See README for details
#
@Domin8-IPTV
Domin8-IPTV / web.sh
Created April 19, 2019 21:59
ubuntu install LAMP phpMyAdmin nodejs and SSL with Let's Encrypt
#!/bin/bash
#
read -p 'Set Web Directory (Example: /var/www/html) ' directory
read -p 'Set Web Domain (Example: 127.0.0.1 [Not trailing slash!]) ' domain
#
sudo apt-get update && sudo apt-get upgrade
sudo apt update && sudo apt dist-upgrade && sudo apt autoremove -y
sudo apt-get install default-jdk -y
sudo apt-get install software-properties-common -y
sudo apt-get install python-software-properties -y
@Domin8-IPTV
Domin8-IPTV / make247.sh
Created May 23, 2019 17:11
ffmpeg concatenate all media files in the current directory with .mp4 extension
#!/bin/sh
# use ffmpeg to concatenate all the mp4 files in the media directory
# make file executable and run like this
# ./make247.sh /path/to/media/folder
#
IN_DIR="$1";
if [ "$IN_DIR" = '' ] ; then
IN_DIR="."
fi
for f in ${IN_DIR}/*.mp4; do echo "file '$f'" >> concat-list.txt; done
@Domin8-IPTV
Domin8-IPTV / ffmpeg2mp4.php
Created May 23, 2019 17:14
use ffmpeg to convert all media files in directory to mp4
<?php
/**
* cd into folder with video files and run:
* php /path/to/ffmpeg2mp4.php mp4
*/
class Transcoder{
protected static $ffmpeg='ffmpeg';
@Domin8-IPTV
Domin8-IPTV / vod2hls.sh
Created June 17, 2019 20:34
create hls live stream from files
#!/bin/bash
# Change this to path of file to stream /edit/to/vod/path.mp4
mediaFile="/edit/to/vod/path.mp4"
### 480x video400kbps audio40kbps ###
mediaStreams="-map 0"
audCodec="-acodec mp2"
audKbps="-b:a 40k"