Skip to content

Instantly share code, notes, and snippets.

View RoyalRajdeep's full-sized avatar
✔️
Available

Rajdeep Gautam RoyalRajdeep

✔️
Available
View GitHub Profile
@RoyalRajdeep
RoyalRajdeep / homebrew-permissions-issue.md
Created November 25, 2019 12:57 — forked from irazasyed/homebrew-permissions-issue.md
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

// Register a handler for process.on('exit') and in any other case(SIGINT or unhandled exception) to call process.exit()
process.stdin.resume();//so the program will not close instantly
function exitHandler(options, exitCode) {
if (options.cleanup) console.log('clean');
if (exitCode || exitCode === 0) console.log(exitCode);
if (options.exit) process.exit();
}
@RoyalRajdeep
RoyalRajdeep / nginx-rate-limit.conf
Last active October 9, 2019 08:54
NGINX Rate Limit, Burst and nodelay
## https://nginx.org/en/docs/http/ngx_http_limit_req_module.html
## https://www.nginx.com/blog/rate-limiting-nginx
## Ref. https://github.com/sportebois/nginx-rate-limit-sandbox
limit_req_zone $request_uri zone=by_uri:10m rate=30r/m;
limit_req_zone $binary_remote_addr zone=by_ip:10m rate=30r/m;
server {
listen 80;