default.conf or what you want
vim /etc/nginx/conf.d/default.conf
add proxy_set_header for php files
pscp -pw yourpassword file user@server:locate |
xargs -n 1 curl -O < urls.txt |
from bs4 import BeautifulSoup | |
import requests | |
url = 'https://www.example.com/2019/11/13/presentasi/' | |
ext = 'pdf' | |
def listFD(url, ext=''): | |
page = requests.get(url).text | |
soup = BeautifulSoup(page, 'html.parser') | |
return [node.get('href') for node in soup.find_all('a') if node.get('href').endswith(ext)] |
curl ifconfig.me | |
curl icanhazip.com | |
curl ipecho.net/plain | |
curl ifconfig.co |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
openssl s_client -showcerts -connect api.sendgrid.com:443 |
curl --request POST --url https://api.sendgrid.com/v3/mail/send \ | |
--header 'authorization: Bearer API_KEY' \ | |
--header 'content-type: application/json' \ | |
--data '{"personalizations":[{"to":[{"email":"update me!", "name":"Orang Ganteng"}],"subject":"Hello!"}],"content": [{"type": "text/plain", "value": "Nice Works"}],"from":{"email":"sendgrid@localhost","name":"Sendgrid"}}' |
from bs4 import BeautifulSoup as bs | |
import sys | |
# But, we'll read from standard input, so we can pipe output to it | |
# i.e. run with cat filename.html | this_file.py | |
data = sys.stdin.readlines() | |
data = "".join(data) | |
soup = bs(data) #make BeautifulSoup | |
prettyHTML=soup.prettify() #prettify the html |
localTime=$(date '+%Y%m%d_%H%M%S' -d "$(curl -s --head http://google.com | grep ^Date: | sed 's/Date: //g')") | |
mysqldump -u root -p --databases osTicket > dump-osTicket-$localTime.sql |