Skip to content

Instantly share code, notes, and snippets.

View alexsoin's full-sized avatar

Alex Soin alexsoin

View GitHub Profile

#Laravel Routing, Request, Response, Validator

Ajax №5 или Laravel Routes для кастомных роутов и аякс запросов

Очень долгая история с вопросом как же правильно рабатать с Ajax в Evo вот методы которые предлагались ранеее:

В Evo 3.0 предлагаем поставить точку в выборе правильного решения через Laravel Routes

@TrywaR
TrywaR / msTelegramBot.php
Created October 15, 2019 01:54
MODX Revo | MiniShop2 | Telegram > Отправка уведомлений в телегу о заказе и статусах
<?php
// msOnCreateOrder
// msOnChangeOrderStatus
switch ($modx->event->name) {
case 'msOnCreateOrder':
// Новый заказ
// $modx->log(xPDO::LOG_LEVEL_ERROR, 'msOnCreateOrder');
$iOrderId = $msOrder->get('id');
$oOrder = $order->get();
@Norserium
Norserium / agGrid-ru.js
Created March 27, 2019 10:48
Russian localization for agGrid / Русская локализация для agGrid
{
// for filter panel
page: 'Страница',
more: 'ещё',
to: 'к',
of: 'из',
next: 'Следующая',
last: 'Последняя',
first: 'Первая',
previous: 'Предыдущая',
@subfuzion
subfuzion / curl.md
Last active May 31, 2024 09:45
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@marcjenkins
marcjenkins / .gitignore
Created April 17, 2014 17:36
.gitignore for MODX projects
# ignore everything in this directory
/*
# but not these
!.gitignore
!assets/
!core/
!_SASS/
!_JS/
@jacksonfdam
jacksonfdam / gist:3000275
Created June 26, 2012 23:56
Regular Expressions List
//Regular Expressions List
//Short Tutorial
\ // the escape character - used to find an instance of a metacharacter like a period, brackets, etc.
. // match any character except newline
x // match any instance of x
^x // match any character except x
[x] // match any instance of x in the bracketed range - [abxyz] will match any instance of a, b, x, y, or z
| // an OR operator - [x|y] will match an instance of x or y
@realmyst
realmyst / gist:1262561
Created October 4, 2011 19:34
Склонение числительных в javascript
function declOfNum(number, titles) {
cases = [2, 0, 1, 1, 1, 2];
return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ];
}
use:
declOfNum(count, ['найдена', 'найдено', 'найдены']);