- OS: Ubuntu 14.04 X64
- CPU: Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz
- RAM: 8GB
- go: go version go1.3 linux/amd64
- nodejs: v0.10.30
This file contains hidden or 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 | |
trait TestCaseTrait | |
{ | |
protected function callObjectMethod($object, $methodName) | |
{ | |
$args = func_get_args(); | |
array_shift($args); //$object | |
array_shift($args); //$methodName | |
$reflect = new \ReflectionClass($object); |
This file contains hidden or 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
# Baseline setting to Include for SSL sites | |
SSLEngine on | |
#SSLUseStapling on | |
#SSLStaplingCache "shmcb:logs/stapling-cache(150000)" | |
#SSLStaplingResponseMaxAge 900 | |
# Intermediate configuration, tweak to your needs | |
SSLProtocol all -SSLv2 -SSLv3 | |
SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA |
This file contains hidden or 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 | |
abstract class Foo | |
{ | |
protected $records; | |
public function __construct() | |
{ | |
$this->records = $this->setRecords(); | |
} |
This file contains hidden or 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 | |
<?php | |
class Controller | |
{ | |
/** | |
* @DI\Inject() | |
*/ | |
protected $validator; | |
/** |
This file contains hidden or 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 | |
$limit = 30; // 產生組數 | |
$base32 = array_merge(range('A', 'Z'), range(2, 7)); | |
$length = 6; | |
for($i = 0; $i < $limit; $i++){ | |
$code = ''; | |
for($j = 0; $j < $length; $j++){ | |
$code .= $base32[rand(0, 31)]; |
This file contains hidden or 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 My\Custom\User; | |
use FOS\UserBundle\Security; | |
use Symfony\Component\Security\Core\User\UserInterface; | |
class UserProvider extends EmailUserProvider | |
{ | |
public function refreshUser(UserInterface $user) | |
{ | |
return $user; |