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
| -- 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 |
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
| FROM golang:1.9 | |
| WORKDIR /go/src/github.com/purplebooth/example | |
| COPY . . | |
| RUN go build -ldflags "-linkmode external -extldflags -static" -a main.go | |
| FROM scratch | |
| COPY --from=0 /go/src/github.com/purplebooth/example/main /main | |
| CMD ["/main"] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| xcode-select --install | |
| # You should install brew https://brew.sh/index_fr | |
| brew install automake autoconf curl pcre bison re2c mhash libtool icu4c gettext jpeg openssl libxml2 mcrypt gd gmp libevent zlib libzip bzip2 imagemagick pkg-config oniguruma | |
| brew link --force icu4c | |
| brew link --force openssl | |
| brew link --force libxml2 | |
| curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew | |
| chmod +x phpbrew |
OlderNewer