Skip to content

Instantly share code, notes, and snippets.

Dmitriy Kepov DKepov

Block or report user

Report or block DKepov

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
@DKepov
DKepov / logRequest.php
Last active Dec 7, 2019
logRequest.php
View logRequest.php
<?php
function logRequest($targetFile)
{
$headerList = [];
foreach ($_SERVER as $name => $value) {
if (0 === strpos($name, 'HTTP_')) {
$name = str_replace('_', ' ', substr($name, 5));
$name = ucwords(strtolower($name));
View JSON-RPC_2_0_Спецификация.txt
JSON-RPC 2.0 Спецификация
Дата создания:
2010-03-26 (в зависимости от версии 2009-05-24)
Обновлено:
2013-01-04
Автор:
Рабочая группа JSON-RPC <json-rpc@googlegroups.com>
Содержание
Обзор
View router.js
var Router = {
routes: [],
mode: null,
root: '/',
config: function(options) {
this.mode = options && options.mode && options.mode == 'history'
&& !!(history.pushState) ? 'history' : 'hash';
this.root = options && options.root ? '/' + this.clearSlashes(options.root) + '/' : '/';
return this;
},
@DKepov
DKepov / .php
Created Feb 1, 2019
To /usr/sbin/sendmail
View .php
```php
#!/usr/bin/php
<?php
//====================================================
// Program : Fake send mail
// Author : pouletfou at gmail
// Description : save this file as /usr/sbin/sendmail
// and you can test your PHP applications using mail
// by looking at the /tmp/fakesendmail.log files.
//====================================================
@DKepov
DKepov / index.js
Created Nov 30, 2017
requirebin sketch
View index.js
var MersenneTwister = require('mersenne-twister');
var seed = 111;
generator = new MersenneTwister(seed);
var body = document.querySelector('body')
var pre = document.createElement('pre');
pre.innerHTML = JSON.stringify(generator, null, ' ');
body.appendChild(pre);
@DKepov
DKepov / index.js
Created Nov 30, 2017
requirebin sketch
View index.js
var jazzicon = require('jazzicon')
var body = document.querySelector('body')
for(var i = 0; i < 600; i++) {
var el = jazzicon(100, 111)
body.appendChild(el)
}
@DKepov
DKepov / new_gist_file
Created Jul 11, 2016 — forked from shcoderAlex/new_gist_file
Инструкция по монге
View new_gist_file
/*
* Конспект по MongoDB
* @author Alexey Vikarchuk
* @editor Amantay Eldar
*/
//========================= ~INSTALLING ==========================
INSTALLING / УСТАНОВКА:
Самый простой способ установки MongoDB - это установка через официальный .deb пакет для LinuxUbuntu (Linux Mint и прочих ubuntu-форков).
1. Установите 10gen GnuPG Public Key:
@DKepov
DKepov / Dockerfile
Created Jun 29, 2016 — forked from ebuildy/Dockerfile
Install Php 7 with MongoDB driver on Docker from Ubuntu trusty base image.
View Dockerfile
FROM ubuntu:trusty
ENV HOME /root
ENV LC_ALL C.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
RUN add-apt-repository ppa:ondrej/php && \
apt-get update
View ...app_Exceptions_Handler.php
```php
<?php
namespace App\Exceptions;
use Exception;
use Illuminate\Validation\ValidationException;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
@DKepov
DKepov / php.md
Created Oct 16, 2015
receive letters for criteria
View php.md
<?php
/**
 * Class Imap
 *
 * Инкапсуляция работы с почтой, по протоколу IMAP
 */
class Imap {

    private $imap_stream;
You can’t perform that action at this time.