13 сентября 2023 Нет комментариев
SELECT MAX(CHAR_LENGTH(`col`)) FROM `table`;
Categories: MySQL Tags:
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: