# Written by The Suhu (2021).
# Tested on CentOS 7 and CentOS 8
Previously I've written about How to Build and Install Latest cURL Version on Ubuntu. In this article in this article explain how to build and install latest cURL version on CentOS.
# Written by The Suhu (2021).
# Tested on CentOS 7 and CentOS 8
Previously I've written about How to Build and Install Latest cURL Version on Ubuntu. In this article in this article explain how to build and install latest cURL version on CentOS.
# https://www.ionos.com/community/hosting/php/using-php-composer-in-11-ionos-webhosting-packages/ | |
php -v | |
# PHP 4.4.9 (cgi-fcgi) (built: Nov 7 2018 13:27:00) | |
# Copyright (c) 1997-2008 The PHP Group | |
# Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies | |
/usr/bin/php7.1-cli -v | |
# PHP 7.1.25 (cli) (built: Dec 10 2018 10:11:36) ( NTS ) | |
# Copyright (c) 1997-2018 The PHP Group |
# Put this in ~/.bash_aliases | |
# `source ~/.bash_aliases` to activate | |
alias dcr='drush cr' | |
alias ddis='drush dis -y ' | |
alias ddl='drush dl -y ' | |
alias den='drush en -y ' | |
alias dcex='drush csex -y' | |
alias dcim='drush csim -y' | |
alias ga='git add ' | |
alias gb='git branch ' |
<?php | |
// This plugin allows the administrator to boost items in an index based on a taxonomy term. | |
// | |
// Drop into an existing plugin module or create a new one, ex. create an info.yml file as | |
// modules/custom/search_api_boost_term_reference/search_api_boost_term_reference.info.yml | |
// | |
// name: 'Search API Boost by Term Reference' | |
// description: 'Define custom boost priority in Search API index by term reference field' | |
// core: 8.x |
The Scroll Behavior specification has been introduced as an extension of the Window
interface to allow for the developer to opt in to native smooth scrolling. To date this has only been implemented in Chrome, Firefox and Opera.
There's a complete polyfill here (3.3KB minified). But most of the times, the following is enough for me (641 bytes minified):
smooth-scrolling-poyfill.js
Use as: scrollToElem('#elem-selector');
<?php | |
// Import arbitrary config from a variable. | |
// Assumes $data has the data you want to import for this config. | |
$config = \Drupal::service('config.factory')->getEditable('filter.format.basic_html'); | |
$config->setData($data)->save(); | |
// Or, re-import the default config for a module or profile, etc. | |
\Drupal::service('config.installer')->installDefaultConfig('module', 'my_custom_module'); |
function IdentificationNumber($number) | |
{ | |
$result = array(); | |
$result['number'] = $number; | |
$result['sex'] = (substr($number,8,1)%2) ? 'Мужчина' : 'Женщина'; | |
$split = str_split($number); | |
$execute = $split[0]*(-1)+$split[1]*5+$split[2]*7+$split[3]*9+$split[4]*4+$split[5]*6+$split[6]*10+$split[7]*5+$split[8]*7; | |
$number = substr($number,0,5); | |
$date = date('d.m.Y',strtotime('01.01.1900 + '.$number.' days - 1 days')); | |
list($result['day'],$result['month'],$result['year']) = explode('.',$date); |
Installing PHP PECL IMagick on Ubuntu: | |
-------------------------------------- | |
1. $ sudo aptitude install php-pear imagemagick php5-dev libmagick9-dev | |
2. $ sudo apt-get install libmagickwand-dev | |
3. $ sudo pecl install Imagick | |
4. $ sudo nano /etc/php5/apache2/php.ini | |
4. enter extension=imagick.so -> save (ctrl+x / Y) | |
6. $ sudo apache2ctl configtest |
<?php | |
/** | |
* Created by PhpStorm. | |
* User: dima | |
* Date: 11/12/16 | |
* Time: 11:58 AM | |
*/ | |
namespace Drupal\bootstrap_sass_helper; |