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:
# Source: https://www.nginx.com/blog/mitigating-ddos-attacks-with-nginx-and-nginx-plus/ | |
# DDOS characteristics: | |
# - traffic originates from a fixed set of IP addresses, much higher than requests from forward proxies | |
# - traffic is much higher than a human user can generate | |
# - The User-Agent header is sometimes set to a non-standard value | |
# - The Referer header is sometimes set to a value you can associate with the attack | |
# Limiting the rate of requests (example: 30 connection per minute per IP or allow request only every 2 seconds) | |
limit_req_zone $binary_remote_addr zone=one:10m rate=30r/m; |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
defmodule Solution do | |
#Enter your code here. Read input from STDIN. Print output to STDOUT | |
def read do | |
case IO.read(:stdio, :line) do | |
:eof -> :ok | |
{:error, reason} -> IO.puts "Error: #{reason}" | |
data -> | |
IO.write(:stdio, "Hello, World. \n") | |
IO.write(:stdio, data) | |
read() |