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
| server { | |
| server_name fund.mainnet-pat.me; | |
| location / { | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_connect_timeout 7d; | |
| proxy_send_timeout 7d; |
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
| original_list = [(0, {'PRICE': '4.60'})] * 1_000 | |
| # Method 1: enumerate | |
| def remove_duplicates_enumerate(list_input: list): | |
| list_copy = list_input.copy() | |
| list_copy = [x for i, x in enumerate(list_copy) if x not in list_copy[:i]] | |
| def remove_duplicates_enumerate_full(list_input: list): | |
| list_copy = list_input.copy() |
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
| # ensure snap is up to date | |
| sudo snap install core; sudo snap refresh core | |
| # install certbot | |
| sudo snap install --classic certbot | |
| sudo ln -s /snap/bin/certbot /usr/bin/certbot | |
| # run certbot | |
| sudo certbot --nginx |
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
| for number in {1..30} | |
| do | |
| pm2 start "npm start" --name="mist$number" | |
| done |
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 requests_html import HTMLSession | |
| # https://requests-html.kennethreitz.org | |
| session = HTMLSession() | |
| # an example of cloudflare protected page | |
| r = session.get('https://www.bitcoincash.org/privacy-policy.html') | |
| r.html.render() | |
| print(r.html.text) |