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
curl --insecure -X POST -H "Content-Type: application/json" https://front.site-dev.fr:8002/api/login_check -d '{"username":"johndoe","password":"test"}' |
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
$credentials = base64_encode("admin:SuperSecret123"); | |
$apiResponse = $this->client->get("{$this->container->getParameter('api')}jwt/token", | |
[ | |
'verify' => false, | |
'headers' => [ | |
'Authorization' => 'Basic ' . $credentials, | |
], | |
]); |
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 CoreBundle\Service; | |
use CoreBundle\Entity\User; | |
use Psr\Cache\CacheItemPoolInterface; | |
use Symfony\Component\Cache\Adapter\AbstractAdapter; | |
use Symfony\Component\Cache\Adapter\AdapterInterface; | |
class UserTokenService |
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 | |
/** | |
* @file | |
* Contains \Drupal\example_module\Controller\ExampleModuleController. | |
*/ | |
// THIS FILE BELONGS AT /example_module/src/Controller/ExampleModuleController.php | |
namespace Drupal\example_module\Controller; |
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
7 rwx | |
6 rw- | |
5 r-x | |
4 r-- | |
3 -wx | |
2 -w- | |
1 --x | |
0 --- |
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
# Backup | |
# Added current date and time to generated file name. | |
docker exec preprod_safefood_vitrine_mariadb /usr/bin/mysqldump -u safefood_vitrine --password=safefood_vitrine123 drupal > $(date +"%Y_%m_%d_%I_%M_%p").sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE |
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
#!/bin/bash | |
cd /home/ubuntu/docker | |
sudo rm -rf dhm-it-docker-backup/ | |
cp -r dhm-it-docker dhm-it-docker-backup | |
datetime=$(date +"%Y_%m_%d_%I_%M_%p") | |
docker exec dhmit_mariadb /usr/bin/mysqldump -u dhmit --password=dhmit123 drupal > /home/ubuntu/docker/dhm-it-docker-backup/docker/etc/mysql/$datetime.sql | |
cd dhm-it-docker | |
docker-compose stop | |
docker-compose rm -f | |
docker volume rm $(docker volume ls -q) |
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
<html> | |
<header> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></script> | |
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> | |
<script src="https://cdn.rawgit.com/oauth-io/oauth-js/c5af4519/dist/oauth.js"></script> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-social/4.12.0/bootstrap-social.min.css"> | |
</header> | |
<body> |
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
<template> | |
<div class="login"> | |
<div class="container"> | |
<form id="loginForm" v-on:submit.prevent="login"> | |
<div class="col-12 content-block"> | |
<div class="content-block-text"> | |
<h2>Aanmelden</h2> | |
</div> | |
<div class="content-block-text"> | |
<hr> |
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 fra -y | |
drush fr-all --force -y | |
drush fl | |
drush cc all | |
drush mmmff --all | |
drush rr | |
drush updb -y | |
drush uli |