Install watchdog
# pacman -S watchdog
>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
# configuration: github user(required), github token(optional) | |
token="" #https://developer.github.com/v3/guides/getting-started/#oauth | |
user="" | |
#test if user non-zero | |
[ -z "$user" ] && { | |
echo "fill user variable in configuration section" >&2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#M3U | |
#EXTINF:-0, CCTV - 93.185.113.36 - Italy | |
rtsp://93.185.113.36/live/ch00_0 | |
#EXTINF:-0, CCTV - 213.37.135.235 - Spain | |
rtsp://213.37.135.235/live/ch00_0 | |
#EXTINF:-0, CCTV - 88.26.221.17 - Spain | |
rtsp://88.26.221.17/live/ch00_0 | |
#EXTINF:-0, CCTV - 195.46.114.161 - Russian Federation | |
rtsp://195.46.114.161/live/ch00_0 | |
#EXTINF:-0, CCTV - 195.211.232.90 - Russian Federation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -f out | |
mkfifo out | |
trap "rm -f out" EXIT | |
while true | |
do | |
cat out | nc -w1 -l 1500 > >( # parse the netcat output, to build the answer redirected to the pipe "out". | |
export REQUEST= | |
while read line | |
do | |
line=$(echo "$line" | tr -d '[\r\n]') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* $Id: colorize.c 3816 2004-07-03 17:01:32Z lefevre $ | |
* | |
* Colorize the standard input. Written for zsh stderr coloring. | |
* This was taken from a mail archive on the subject of colorizing | |
* the stderr stream in zsh. It was written by Vincent Lefèvre as far | |
* as I know. It is here so it can be used in a brew formula. | |
* | |
* The intended usage is to place a line like the following in your zshrc | |
* exec 2>>(colorize `tput bold; tput setaf 1` `tput sgr0` > /dev/tty &) | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import shlex | |
import struct | |
import platform | |
import subprocess | |
def get_terminal_size(): | |
""" getTerminalSize() |