This file contains hidden or 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
| # отключить индексацию файлов | |
| sudo mdutil -a -i off | |
| # включить индексацию файлов | |
| # sudo mdutil -a -i on | |
| # получить статус работы индексирования | |
| mdutil -a -s -v | |
| # удалить индексы Spotlight |
This file contains hidden or 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
| # Problem: The requested PHP extension ext-yaml * is missing from your system. Install or enable PHP's yaml extension. | |
| sudo apt-get -y install gcc make autoconf libc-dev pkg-config | |
| sudo apt-get -y install libyaml-dev | |
| sudo apt-get -y install php-pear php7.3-yaml | |
| sudo pecl install yaml | |
| sudo touch /etc/php/7.3/cli/conf.d/20-yaml.ini | |
| sudo touch /etc/php/7.3/fpm/conf.d/20-yaml.ini | |
| sudo bash -c "echo extension=yaml.so > /etc/php/7.3/cli/conf.d/20-yaml.ini" | |
| sudo bash -c "echo extension=yaml.so > /etc/php/7.3/fpm/conf.d/20-yaml.ini" |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| echo "------------------------------" | |
| echo "PHP 7.3 Xdebug" | |
| echo "------------------------------" | |
| sudo apt -y install php7.3-dev php-pear | |
| sudo pecl channel-update pecl.php.net ; pecl clear-cache | |
| sudo pecl install xdebug | |
| php --ini |
This file contains hidden or 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
| {:drop-index :foo} | |
| {:drop-keyspace :foo} | |
| {:drop-table :foo} | |
| {:select (#qbits.hayt.cql.CQLFn{:name COUNT, :args (:*)}), :from :foo} | |
| {:select (:*), :from :foo, :where {:ts #qbits.hayt.cql.CQLFn{:name now, :args nil}}} | |
| {:select (#qbits.hayt.cql.CQLFn{:name WRITETIME, :args (:bar)}), :from :foo} | |
| {:select (#qbits.hayt.cql.CQLFn{:name TTL, :args (bar)}), :from :foo} | |
| {:select (#qbits.hayt.cql.CQLFn{:name unixTimestampOf, :args (bar)} #qbits.hayt.cql.CQLFn{:name dateOf, :args (:bar)}), :from :foo} | |
| {:select (:*), :from :foo, :where {#qbits.hayt.cql.CQLFn{:name token, :args (:user-id)} [#<core$_GT_ clojure.core$_GT_@6177060f> #qbits.hayt.cql.CQLFn{:name token, :args (tom)}]}} | |
| {:select (:*), :from :foo, :where {:ts #qbits.hayt.cql.CQLFn{:name now, :args nil}}} |
This file contains hidden or 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
| composer require friendsofsymfony/jsrouting-bundle | |
| curl -o composer.phar https://getcomposer.org/composer.phar | |
| php -r "echo ini_get('memory_limit').PHP_EOL;" | |
| php -d memory_limit=-1 composer.phar update friendsofsymfony/jsrouting-bundle |
This file contains hidden or 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
| # Откатить последний коммит | |
| git reset --soft \#303^ | |
| git push -f origin \#303 | |
| # Подтянуть ветку наверх мастера | |
| git fetch | |
| git checkout master | |
| git pull | |
| git checkout \#303 |
This file contains hidden or 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
| FROM ubuntu:16.04 | |
| RUN apt-get -y update && apt-get install -y php7.0-fpm php7.0-cli php7.0-curl php7.0-gd php7.0-intl php7.0-zip php7.0-pgsql build-essential git gcc make re2c libpcre3-dev php7.0-dev curl | |
| RUN curl -sS http://getcomposer.org/installer | php | |
| RUN mv composer.phar /usr/local/bin/composer | |
| RUN composer global require "phalcon/zephir:dev-master" | |
| RUN mkdir -p /opt/www |
This file contains hidden or 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 | |
| Route::filter('csrf', function() { | |
| $token = Request::ajax() ? Request::header('X-CSRF-Token') : Input::get('_token'); | |
| if (Session::token() != $token) | |
| throw new Illuminate\Session\TokenMismatchException; | |
| }); |
This file contains hidden or 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 | |
| echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\r\n"; | |
| echo PHP_EOL.">>> Поменять местами значения переменных \$a и \$b не используя третью переменную.".PHP_EOL; | |
| $a=1; $b=2; | |
| echo "a=$a b=$b".PHP_EOL; | |
| $a = compact('a', 'b'); | |
| $b = $a['a']; | |
| $a = $a['b']; |
This file contains hidden or 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 | |
| $collection->each(function($model) { $model->setAppends(['likes_count', 'time_offset']); }); |
NewerOlder