curl -d "[email protected]&password=password" localhost:3000/login -c - | curl -b @- localhost:3000/account
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 | |
$array = [ | |
0 => [ | |
'id' => 'a' | |
], | |
1 => [ | |
'id' => 'b' | |
], |
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 | |
public function testException() { | |
$this->expectExceptionMessage('DOMDocument::loadXML(): Opening and ending tag mismatch: baz line 3 and root in Entity, line: 4'); | |
// invalid xml | |
$xml = '<root> | |
<foo>bar</foo> | |
<baz> |
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 array union | |
// http://php.net/manual/en/language.operators.array.php | |
$foo = [ | |
'bar', | |
'baz', | |
'qux', | |
]; |
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
<%= something do-%> | |
<h4>hello world</h4> | |
<% end -%> |
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
$ composer exec phpunit test/SampleTest.php | |
PHPUnit 5.5.5 by Sebastian Bergmann and contributors. | |
.. 2 / 2 (100%) | |
Time: 10 ms, Memory: 4.00MB | |
OK (2 tests, 6 assertions) | |
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 Example; | |
class Foo { | |
private $logger; | |
__construct (\Psr\Log\LoggerInterface $logger = new \Psr\Log\NullLogger()) { | |
$this->logger = $logger; | |
} | |
public function bar($baz) { | |
$this->logger->addDebug($baz); |
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
{ | |
"data": [ | |
{ | |
"id": "1", | |
"title": "foo" | |
}, | |
{ | |
"id": "2", | |
"title": "bar" | |
}, |
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
drush mi acme --update | |
Invalid argument supplied for foreach() Iterator.php:26 [warning] | |
InvalidArgumentException: Placeholders must have a trailing [] if they are to be expanded with an array of [error] | |
values. in Drupal\Core\Database\Connection->expandArguments() (line 714 of | |
/var/www/html/drupal/web/core/lib/Drupal/Core/Database/Connection.php). | |
Placeholders must have a trailing [] if they are to be expanded with an array of values. [error] | |
(/var/www/html/drupal/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php:770) | |
Invalid argument supplied for foreach() Iterator.php:26 [warning] | |
InvalidArgumentException: Placeholders must have a trailing [] if they are to be expanded with an array of [error] | |
values. in Drupal\Core\Database\Connection->expandArguments() (line 714 of |
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
$(document).ready(function(){ | |
$('.pledge_submit').click(function () { | |
console.log("foo"); | |
$('.pledge_modal_screen1').hide(); | |
$('.pledge_modal_screen2').show(); | |
}); | |
}); |