This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% import _self as recursive_category_macro %} | |
{% macro recursive_category(category, recursive_category_macro) %} | |
<li> | |
<h4>{{ category.nameRu }}</h4> | |
{% if category.SChildren|length %} | |
<ul> | |
{% for child in category.SChildren %} | |
{{ recursive_category_macro.recursive_category(child, recursive_category_macro) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 ; | |
listen [::]:80; | |
server_name newstore.com.ua www.newstore.com.ua; | |
return 301 https://www.$server_name$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
listen [::]:443; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://gist.github.com/danvbe/4476697 | |
реКапча - https://www.cloudways.com/blog/add-recaptcha-to-symfony-3-forms/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
foreach ($content['result'] as $item) { | |
$i++; | |
$category = new Category(); | |
$category->setCategoryID($item['categoryID']); | |
$category->setParentID($item['parentID']); | |
$category->setRealcat($item['realcat']); | |
$category->setName($item['name']); | |
$app['orm.em']->persist($category); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$site = "https://api.telegram.org/bot".$token; | |
$params = [ | |
'chat_id' => '@'.$chanelId, | |
'text' => $text, | |
'parse_mode' => $parse_mode, | |
]; | |
$options = array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace MainBundle\Controller\Customer; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
/** | |
* Class SitemapController |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://askubuntu.com/questions/831262/how-to-install-pgadmin-4-in-desktop-mode-on-ubuntu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) | |
echo "alias php='/usr/bin/< youre php version php7.1>'" >> ~/.bashrc && source ~/.bashrc | |
restart computer | |
2)(https://tecadmin.net/switch-between-multiple-php-version-on-ubuntu/) | |
$ sudo a2dismod php5.6 | |
$ sudo a2enmod php7.1 | |
$ sudo service apache2 restart | |
$ sudo update-alternatives --set php /usr/bin/php7.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) download php source from official site (example: wget -O php-5.3.29.tar.gz http://us.php.net/get/php-5.3.29.tar.gz/from/this/mirror) | |
2) extract to you folder (extract php-X-X-X.tar.gz to your folder) | |
3) cd to folder (move to php folder) | |
4) ./configure --with-apxs2=/usr/bin/apxs (add your custome configuration) | |
./configure --with-apxs2=/usr/bin/apxs --cache-file=/home/andersen/php-5.3.29 --with-config-file-path=/home/andersen/php-5.3.29/etc --with-config-file-scan-dir=/home/andersen/php-5.3.29/var/db --disable-all --enable-phar --enable-session --enable-short-tags --enable-tokenizer --with-pcre-regex --with-zlib=/usr --enable-pdo --enable-cli --enable-opcache --enable-dom --enable-libxml --enable-simplexml --enable-xml --enable-xmlreader --enable-xmlwriter --with-xsl --with-libxml-dir=/usr --enable-soap --enable-session --with-iconv --enable-hash --enable-debug --enable-bcmath --with-bz2=/usr --enable-calendar --enable-ctype --enable-dom --enable-fileinfo --with-libdir=lib/x86_64-linux-gnu --with-mysql=m |
NewerOlder