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 | |
# toTelegram.bash is at https://gist.github.com/ypchen/66714ab493a645ac059fc7bd72aa4884 | |
#checkCommandPrefix='ping -c 1 -w 10' | |
#checkCommandSuffix='' | |
checkCommandPrefix='nc -z -w 10 -v' | |
checkCommandSuffix='22' | |
hostToCheck="ptt.cc" ; sleepSec=20 ; successValue=0 ; while true ; do date ; ip=`nslookup ${hostToCheck} | grep "Address" | tail -n 1 | cut -f 2 -d ' ' | tr -d '\n'` ; echo "Check ${hostToCheck} [${ip}] by using \"${checkCommandPrefix} ${ip} ${checkCommandSuffix}\"" ; ${checkCommandPrefix} ${ip} ${checkCommandSuffix} &> /dev/null ; if [ $? -eq $successValue ]; then break ; fi ; echo Sleep for ${sleepSec} seconds ; sleep ${sleepSec} ; done ; toTelegram.bash "${hostToCheck} is alive." &> /dev/null |
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
# Usage: copy & paste in the bash cli | |
# toTelegram.bash is at https://gist.github.com/ypchen/66714ab493a645ac059fc7bd72aa4884 | |
# Watch directly | |
WATCH_WORDS="WORDS_TO_WATCH" | |
SLEEP_SECS=120 | |
while true; do | |
if [ "`ls | grep \"${WATCH_WORDS}\"`" == "" ]; then | |
echo Current watch result: `ls | grep "${WATCH_WORDS}"` | |
echo Keep watching... sleep for ${SLEEP_SECS} seconds |
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 | |
if [ -z "${1}" ]; then | |
echo "${0}" "(URL-encoded)message" | |
exit 1 | |
fi | |
execute-gist.bash ff36d174f2412f75a3384b7d5aa97b1e "${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
#!/bin/bash | |
if [ -z "${1}" ]; then | |
echo "${0}" gist_hash [args... ] | |
fi | |
FILE_HASH="${1}" | |
shift | |
# default |
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 | |
# default | |
if [ -z ${CURL+x} ]; then | |
CURL="/usr/bin/curl" | |
fi | |
if [ -z ${ECHO+x} ]; then | |
ECHO="/usr/bin/echo" | |
fi | |
if [ -z ${CUT+x} ]; then |
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
def my_gist_hash (): | |
return '23e0c39ed3db348baaeef0829023d921' | |
def my_version (): | |
return '0.0.3-gist' |
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
def my_gist_hash (): | |
return '777febfcc310e7b1857d3f08433d3af4' | |
def my_version (): | |
return '0.0.2-gist' |
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
def my_gist_hash (): | |
return 'fe629efa7e8a60ff648896306f1318ce' | |
def my_version (): | |
return '0.0.1-gist' |
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
#EXTM3U | |
#EXTINF:0,TVBS 綜合台 | |
http://210.201.54.102:1935/live/tvbs_sp.sdp/playlist.m3u8|User-Agent=iPad | |
#EXTINF:0,TVBS 新聞台 | |
http://61.222.191.61/live/ch27/playlist.m3u8 | |
#EXTINF:0,八大第一台 | |
http://61.216.131.1/live/ch23/playlist.m3u8 | |
#EXTINF:0,八大綜合台 | |
http://61.216.131.1/live/ch25/playlist.m3u8 | |
#EXTINF:0,壹電視新聞台 |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- For kodi (v17 / v18) --> | |
<!-- 2019-0424 --> | |
<!-- ### custom keymaps for 'ID 1d57:ad02 Xenta SE340D PC Remote Control' ### --> | |
<!-- https://discourse.osmc.tv/t/ir-remote-using-cheap-usb-pc-remote-with-osmc/18695 --> | |
<!-- A: 389185; B: 389265; C: 389266; D: 389156; TAB: 61449; WIN: 2159104; ESC: 61647 --> | |
<!-- v18 - [WWW], [WIN] do not work on Raspberry PI 3 --> | |
<!-- [WWW], [ABCD], [MY PC], [DESKTOP] do not work on QNAP --> | |
<keymap> | |
<global> |