Skip to content

Instantly share code, notes, and snippets.

@merc1er
merc1er / nginx.conf
Last active November 9, 2025 09:34 — forked from mainnet-pat/config
Flipstarter nginx config
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;
@merc1er
merc1er / remove_duplicates_from_list.py
Created July 5, 2023 03:43
Different ways of removing duplicate items from a list containing a dictionary in Python
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()
@merc1er
merc1er / certbot.sh
Created March 18, 2022 04:31
Install certbot HTTPS on Ubuntu 20 with NGINX
# 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
for number in {1..30}
do
pm2 start "npm start" --name="mist$number"
done
@merc1er
merc1er / pwnflare.py
Created May 19, 2020 17:29
Bypass CloudFlare's email protection.
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)