server {
listen 443 ssl;
listen [::]:443 ssl;
access_log /var/log/nginx/api.site.ru_access.log;
ssl_certificate /etc/ssl/api.site.ru.crt;
ssl_certificate_key /etc/ssl/api.site.ru.key;
server_name api.site.ru;
root /root/api.site.ru;
gzip on;
gzip_types text/plain application/xml text/css application/javascript;
gzip_min_length 1000;
location / {
# тут заголовки и др.
proxy_pass http://127.0.0.1:3000; # Тут адрес ноды которая отдает API (уже запущенная)
}
}
nginx -t
(не забываем про сертификаты)<!DOCTYPE html>
<html>
<head>
<title>Добавление метки на карту</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--
Укажите свой API-ключ. Тестовый ключ НЕ БУДЕТ работать на других сайтах.
Получить ключ можно в Кабинете разработчика: https://developer.tech.yandex.ru/keys/
-->
<script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU&apikey=<ваш API-ключ>" type="text/javascript"></script>
<script src="placemark.js" type="text/javascript"></script>
<style>
html, body, #map {
width: 100%; height: 100%; padding: 0; margin: 0;
}
</style>
</head>
<body>
<div id="map"></div>
</body>
</html>
ymaps.ready(init);
function init() {
var myMap = new ymaps.Map("map", {
center: [55.76, 37.64],
zoom: 10
}, {
searchControlProvider: 'yandex#search'
});
myMap.geoObjects
.add(new ymaps.Placemark([55.694843, 37.435023], {
iconCaption: 'Очень длиннный, но невероятно интересный текст'
}, {
preset: 'islands#redDotIconWithCaption'
}));
}
text = json_data['response'][1]['text']
Designed with security in mind, Apple’s iOS 11 enables the use of ‘Guided Access’. The feature allows you to control and limit the use of the device to just one app of your choice. Found in the iPad’s general settings, it is a simple way to prevent users from switching in and out of other apps, or accessing additional features on the iPad.
Как сделать так, чтобы при вводе обоих вариантов, загружалась страница с защищённым соединением?
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
когда я с этих классов парсю href то парсит только только самый первый, почему не все?
<?php
include 'simple_html_dom.php';
$site = 'http://optnow.ru/catalog';
$data = file_get_html($site);
$catalogLink = array();
if(!empty($data)) {
foreach($data->find('div.cat-name a') as $catalog) {
$catalogLink['url'] = $catalog->href;
$urls[] = $catalogLink;
}
foreach($urls as $url => $k) {
foreach($k as $n) {
$catalogLink = 'http://optnow.ru/' . $n . '?page=0';
$productData = file_get_html($catalogLink);
// смотрим отсюда
foreach($productData->find('.link-pv-name') as $link) {
$productLink['url'] = $link->href;
$productUrls[] = $productLink;
}
}
}
}
$('#particles').particleground({
dotColor: 'rgba(255, 255, 255, 0.92)',
lineColor: 'rgba(255, 255, 255, 0.1)',
minSpeedX: 0.1,
maxSpeedX: 0.6,
minSpeedY: 0.1,
maxSpeedY: 0.6,
lineWidth: 1,
density: 12100, // One particle every n pixels
curvedLines: false,
proximity: 150, // How close two dots need to be before they join
parallaxMultiplier: 10, // Lower the number is more extreme parallax
particleRadius: 3, // Dot size
});
$(window).resize(function () {
if ($(window).width() < 576) {
myMap.setCenter([57.767265, 40.925358]);
}
});
function myFunction(x) {
if (x.matches) { // If media query matches
myMap.setCenter([57.767265, 40.925358]);
}
}
var x = window.matchMedia("(max-width: 576px)")
myFunction(x) // Call listener function at run time
x.addListener(myFunction) // Attach listener function on state changes
$data = array (
[1] => array(
'title' => "xxxxx",
'content' => "xxxxx",
'category' => "xxxxx",
),
[2] => array(
'title' => "xxxxx",
'content' => "xxxxx",
'category' => "xxxxx",
),
[3] => array(
'title' => "xxxxx",
'content' => "xxxxx",
'category' => "xxxxx",
),
);
if(is_array($data)){
foreach($data as $row){
$sql = "INSERT INTO `table`( `title`, `content`, `category`) values";
$title = mysql_real_escape_string( $row['title'] );
$content = mysql_real_escape_string( $row['content'] );
$category = mysql_real_escape_string( $row['category'] );
$sql .= "('" . $title . "','" . $content, "','" $category "')";
mysql_query($sql) or exit(mysql_error());
}
}
if(is_array($data)){
foreach($data as $row){
$tournamentName = $row['tournament']['name'];
$tournamentSlug = $row['tournament'][];
$tournamentId = $row['tournament'][];
$tournamentUniqueId = $row['tournament'][];
$tournamentUniqueName = $row['tournament'][];
$categoryName = $row['category']['name'];
$categorySlug = $row['category']['slug'];
$categoryPriority = $row['category']['priority'];
$categoryId = $row['category']['id'];
$categoryFlag = $row['category']['flag'];
}
}
Работа с Whatsapp одновременно с двух устройств?
Using one WhatsApp account on multiple phones, or with multiple phone numbers
Your WhatsApp account can only be verified with one number on one device. If you have a dual SIM phone, please note that you still must choose one number to verify with WhatsApp. There is no option to have a WhatsApp account with two phone numbers.
If you attempt to frequently switch your WhatsApp account between different devices, at a certain point, you may be blocked from re-verifying your account. Please don't repeatedly switch between different devices and numbers.
⚡ root@dev ~ wget https://*********/100mb.tar --report-speed=bits
--2019-05-28 13:14:56-- https://*********/100mb.tar
Resolving ********* (*********)... 95.216.141.*
Connecting to ********* (*********)|95.216.141.*|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 104857600 (100M) [application/octet-stream]
Saving to: '100mb.tar'
100mb.tar 100%[====================================>] 100.00M 585Mb/s in 1.4s
2019-05-28 13:14:57 (585 Mb/s) - '100mb.tar' saved [104857600/104857600]