Provider | Singleton | Instantiable | Configurable |
---|---|---|---|
Constant | Yes | No | No |
Value | Yes | No | No |
Service | Yes | No | No |
Factory | Yes | Yes | No |
Decorator | Yes | No? | No |
Provider | Yes | Yes | Yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -28,7 +28,7 @@ | |
### Set diff-cmd to the absolute path of your 'diff' program. | |
### This will override the compile-time default, which is to use | |
### Subversion's internal diff implementation. | |
-# diff-cmd = diff_program (diff, gdiff, etc.) | |
+diff-cmd = colordiff | |
### Set diff3-cmd to the absolute path of your 'diff3' program. | |
### This will override the compile-time default, which is to use | |
### Subversion's internal diff3 implementation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Custom_Walker_PageDropdown extends Walker_PageDropdown { | |
/** | |
* Starts the element output. | |
* @param array|string $args { | |
* | |
* @type int|string|callable $selected Value of the option that should be selected. | |
* Default 0. |
-
Cài đặt PHP-Code-Sniffer
composer global require "squizlabs/php_codesniffer=*"
-
Thêm bộ quy tắc Framgia PHP https://github.com/wataridori/framgia-php-codesniffer
-
Cài đặt Sublime Text package https://packagecontrol.io/packages/Phpcs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$text = $argv[1]; | |
$postdata = http_build_query([ | |
'q' => $text, | |
]); | |
$opts = [ | |
'http' => [ | |
'method' => 'POST', | |
'header' => 'Content-type: application/x-www-form-urlencoded', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$finder = PhpCsFixer\Finder::create() | |
// ->in(__DIR__ . '/config') | |
// ->in(__DIR__ . '/tests') | |
->in(__DIR__ . '/app'); | |
return PhpCsFixer\Config::create() | |
->setRules([ | |
'@PSR2' => true, |
- Install Docker
- Docker for Ubuntu: https://docs.docker.com/engine/installation/linux/ubuntulinux/
sudo apt-get update && apt-get install -y apt-transport-https ca-certificates sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D // Open the /etc/apt/sources.list.d/docker.list and add the following line then save it // Ubuntu 14.04 deb https://apt.dockerproject.org/repo ubuntu-trusty main
- Docker for Ubuntu: https://docs.docker.com/engine/installation/linux/ubuntulinux/
// Ubuntu 16.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Models; | |
use Illuminate\Notifications\Notifiable; | |
use Illuminate\Foundation\Auth\User as Authenticatable; | |
use Illuminate\Support\Facades\Hash; | |
class User extends Authenticatable | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create and insert data | |
CREATE TABLE `datetime_timestamp` ( | |
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | |
`datetime_value` datetime NOT NULL, | |
`timestamp_value` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
`inputted_timezone` varchar(255) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; | |
SET @@time_zone = 'SYSTEM'; |
OlderNewer