Skip to content

Instantly share code, notes, and snippets.

Dmitry Udod dmitry-udod

Block or report user

Report or block dmitry-udod

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dmitry-udod
dmitry-udod / laravel_bik_validation.php
Last active Apr 24, 2019
Валидация банковских данных. соответствие БИК и расчетного счета (корреспондентского) банка (Laravel). Bank data validation bik and accounts
View laravel_bik_validation.php
<?php
namespace App\Rules;
use Illuminate\Contracts\Validation\Rule;
class CheckBankAccount implements Rule
{
public $bikForTest = '';
@dmitry-udod
dmitry-udod / .travis.yml
Created Jul 13, 2018
TravisCI for Laravel 5.6 (PostgreSQL, PHPUnit)
View .travis.yml
os:
- linux
language: php
php:
- '7.1'
services:
- postgresql
View Present simple
I, you, we, they + do
He, she, it + does
I, you, we, they + do not / don’t + do
He, she, it + does not / doesn’t + do
Do + I, you, we, they + do?
Does + he, she, it + do?
-ss, -ch, -sh, -x в конце глагола + -es: fix – fixes
согласный + -y в конце глагола + -es: study – studies
гласный + -y в конце глагола + -s: play – plays
View gist:0843685b8235a0692403126e5d300e4a
select DISTINCT ON (t.orders) * from (select max(id) id, max(email), max(orders) as orders, campaign_id from coupons group by campaign_id ORDER BY orders DESC) as t ORDER BY t.orders DESC
@dmitry-udod
dmitry-udod / gist:25ffec34abbdbd8648835c4f44832a4f
Created Aug 30, 2016
Golang convert int or string to int
View gist:25ffec34abbdbd8648835c4f44832a4f
package main
import (
"encoding/json"
"fmt"
"log"
)
type Object struct {
Num json.Number
View .zshrc
export GOPATH=`pwd`
export PATH="$PATH:$GOPATH/bin"
echo -e "\033[0;32m CURRENT GOPATH IS: $GOPATH \e[0m"
alias rp='source ~/.zshrc'
@dmitry-udod
dmitry-udod / ReactPHP process POST request
Created May 12, 2014
ReactPHP process POST request
View ReactPHP process POST request
$http->on('request', function ($request, $response) {
$sink = new React\Stream\BufferedSink();
$request->pipe($sink);
$sink->promise()->then(function ($requestBody) use ($response) {
parse_str($requestBody, $requestData);
var_dump($requestData);
$response->writeHead();
$response->end("Hi, thanks man.\n");
View gist:10111911
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "Video Catalog",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
You can’t perform that action at this time.