This file contains hidden or 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
You can represent time statements in most western languages where | |
a prefix and/or suffix is used. | |
The default case is to use suffix only (as in English), which you | |
do by providing the `suffixAgo` and `suffixFromNow` settings in | |
the strings hash (earlier versions of timeago used the deprecated | |
`ago` and `fromNow` options). If present, they are used. | |
2 minutes [suffixAgo] | |
2 minutes [suffixFromNow] |
This file contains hidden or 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
{ | |
"AF": "Afghanistan", | |
"AL": "Albania", | |
"DZ": "Algeria", | |
"AS": "American Samoa", | |
"AD": "Andorra", | |
"AO": "Angola", | |
"AI": "Anguilla", | |
"AQ": "Antarctica", | |
"AG": "Antigua and Barbuda", |
This file contains hidden or 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/sh | |
GEOIP_CSV="https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip" | |
TMPDIR=$(/bin/mktemp -d /tmp/geoipupdate.XXXXXXXXXX) | |
/usr/bin/wget "${GEOIP_CSV}" -O "${TMPDIR}/GeoLite2-Country-CSV.zip" | |
/usr/bin/unzip -j -o -d ${TMPDIR} ${TMPDIR}/GeoLite2-Country-CSV.zip | |
/bin/mkdir -p /usr/share/xt_geoip | |
/usr/bin/perl /usr/lib/xtables-addons/xt_geoip_build -D /usr/share/xt_geoip -S ${TMPDIR} | |
[ -d "${TMPDIR}" ] && /bin/rm -rf $TMPDIR |
This file contains hidden or 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 | |
mkdir ts | |
mkdir ts/640x360 | |
mkdir ts/960x540 | |
mkdir ts/1280x720 | |
./ffmpeg -y -i input.mp4 -c:a aac -strict experimental -ac 2 -b:a 96k -ar 44100 -c:v libx264 -pix_fmt yuv420p -profile:v baseline -level 3.1 -maxrate 1M -bufsize 3M -crf 18 -r 25 -g 72 -f hls -hls_time 9 -hls_list_size 0 -s 640x360 -hls_segment_filename 'ts/640x360/segment%02d.ts' ts/640x360/prog_index.m3u8 | |
./ffmpeg -y -i input.mp4 -c:a aac -strict experimental -ac 2 -b:a 96k -ar 44100 -c:v libx264 -pix_fmt yuv420p -profile:v main -level 3.1 -maxrate 2M -bufsize 4M -crf 18 -r 25 -g 72 -f hls -hls_time 9 -hls_list_size 0 -s 960x540 -hls_segment_filename 'ts/960x540/segment%02d.ts' ts/960x540/prog_index.m3u8 | |
./ffmpeg -y -i input.mp4 -c:a aac -strict experimental -ac 2 -b:a 96k -ar 44100 -c:v libx264 -pix_fmt yuv420p -profile:v main -level 3.1 -maxrate 3M -bufsize 6M -crf 18 -r 25 -g 72 -f hls -hls_time 9 -hls_list_size 0 -s 1280x720 -hls_segment_filename 'ts/1280x720/segment%02d.ts' ts/1280x720/prog_index.m3u8 |
This file contains hidden or 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
location ~ ^(.+)\.(css|js)$ { | |
try_files $1.min.$2 $uri =404; | |
} |
This file contains hidden or 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
wget --no-check-certificate https://github.com/rafa3d/vHWINFO/raw/master/vhwinfo.sh -O - -o /dev/null|bash |
This file contains hidden or 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
# fail2ban filter configuration for nginx, by Sander | |
# 1) Catch WordPress related requests (we don't have WordPress on this server) | |
# 2) Catch requests for certain scripts we don't host | |
# 3) Catch script requests we don't host | |
# 4) Catch referer spam | |
[Definition] | |
failregex = ^<HOST> .* "(GET|POST|HEAD) /+(?i)(wp(-|/)|xmlrpc\.php|\?author=1) | |
^<HOST> .* "(GET|POST|HEAD|PROPFIND) /+(?i)(a2billing|admin|apache|axis|blog|cfide|cgi|cms|config|etc|\.git|hnap|inc|jenkins|jmx-|joomla|lib|linuxsucks|msd|muieblackcat|mysql|myadmin|n0w|owa-autodiscover|pbxip|php|pma|recordings|sap|sdk|script|service|shell|sqlite|vmskdl44rededd|vtigercrm|w00tw00t|webdav|websql|wordpress|xampp|xxbb) |
This file contains hidden or 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
# Fail2Ban configuration file | |
# | |
[Definition] | |
# Notify on Startup | |
actionstart = /usr/bin/curl -s -F "token=<token>" -F "user=<user>" -F "title=[Fail2Ban] <name>" -F "message=Jail <name> has been started successfully." https://api.pushover.net/1/messages | |
# Notify on Shutdown | |
actionstop = /usr/bin/curl -s -F "token=<token>" -F "user=<user>" -F "title=[Fail2Ban] <name>" -F "message=Jail <name> has been stopped." https://api.pushover.net/1/messages |
This file contains hidden or 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
# 1. Install the requests module for python. | |
# pip install requests | |
# 2. Add script arguments in PlexPy. | |
# {user} {user_id} {ip_address} | |
import requests | |
import sys | |
user = sys.argv[1] | |
user_id = sys.argv[2] |
This file contains hidden or 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
add_action('template_redirect', 'bwp_template_redirect'); | |
function bwp_template_redirect() { | |
if (is_author()) { | |
wp_redirect(home_url()); | |
exit; | |
} | |
} |
OlderNewer