Skip to content

Instantly share code, notes, and snippets.

@Mausglov
Mausglov / bitrix phpUnit bootstrap
Created March 30, 2014 21:13
бутстрап для любых консольных скриптов под Битрикс
<?php
/**
* бутстрап для любых консольных скриптов под Битрикс
*/
define("LANG", "ru");
define("NO_KEEP_STATISTIC", true);
define("NOT_CHECK_PERMISSIONS", true);
define("BX_BUFFER_USED", true);
// это отключает исполнение агентов
define("BX_CLUSTER_GROUP", 2);
@umidjons
umidjons / scopes-yii.php
Created February 25, 2014 05:53
Yii: Named and parameterized scopes example
<?php
/**
* This is the model class for table "news_comments".
*
* The followings are the available columns in table 'news_comments':
* @property string $id
* @property integer $news_id
* @property string $author
* @property string $text
@aynm142
aynm142 / api reg
Created October 20, 2017 17:34
api.php
/**
* @SWG\Post(
* path="/login/api",
* summary="Store new or update existing device",
* tags={"Login"},
* description="Store new or update existing device. <strong>Authorization header required</strong>",
* operationId="postDevice",
* consumes={"application/json", "application/x-www-form-urlencoded"},
* produces={"application/json"},
* @SWG\Parameter(
<?php
namespace PetstoreIO;
final class PetController
{
/**
* @SWG\Get(
* path="/pet/findByTags",
@jthomaschewski
jthomaschewski / _directives.graphql
Created October 22, 2018 08:54
Lighthouse GraphQL Directives (WIP)
# Scalar directives
directive @scalar(class: String!) on SCALAR
# ENUM directives
directive @enum(value: ID!) on ENUM_VALUE
# Union directives
directive @union(resolver: String!) on UNION
Вы ранее привлекались за хранение данных в глобальных переменных?
Вы когда-нибудь делали .Net за деньги?
Сформулируйте зависимость времени исправления критического бага от seniority присутствующего менеджера
В своём резюме вы указали знание php. вам не стыдно?
Перед вами кисть, холст и мольберт. напишите компилятор
@mikehaertl
mikehaertl / README.md
Last active September 19, 2022 21:20
How to develop with docker and Yii2

Docker Development Workflow

These ideas are WORK IN PROGRESS!

Summary

The core idea with this workflow is that we end up with a self contained docker image of your application. This image will not only contain our code, but also all the dependencies that are neccessary to run the code. This image can then be used for both, easy deployment in production and as basis for ongoing development.

The image is not a static, though. In fact, it will see many revisions over time - which is supported nicely through dockers inheritance approach. We basically

@hipsterjazzbo
hipsterjazzbo / directives.graphql
Last active May 18, 2023 02:37
A list of all the directive definitions for version 3.7 of https://github.com/nuwave/lighthouse
directive @all(
"""
Specify the class name of the model to use.
This is only needed when the default model resolution does not work.
"""
model: String
"""
Apply scopes to the underlying query.
"""
@chuckrincon
chuckrincon / ConfigServiceProvider.php
Last active October 10, 2023 14:13
Load all your lumen config files painless.
<?php
namespace App\Providers;
use Illuminate\Support\Facades\App;
use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
class ConfigServiceProvider extends ServiceProvider
{