echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
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
| -- a quick LUA access script for nginx to check IP addresses match an | |
| -- `ip_whitelist` set in Redis, and if no match is found send a HTTP | |
| -- 403 response or just a custom json instead. | |
| -- | |
| -- allows for a common whitelist to be shared between a bunch of nginx | |
| -- web servers using a remote redis instance. lookups are cached for a | |
| -- configurable period of time. | |
| -- | |
| -- white an ip: | |
| -- redis-cli SADD ip_whitelist 10.1.1.1 |
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
| // io.netty.buffer.ByteBufUtil | |
| import io.netty.buffer.ByteBuf; | |
| /** | |
| * Returns the reader index of needle in haystack, or -1 if needle is not in haystack. | |
| * This method uses the <a href="https://en.wikipedia.org/wiki/Two-way_string-matching_algorithm">Two-Way | |
| * string matching algorithm</a>, which yields O(1) space complexity and excellent performance. | |
| */ | |
| public static int indexOf(ByteBuf needle, ByteBuf haystack) { | |
| if (haystack == null || needle == null) { | |
| return -1; |
NewerOlder
