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
const promise = new Promise(function(resolve) { | |
setTimeout(resolve, 3000); | |
}) | |
.then(() => { | |
console.log('After 3 sec!'); | |
}); |
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
version: '2' | |
services: | |
nginx: | |
image: nginx | |
ports: | |
- 8888:80 | |
volumes: | |
- ./:/usr/share/nginx/html | |
restart: always |
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
docker run --name my_solr -d -p 8983:8983 -t solr:8.2.0 | |
docker exec -it --user=solr my_solr bin/solr create_core -c techproducts | |
docker exec -it --user=solr my_solr bin/post -c techproducts example/exampledocs/ |
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
$client_id = ''; | |
$client_secret = ''; | |
$endpoint = "http://site.dev"; | |
if (!isset($_GET['access_token'])) { | |
print 'Access token is not define.'; | |
die; | |
} | |
$curl = curl_init($endpoint . '/api/sso/v0.1/user/profile'); |
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
$client_id = ''; | |
$client_secret = ''; | |
$endpoint = "http://site.dev"; | |
$curl = curl_init($endpoint . '/oauth2/token'); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($curl, CURLOPT_POST, true); | |
curl_setopt($curl, CURLOPT_HEADER,'Content-Type: application/x-www-form-urlencoded'); | |
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); |
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
/** | |
* Implements hook_menu(). | |
*/ | |
function ftop_menu_alters_menu() { | |
$base_404 = array( | |
'page callback' => '_ftop_menu_alters_redirect', | |
'page arguments' => array(0), | |
'access callback' => TRUE, |