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 parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
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
<phpunit | |
bootstrap="./tests/bootstrap.php" | |
backupGlobals="false" | |
colors="true" | |
convertErrorsToExceptions="true" | |
convertNoticesToExceptions="true" | |
convertWarningsToExceptions="true"> | |
<php> | |
<const name="WP_DEFAULT_THEME" value="epicbeat" /> | |
<const name="WP_ENVIRONMENT" value="LOCAL" /> |
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
cd /usr/local/bin | |
sudo ln -s phpunit phpunit.phar |
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 Fatal error: Uncaught exception 'UnexpectedValueException' with message 'Cannot create phar '/usr/local/bin', file extension (or combination) not recognised or the directory does not exist' in /home/vagrant/.phpstorm_helpers/phpunit.php:181 |
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 | |
$arr =array( | |
'test 1' => 'successful', | |
'test 2' => 'failure', | |
'test 3' => 1, | |
'test 4' => false | |
); |
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
openssl genrsa -out example.com.key 2048 | |
openssl req -new -x509 -key example.com.key -out example.com.cert -days 3650 -subj /CN=example.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
#adding custom SSL cert | |
SSLEngine on | |
SSLCertificateFile /vagrant/example.com.cert | |
SSLCertificateKeyFile /vagrant/example.com.key |
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
<VirtualHost *:80> | |
ServerName local.example.com | |
DocumentRoot /vagrant | |
Redirect permanent / https://local.example.com/ | |
</VirtualHost> |
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
if ( epictions_uri_slot(1) == 'v1' ) : | |
if ( epictions_uri_slot( 2 ) == 'validate' ) : | |
$api->validateApiRequest(); | |
elseif ( epictions_uri_slot( 2 ) == 'insert_curation_post' ) : | |
$api->insertCurationPost(); | |
elseif ( epictions_uri_slot( 2 ) ) : | |
$action = epictions_uri_slot( 2 ); | |
if ( has_action( "epictions_client_init_request_{$action}" ) ) : | |
do_action( "epictions_client_init_request_{$action}" ); | |
else : |
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
<div style="max-width: 100%; overflow: hidden;">{{image}}</div> | |
{{title}} | |
{{publish_date}} | |
{{description}} | |
<p class="curated_content"><a class="cs_link" href="{{source_url}}" target="_blank" rel="nofollow noopener noreferrer">{{source_url}}</a></p> | |
<hr /> |
OlderNewer