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
| -- $ lua imgur.lua abcde [fghij] | |
| local leet = { | |
| ["o"] = 0, ["i"] = 1, ["e"] = 3, ["a"] = 4, ["s"] = 5, ["t"] = 7 | |
| } | |
| local teel = { | |
| [0] = "O", [1] = "I", [3] = "E", [4] = "A", [5] = "S", [7] = "T" | |
| } |
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 | |
| ARIA2_URI=${ARIA2_URI:-127.0.0.1:6800} | |
| [ -n "$ARIA2_SECRET" ] && SECRET='"secret":"$ARIA2_SECRET", ' | |
| die() { | |
| [ -n "$1" ] && echo $1 | |
| cat << EOF | |
| Usage: $(basename $0) OPTION (VALUE) | |
| Available options: |
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
| local asr = {} | |
| function asr.equal(a, b) return a == b end | |
| function asr.error(fn, ...) local ok, out = pcall(fn, ...) return (not ok) and out end | |
| function asr.match(a, b) return tostring(a):match(b) end | |
| function asr.type(a, b) return type(a) == b end | |
| local mt = {} | |
| function mt.__index(t, k) | |
| if not asr[k] then return end | |
| return function(...) |
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 users: | |
| -- $ htpasswd -s -c /etc/nginx-rtmp/.htpasswd streamname | |
| -- stream: | |
| -- $ ffmpeg -i foo.mp4 -c copy -f flv rtmp://abc.de/streamname?auth=password | |
| local users = {} | |
| for line in io.lines("/etc/nginx-rtmp/.htpasswd") do | |
| local user, pass = line:match("([^:]+):{SHA}([^\n]+)") | |
| users[user] = pass | |
| end |
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
| #include <stdio.h> | |
| #include <lua.h> | |
| #include <lualib.h> | |
| #include <lauxlib.h> | |
| #define DIE(e) do { fprintf(stderr, "FATAL: %s\n", e); return 1; } while (0) | |
| static void l_getargs(lua_State * L, int argc, const char ** argv) { | |
| int i; | |
| lua_newtable(L); |
OlderNewer