12 сентября 2023 Нет комментариев
ls -l ./ | sed -n 's~^-.*\(\..*\)$~\1~p' | sort | uniq
Categories: Linux Tags:
12 сентября 2023 Нет комментариев
.el{
	color:transparent;
	-webkit-text-stroke-width:1px;
	-webkit-text-stroke-color:white
}
Categories: CSS Tags:
18 августа 2023 Нет комментариев
function days_to_birthdate($birthdate){
	$bd=explode('.',$birthdate);
	$bd=mktime(0,0,0,$bd[1],$bd[0],date('Y')+($bd[1].$bd[0]<=date('md')));
	return ceil(($bd-time())/86400);
}
Categories: PHP Tags:
17 августа 2023 Нет комментариев
a{
	height:40px;
	overflow:hidden;
	text-overflow:ellipsis;
	display:-webkit-box;
	-webkit-line-clamp:2;
	-webkit-box-orient:vertical;
}
Categories: CSS Tags:
grep "/test/" ./log.log | cut -d ' ' -f 1 | sort | uniq -c | sort -n | tail -n 30

Источник: https://habr.com/ru/articles/236771/

Categories: Linux Tags:

отправить тело запроса в get запросе используя curl

$timeout=5;
$auth=array(
	'WebApiSession: '.$WebApiSession,
);
$curl=curl_init();
curl_setopt($curl,CURLOPT_CONNECTTIMEOUT,$timeout);
curl_setopt($curl,CURLOPT_TIMEOUT,$timeout);
curl_setopt($curl,CURLOPT_URL,$url);
curl_setopt($curl,CURLOPT_HEADER,0);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl,CURLOPT_HTTPHEADER,$auth);
curl_setopt($curl,CURLOPT_CUSTOMREQUEST,'GET');
curl_setopt($curl,CURLOPT_POSTFIELDS,$booking_data);
$result=curl_exec($curl);
Categories: PHP Tags:
$(document).ready(function(){
	setTimeout(function(){
		$.cookie('nf_timeout',true,{
			expires:1,
			path:'/'
		});
	},30000);
	if($.cookie('nf_timeout')&&!$.cookie('nf_popup')){
		$(document).mouseleave(function(e){
			if((e.clientY<10)&&!($("#nf_link").hasClass("clicked"))){
				setTimeout(function(){
					$("#nf_link").addClass('clicked').click();
				},1);
				$.cookie('nf_popup',true,{
					expires:7,
					path:'/'
				});
			}
		});
	};
});
<a href="<?=$r_nf['popup_link']?>" class="popup fancybox.ajax" id="nf_link"><?=$r_nf['name']?></a>

Необходима библиотека https://yandex.st/jquery/cookie/1.0/jquery.cookie.min.js

Categories: Javascript Tags: