This file contains 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
before | |
root@ns5028044:~# cat /etc/netplan/50-cloud-init.yaml | |
network: | |
version: 2 | |
ethernets: | |
eno1np0: | |
match: | |
macaddress: "9c:6b:00:3f:4f:f9" | |
addresses: |
This file contains 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
function is_mobile() | |
{ | |
if (empty($_SERVER["HTTP_USER_AGENT"])) { | |
return false; | |
} | |
return @preg_match("/(android|webos|avantgo|iphone|ipad|ipod|blackberry|iemobile|bolt|boost|cricket|docomo|fone|hiptop|mini|opera mini|kitkat|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", ''.$_SERVER["HTTP_USER_AGENT"]); | |
} | |
function is_iphone() | |
{ |
This file contains 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
function find_user_ip() | |
{ | |
foreach (array('HTTP_CF_CONNECTING_IP', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key) { | |
if (array_key_exists($key, $_SERVER) && !empty($_SERVER[$key])) { | |
foreach (@explode(',', ''.$_SERVER[$key]) as $ip) { | |
$ip = trim($ip); | |
if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false) { | |
return $ip; | |
} | |
} |
This file contains 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
<?php | |
# Author: ServerOK | |
# Web: https://serverok.in/server-to-server-file-transfer-with-php-script | |
# URL of the file to be downloaded | |
$source_url = 'https://example.com/backup.zip'; | |
$filename = basename(parse_url($source_url, PHP_URL_PATH)); | |
$destination_path = __DIR__ . '/' . $filename; |
This file contains 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
Reaplce YOUR-DOMAIN.EXT with you actual domain or subdomain. Point domain to server IP by editing DNS. | |
To create a new wordpress site, create a dirctory | |
/var/www/YOUR-DOMAIN.EXT/public_html | |
Upload wordpress files inside. | |
Create nginx config |
This file contains 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Bootstrap CSS --> | |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | |
<title>Under Construction</title> | |
<style> |
This file contains 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Bootstrap CSS --> | |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | |
<title>Under Construction</title> | |
<style> |
This file contains 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
# regex to split $uri to $fastcgi_script_name and $fastcgi_path | |
fastcgi_split_path_info ^(.+?\.php)(/.*)$; | |
# Check that the PHP script exists before passing it | |
try_files $fastcgi_script_name =404; | |
# Bypass the fact that try_files resets $fastcgi_path_info | |
# see: http://trac.nginx.org/nginx/ticket/321 | |
set $path_info $fastcgi_path_info; | |
fastcgi_param PATH_INFO $path_info; |
This file contains 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 | |
sudo apt update | |
sudo apt install xfce4 -y | |
wget https://download.nomachine.com/download/8.11/Linux/nomachine_8.11.3_4_amd64.deb | |
sudo dpkg -i nomachine_8.11.3_4_amd64.deb | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo dpkg -i google-chrome-stable_current_amd64.deb | |
sudo apt update | |
sudo apt install google-chrome-stable |
This file contains 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
curl 'https://www.fastcartapp.com/sitemap.xml' \ | |
-H 'authority: www.fastcartapp.com' \ | |
-H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \ | |
-H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8,it;q=0.7' \ | |
-H 'cache-control: no-cache' \ | |
-H 'cookie: secure_customer_sig=; localization=US; cart_currency=USD; _y=fd18e78d-a7a3-4d81-ace9-39e698a4a91c; _s=6fab5005-349f-4347-be62-63ca8f3503f3; _shopify_y=fd18e78d-a7a3-4d81-ace9-39e698a4a91c; _shopify_s=6fab5005-349f-4347-be62-63ca8f3503f3' \ | |
-H 'pragma: no-cache' \ | |
-H 'sec-ch-ua: "Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"' \ | |
-H 'sec-ch-ua-mobile: ?1' \ | |
-H 'sec-ch-ua-platform: "Android"' \ |
NewerOlder