Skip to content

Instantly share code, notes, and snippets.

View Rolf's full-sized avatar
🏠
Working from home

Artyom Rolf

🏠
Working from home
View GitHub Profile
@Mevrael
Mevrael / WebSocketController.php
Created March 14, 2017 10:40
Laravel + WebSocket (Ratchet/ReactPHP) integration
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Session;
use Ratchet\WebSocket\Version\RFC6455\Connection;
@ankurk91
ankurk91 / xdebug-mac.md
Last active September 20, 2025 11:22
php xDebug v3 on Ubuntu/Mac and phpStorm

🪲 Install and Configure xDebug v3 on MacOS for PhpStorm 🐘

  • Assuming that you have already installed php and apache via Homebrew

  • Install xDebug php extension

pecl channel-update pecl.php.net
pecl clear-cache

pecl install xdebug
@nyphalim
nyphalim / search_price.php
Created February 9, 2016 03:27
Вывод цены товара в компоненте поиска по заголовкам
<?$arPrice = CCatalogProduct::GetOptimalPrice($arItem["ITEM_ID"], 1, $USER->GetUserGroupArray());
if($arPrice):?>
<div class="cost"><?=CurrencyFormat($arPrice["PRICE"]["PRICE"], "RUB");?> р.</div>
<?endif;?>
@pfrenssen
pfrenssen / README.md
Last active May 10, 2022 14:00
Git hook to check coding standards using PHP CodeSniffer before pushing

About

This is a git pre-push hook intended to help developers keep their PHP code base clean by performing a scan with PHP CodeSniffer whenever new code is pushed to the repository. When any coding standards violations are present the push is rejected, allowing the developer to fix the code before making it public.

To increase performance only the changed files are checked when new code is