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
server { | |
listen 80; | |
server_name www.pixivlink.com pixivlink.com; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name pixivlink.com; |
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
#!/usr/bin/env bash | |
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
# Versions | |
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` |
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 | |
return PhpCsFixer\Config::create() | |
->setRiskyAllowed(true) | |
->setRules([ | |
'align_multiline_comment' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
'blank_line_before_statement' => true, | |
'list_syntax' => ['syntax' => 'long'], | |
'no_short_echo_tag' => true, |
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 | |
public function passes($attribute, $value) | |
{ | |
return preg_match('/^(13[0-9]|14[579]|15[0-3,5-9]|17[0135678]|18[0-9])\\d{8}$/',$value); | |
} |
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
.panel-body.content img { | |
width: 100%; | |
} | |
a.topic { | |
background: #eff6fa; | |
padding: 1px 10px 0; | |
border-radius: 30px; | |
text-decoration: none; | |
margin: 0 5px 5px 0; |
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
var debug = process.env.NODE_ENV !== "production"; | |
var webpack = require('webpack'); | |
module.exports = { | |
context: __dirname, | |
devtool: debug ? "inline-sourcemap" : null, | |
entry: "./js/entry.js", | |
output: { | |
path: __dirname + "/js", | |
filename: "app.min.js" |
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 | |
$eventTypes = []; | |
$score = 0; | |
foreach ($events as $event) { | |
$eventTypes[] = $event['type']; | |
} | |
foreach ($eventTypes as $eventType) { | |
switch ($eventType){ | |
case 'PushEvent': |
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
[program:laravel-worker] | |
process_name=%(program_name)s_%(process_num)02d | |
command=php /home/vagrant/Code/queue-series/artisan queue:listen --tries=3 | |
autostart=true | |
autorestart=true | |
numprocs=8 | |
redirect_stderr=true | |
stdout_logfile=/home/vagrant/Code/queue-series/storage/logs/worker.log |
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
function makeNum(number, func) { | |
if (func == null) { return number; } | |
else { return func(number); } | |
} | |
function two(func) { | |
return makeNum(2, func); | |
} | |
function three(func) { | |
return makeNum(3, func); | |
} |
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 | |
// Ping++ 的数据可以这样获取 | |
// $rawData = file_get_contents('php://input'); | |
// 判断是否返回 1 ,最后记得返回 http_response_code(200); | |
protected function verifyPing($rawData) { | |
$headers = \Pingpp\Util\Util::getRequestHeaders();//这是Ping++的package提供的 | |
$signature = isset($headers['X-Pingplusplus-Signature']) ? $headers['X-Pingplusplus-Signature'] : NULL; | |
$publicKeyContents = file_get_contents(public_path(). '/rsa_public_key.pem');//注意这里面的文件路径相对应 |
OlderNewer