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
\Blade::directive('var', function($expression) { | |
$segments = array_map(function($segment) { | |
return trim($segment); | |
}, explode(',', preg_replace("/[\(\)\\\"\']/", '', $expression))); | |
return '<?php $' . $segments[0] . " = '" . $segments[1] . "' ?>"; | |
}); |
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 Vue = require('vue'); | |
var validator = require('vue-validator'); | |
Vue.use(validator); | |
// Change this when compiling for production | |
Vue.config.debug = true; | |
Vue.config.silent = false; | |
// Register some directives and filters |
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 | |
array_walk($x=file('i'),function(&$g) { | |
$g=explode('x', $g); | |
sort($g, SORT_NUMERIC); | |
}); | |
$p = $r = 0; | |
foreach ($x as $g) { | |
$p += 2*($g[0]*$g[1] + $g[0]*$g[2] + $g[1]*$g[2]) + $g[0]*$g[1]; | |
$r += 2*($g[0]+$g[1])+array_product($g); |
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 $p=$r=0;foreach(file('i')as$g){$g=explode('x',$g);sort($g,1);$z=$g[0]*$g[1];$y=$g[0]+$g[1];$p+=2*$g[2]*$y+3*$z;$r+=$y*2+$z*$g[2];}echo"$p,$r"; |
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 | |
$input = str_split(file('i')[0]); | |
$map = [ | |
'^' => [1,0], | |
'>' => [0,1], | |
'v' => [-1,0], | |
'<' => [0,-1], | |
]; |
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 | |
$f = str_split(file('i')[0]); | |
$map = [ | |
'^' => [1,0], | |
'>' => [0,1], | |
'v' => [-1,0], | |
'<' => [0, -1], | |
]; |
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 default_server; | |
listen [::]:80 default_server; | |
server_name _; | |
return 301 https://$host$request_uri; | |
} | |
server { |
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\Providers; | |
use Illuminate\Support\ServiceProvider; | |
class ViewServiceProvider extends ServiceProvider | |
{ | |
public function register() | |
{ |
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
curl -X POST -H "X-MessageSystems-Webhook-Token: TOKEN_IF_YOU_NEED_IT -H "Cache-Control: no-cache" -d '[ | |
{ | |
"msys": { | |
"relay_message": { | |
"rcpt_to": "[email protected]", | |
"friendly_from": "[email protected]", | |
"customer_id": "1521", | |
"content": { | |
"text": "Simple Test\r\n\r\n", | |
"subject": "Simple Test Please Ignore This...", |
OlderNewer