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
#!/bin/bash | |
# Restore original visitor IPs to your logs | |
# https://developers.cloudflare.com/support/troubleshooting/restoring-visitor-ips/restoring-original-visitor-ips/ | |
# Conf file locations | |
CLOUDFLARE_NGINX="/etc/nginx/conf.d/real_ip.conf" | |
CLOUDFLARE_APACHE="/etc/apache2/conf-available/remoteip.conf" | |
# Download IP lists (txt files) | |
IPV4=`curl -s -L https://www.cloudflare.com/ips-v4` |
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
// Devices | |
#define ScreenHeight MAX([[UIScreen mainScreen] bounds].size.width,[[UIScreen mainScreen] bounds].size.height) | |
#define ScreenWidth MIN([[UIScreen mainScreen] bounds].size.width,[[UIScreen mainScreen] bounds].size.height) | |
#define Screen35in (ScreenHeight==480) | |
#define Screen40in (ScreenHeight==568) | |
#define Screen47in (ScreenHeight==667) | |
#define Screen55in (ScreenHeight==736) | |
#define iPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) | |
#define iPadPro ((UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) && (ScreenHeight==1366)) |