Let's say you want to host domains first.com
and second.com
.
Create folders for their files:
# Extension package to add on Ubuntu 14.04 | |
sudo apt-get install libxml2-dev libbz2-dev libmcrypt-dev libreadline-dev libxslt1-dev autoconf -y | |
# Extension package to add on Ubuntu 18.04 | |
sudo apt-get install libssl-dev | |
# Extension package to add on Ubuntu 20.04 | |
sudo apt install -y pkg-config libssl-dev libsqlite3-dev libbz2-dev libxml2-dev libcurl4-openssl-dev libonig-dev libpq-dev libreadline-dev libxslt1-dev libzip-dev libsodium-dev libwebp-dev | |
# +apxs2 | |
sudo apt-get install apache2-dev -y |
<?php | |
function check_facebook() { | |
$IP = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : false; | |
$UA = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : false; | |
if (!$IP || !$UA) return false; | |
$UAs = ['facebookexternalhit', 'Facebot', 'visionutils']; | |
$UAs = array_map('preg_quote', $UAs); | |
if (!preg_match('#^' . implode('|', $UAs) .'#i', $UA)) return false; |
/* | |
* UPDATE: Looked at the blame, turns out the negative bottom is actually for ensuring layout doesn't change during transitions. | |
* Still don't know how that works completely, but it has nothing to do with hiding (top: window.height pushes view out of viewport). | |
* | |
* I was just looking at Navigator implementation and noticed this line: | |
* https://github.com/facebook/react-native/blob/master/Libraries/CustomComponents/Navigator/Navigator.js#L110-L113 | |
* | |
*/ | |
import React, { | |
Component, |
php -v
PHP 5.6.3 (cli) (built: Oct 28 2015 09:47:41)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
But this only changes in CLI. You have to tweak you nginx(same for apache) to make it works. Nginx will still using the native PHP-FPM.
> ps aux | grep php-fpm
import com.google.inject.Singleton; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
@Singleton | |
public class YouTubeHelper { | |
final String youTubeUrlRegEx = "^(https?)?(://)?(www.)?(m.)?((youtube.com)|(youtu.be))/"; | |
final String[] videoIdRegex = { "\\?vi?=([^&]*)","watch\\?.*v=([^&]*)", "(?:embed|vi?)/([^/?]*)", "^([A-Za-z0-9\\-]*)"}; |
<?php | |
// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored) | |
// http://youtu.be/dQw4w9WgXcQ | |
// http://www.youtube.com/embed/dQw4w9WgXcQ | |
// http://www.youtube.com/watch?v=dQw4w9WgXcQ | |
// http://www.youtube.com/?v=dQw4w9WgXcQ | |
// http://www.youtube.com/v/dQw4w9WgXcQ | |
// http://www.youtube.com/e/dQw4w9WgXcQ | |
// http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ |
DROP TABLE IF EXISTS wp_users; | |
CREATE TABLE wp_users ( | |
ID bigint(20) unsigned NOT NULL auto_increment, | |
user_login varchar(60) NOT NULL default '', | |
user_pass varchar(64) NOT NULL default '', | |
user_nicename varchar(50) NOT NULL default '', | |
user_email varchar(100) NOT NULL default '', | |
user_url varchar(100) NOT NULL default '', | |
user_registered datetime NOT NULL default '0000-00-00 00:00:00', | |
user_activation_key varchar(60) NOT NULL default '', |