Литература для рекомендации
- Документация PHP - http://php.net/
- http://www.phptherightway.com/
- Мэт Зандстра "PHP. Объекты, шаблоны и методики программирования" ISBN 978-5-8459-1922-9
- Мартин. Чистый код.
JSONAPIObject: | |
description: Includes the current JSON:API version for this specification as well as optional meta information | |
type: object | |
required: | |
- version | |
properties: | |
version: | |
type: string | |
default: '1.0' | |
example: '1.0' |
tail -f -n 450 storage/logs/laravel*.log \ | |
| grep -i -E \ | |
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \ | |
--color |
Литература для рекомендации
[user] | |
name = telless | |
email = [email protected] | |
[core] | |
excludesfile = ~/.gitignore_global | |
editor = vscode | |
# set autocrlf = true for Windows | |
autocrlf = input | |
safecrlf = true | |
[push] |
@echo off | |
FOR /f "tokens=*" %%i IN ('docker ps -aq') DO docker rm %%i | |
FOR /f "tokens=*" %%i IN ('docker images --format "{{.ID}}"') DO docker rmi %%i |
# All the command used here : http://blog.madrzejewski.com/faire-fonctionner-curl-en-https-dans-un-environnement-php-fpm-chroote | |
# Centos 7.1, the libs named may changed in the future, so don't just copy/paste and check on your system first | |
# First example, chroot bash | |
mkdir chroot_bash | |
mkdir -p chroot_bash/usr/bin | |
cp /usr/bin/bash chroot_bash/usr/bin | |
chroot chroot_bash/ bash | |
chroot: failed to run command ‘bash’: No such file or directory |
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback | |
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB; | |
// Open (or create) the database | |
var open = indexedDB.open("MyDatabase", 1); | |
// Create the schema | |
open.onupgradeneeded = function() { | |
var db = open.result; | |
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"}); |
<?php | |
/** | |
* Laravel Version Check | |
* | |
* @return bool | |
*/ | |
private function isLaravel4() | |
{ | |
return version_compare(get_class($this->app) . '::VERSION', '5', '<'); |
<?php | |
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); | |
$uri = urldecode($uri); | |
if ($uri === '/' || isset($_SERVER['SCRIPT_FILENAME']) || file_exists($_SERVER['DOCUMENT_ROOT'].$uri)) { | |
return false; | |
} else { | |
if (file_exists(__DIR__.$uri)) { | |
if (is_dir(__DIR__.$uri)) { |
<?php namespace Vendor\Library; | |
use Another\Vendor\Library\ClassName; | |
abstract class ClassName extends AnotherClass implements Countable, Serializable | |
{ | |
const CONSTANTS = 'top'; | |
use someTrait, anotherTrait { | |
anotherTrait::traitMethod insteadof someTrait; |