Skip to content

Instantly share code, notes, and snippets.

<?php
namespace app\modules\api\controllers;
use app\modules\admin\models\forms\LoginForm;
use OpenApi\Attributes as OA;
use Yii;
use yii\filters\auth\HttpBearerAuth;
use yii\rest\Controller;
use yii\web\Response;
@denrad
denrad / docker-compose.yml
Created July 28, 2023 11:02
Moodle Docker
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0
version: '2'
services:
mariadb:
image: docker.io/bitnami/mariadb:10.6
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=yes
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Справочник Новосела</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8" />
<script>
/*! jQuery v3.1.0 | (c) jQuery Foundation | jquery.org/license */
import requests
from bs4 import BeautifulSoup
import datetime
import pytz
import feedgen.feed
from feedgen.entry import FeedEntry
# URL to scrape
url = 'https://gcheb.cap.ru/news/?type=news'
<?xml version='1.0' encoding='UTF-8'?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"><channel><title>News from https://gcheb.cap.ru/news/?type=news</title><link>https://gcheb.cap.ru/news/?type=news</link><description>Latest news from the Cheboksary City Government website</description><docs>http://www.rssboard.org/rss-specification</docs><generator>python-feedgen</generator><lastBuildDate>Sat, 11 Mar 2023 07:05:20 +0000</lastBuildDate><item><title>Благодаря дорожному нацпроекту в Чебоксарах за 7 лет в 2 раза сократились объемы ямочного ремонта</title><link>https://gcheb.cap.ru/news/2023/03/09/blagodarya-dorozhnomu-nacproektu-v-cheboksarah-za</link><description>Резкие температурные перепады ожидаемо привели к образованию выбоин и дорожных дефектов. По заданию главы администрации г.Чебоксары Дениса Спирина в Чебоксарах дорожные бригады усиливают работы по ликвидации ям. К более массовым работам столичные службы перейдут при улучшении погодны
<?php
namespace console\models;
use common\active_records\{
AggregationConversions,
Currency,
Merchant,
PayinTransitPackage,
PaymentSystem,
<?php
namespace tests\common\integration\drivers\paymentsystems\monetix;
use common\drivers\paymentsystems\monetix\exceptions\MonetixException;
use domain\exceptions\MutexException;
use domain\mutex\interfaces\TransactionBatchMutex;
use domain\transactions\business_scheme\processes\ProcessesFlow;
use domain\transactions\interfaces\{
PayinTransaction,
<?php
/**
* Ищем в выгрузке твитов от Twitter запрещенные в РФ ссылки и показываем твиты, их содержащие
*/
ini_set('memory_limit', '1G'); // Для разбора больших JSON файлов нужен большой лимит
const PROHIBITED_URLS = [
'meduza.io',
<?php
namespace tests\domain\unit\drivers\paymentsystems\connectum;
use domain\drivers\paymentsystems\connectum\Client;
use domain\drivers\paymentsystems\connectum\interfaces\Client as ClientInterface;
use domain\drivers\paymentsystems\connectum\interfaces\Command;
use domain\drivers\paymentsystems\interfaces\CurlWrapper;
use domain\drivers\paymentsystems\interfaces\Logger;
use GuzzleHttp\Psr7\Response;
version: '2'
services:
php:
image: yiisoftware/yii2-php:8.0-apache
volumes:
- ~/.composer-docker/cache:/root/.composer/cache:delegated
- ./:/app:delegated
ports:
- '80:80'
networks: