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 | |
use yii\db\Migration; | |
/** | |
* Class m200518_185219_add_lot_search_index | |
*/ | |
class m200518_185219_add_lot_search_index extends Migration | |
{ | |
public function safeUp() |
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
// Define page_id | |
$page_ID = get_the_ID(); | |
// Define paginated posts | |
$page = get_query_var( 'page' ); | |
// Define custom query parameters | |
$args = array( | |
'post_type' => array( 'post', 'book', 'movie' ), // post types | |
'posts_per_page' => 5, |
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
//breadcrumbs | |
/igrushki-store.ru/public_html/wp-content/plugins/woocommerce/includes/class-wc-breabcrumbs.php | |
/** | |
* Add a breadcrumb for pagination. | |
*/ | |
private function paged_trail() { | |
if ( get_query_var( 'paged' ) ) { | |
//sham fix | |
//$this->add_crumb( sprintf( __( 'Page %d', 'woocommerce' ), get_query_var( 'paged' ) ) ); | |
} |
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
//on backend | |
return [ | |
'homeUrl' => '/adminpanel', | |
'components' => [ | |
'request' => [ | |
'baseUrl' => '/sm-admin', | |
], | |
'urlManager' => [ | |
'enablePrettyUrl' => true, | |
'showScriptName' => false, |
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
CREATE DATABASE "radar-web" | |
WITH OWNER = postgres | |
ENCODING = 'UTF8' | |
TABLESPACE = pg_default | |
LC_COLLATE = 'ru_RU.UTF-8' | |
LC_CTYPE = 'ru_RU.UTF-8' | |
CONNECTION LIMIT = -1; | |
php yii migrate/up 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
RewriteCond %{SERVER_PORT} !^443$ | |
RewriteRule ^(.*)$ https://domain.ru/$1 [R=301,L] | |
# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin | |
RewriteCond %{HTTP_HOST} . | |
RewriteCond %{HTTP_HOST} !^domain\.ru [NC] |
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
//main | |
Элементы дискретной математики | |
Графы | |
Автоматы | |
Кодирование | |
Алгоритмы и структуры данных | |
Теория множеств | |
Логика | |
Системы счисления |
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
//show all tables from db | |
select * from pg_tables; | |
//show all tables from but psq tables | |
select * from pg_catalog.pg_tables | |
where schemaname != 'information_schema' and schemaname != 'pg_catalog'; | |
psql -U registrator -d registrator | |
UPDATE regschema_shadow.registrator SET is_local = true WHERE id = id |
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
tar xzf php-7.2.6.tar.gz | |
apt-get install re2c | |
apt-get install flex | |
./buildconf --force | |
apt-get install git gcc gcc-c++ libxml2-devel pkgconfig | |
apt-get install openssl-devel bzip2-devel curl-devel libpng-devel libjpeg-devel libXpm-devel | |
apt-get install gmp-devel libmcrypt-devel | |
apt-get install recode-devel bison re2c libicu-devel libaspell libaspell-devel aspell | |
mkdir /usr/local/php7 | |
./configure |
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
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title></title> | |
</head> | |
<body><div id = 'show'></div> | |
<script type="text/javascript"> | |
function two(a) { | |
return (9 < a ? "" : "0") + a | |
} |
NewerOlder