You may need to configure a proxy server if you're having trouble cloning
or fetching from a remote repository or getting an error
like unable to access '...' Couldn't resolve host '...'.
Consider something like:
| # @author Pichaya Morimoto ([email protected]) | |
| Problem: | |
| ```bash | |
| brew install proxychains-ng | |
| proxychains4 ncat 1.2.3.4 # not working | |
| ``` | |
| There are public workarounds like https://benobi.one/posts/running_brew_on_m1_for_x86/ |
| -- Redis script to implement a leaky bucket | |
| -- see https://medium.com/callr-techblog/rate-limiting-for-distributed-systems-with-redis-and-lua-eeea745cb260 | |
| -- (c) Florent CHAUVEAU <[email protected]> | |
| local ts = tonumber(ARGV[1]) | |
| local cps = tonumber(ARGV[2]) | |
| local key = KEYS[1] | |
| -- remove tokens < min (older than now() -1s) | |
| local min = ts -1 |
| -- Redis script to get the size of a token bucket | |
| -- see https://medium.com/callr-techblog/rate-limiting-for-distributed-systems-with-redis-and-lua-eeea745cb260 | |
| -- (c) Florent CHAUVEAU <[email protected]> | |
| local ts = tonumber(ARGV[1]) | |
| local key = KEYS[1] | |
| -- remove tokens < min (older than now() -1s) | |
| local min = ts -1 |
| -- Redis script to add an event to a token bucket | |
| -- see https://medium.com/callr-techblog/rate-limiting-for-distributed-systems-with-redis-and-lua-eeea745cb260 | |
| -- (c) Florent CHAUVEAU <[email protected]> | |
| local ts = tonumber(ARGV[1]) | |
| -- set the token bucket to 1 second (rolling) | |
| local min = ts -1 | |
| -- iterate overs keys |