Skip to content

Instantly share code, notes, and snippets.

@patrocle
patrocle / Nginx + Apache reverse proxy REAL IP.md
Last active July 23, 2024 17:39
Real IP for Apache (Nginx reverse proxy)

NGINX 1.10 + APACHE 2.4 real IP for reverse proxy

Edit nginx conf

default.conf or what you want

vim /etc/nginx/conf.d/default.conf

add proxy_set_header for php files

@manzoorwanijk
manzoorwanijk / README.md
Last active December 23, 2023 01:42
Google Script to bypass the blockage of Telegram Bot API from by webhost

WPTelegram Google Script

You can use this script to bypass the bans on Telegram API by different hosts. Simply send the request to this script instead of the Telegram Bot API after deploying it as a web app and allowing anonymous access.

Params

It accepts bot GET and POST requests with the following params

name type Description
/*
FastLED Fire 2018 by Stefan Petrick
The visual effect highly depends on the framerate.
In the Youtube video it runs at arround 70 fps.
https://www.youtube.com/watch?v=SWMu-a9pbyk
The heatmap movement is independend from the framerate.
The actual scaling operation is not.
@domaingood
domaingood / cloudflare_batch.php
Created February 4, 2020 17:40 — forked from thiagotalma/cloudflare_batch.php
Cloudflare Batch Edit
<?php
// Form a list of all CF IP zones
// For each zone, grab all A records and TXT records matching $oldip
// For each matching record, update it to the new IP address
// Does not deal with paginated zone results so there's currently
// a maximum of 50 zones managed by this tool
$authemail = "YOU @ YOUR EMAIL . COM";
$authkey = "YOUR CLOUDFLARE API KEY";
wget https://download2.mikrotik.com/routeros/6.38.3/chr-6.38.3.img.zip -O chr.img.zip && \
gunzip -c chr.img.zip > chr.img && \
mount -o loop,offset=33554944 chr.img /mnt && \
ADDRESS=`ip addr show eth0 | grep global | cut -d' ' -f 6 | head -n 1` && \
GATEWAY=`ip route list | grep default | cut -d' ' -f 3` && \
echo "/ip address add address=$ADDRESS interface=[/interface ethernet find where name=ether1]
/ip route add gateway=$GATEWAY
" > /mnt/rw/autorun.scr && \
umount /mnt && \
echo u > /proc/sysrq-trigger && \