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
import {Controller} from '@hotwired/stimulus' | |
/* stimulusFetch: 'lazy' */ | |
export default class extends Controller { | |
static values = { | |
class: String, | |
} | |
connect() { | |
this.checkBoxes = document.getElementsByClassName(this.classValue); |
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
import {Controller} from '@hotwired/stimulus' | |
import intlTelInput from 'intl-tel-input'; | |
export default class extends Controller { | |
static targets = ['input']; | |
static values = { | |
currentNumber: String | |
}; |
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\Form; | |
class MyGreatForm extends AbstractType | |
{ | |
public function buildForm(FormBuilderInterface $builder, array $options): void | |
{ | |
$builder | |
->add('tmpPhone', TextType::class, [ |
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 class="col-12 col-md-6"> | |
<div class="col-12"> | |
{{ form_label(form.tmpPhone) }} | |
</div> | |
<div class="col-12" {{ stimulus_controller('intl-tel-input' , { | |
'locale' : app.request.locale, | |
'currentNumber': reservation.phone | |
}) }}> | |
{{ form_widget(form.tmpPhone) }} | |
</div> |
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
mage: jakzal/phpqa:php7.4 //On utilise cette image comme pour un container Docker | |
before_script: // On précise qu’avant le lancement du script on installe les dépendances du projet pour ensuite vérifier leurs éventuelles failles | |
- composer install | |
cache: // On met en cache pour la prochaine fois toutes les dépendances déjà installées | |
paths: | |
- vendor/ | |
stages: // On nomme nos étapes et leur ordre |
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\Controller; | |
class BlogController extends AbstractController | |
{ | |
// ... ça va bien ? | |
public function oneArticle(Request $request, EntityManagerInterface $em, string $categorySlug, string $articleSlug) | |
{ |
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\Repository; | |
class BlogArticleRepository extends ServiceEntityRepository | |
{ | |
// ... BLABLABLA | |
/* | |
Attention, cette requête est uniquement basé sur les anciens slugs et rien d'autre ! |
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\Entity; | |
class BlogArticle | |
{ | |
// ... Les autres attribus de la classe | |
/** | |
* @ORM\Column(type="json") |
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
require 'jwt' | |
key_file = 'key.txt' | |
team_id = '' | |
client_id = '' | |
key_id = '' | |
ecdsa_key = OpenSSL::PKey::EC.new IO.read key_file | |
headers = { |
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
0 0 * * * mysqldump -h db -u ${MYSQL_USER} -p${MYSQL_PASSWORD} —databases ${MYSQL_DATABASE} —skip-comments > /home/backups/backup_$(date +\%Y\%m\%d\%H\%M).sql |
NewerOlder