# Double interligne
sed G
# Double interligne (fichier déjà partiellement espacé)
# La sortie ne contient jamais plus d'une ligne vide consécutive
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
| // | |
| // Golden Ratio Typography | |
| // -------------------------------------------------- | |
| // Golden Ratio Math | |
| // | |
| // Let's do some math so we can build beautiful typography and vertical rhythm. | |
| // For any magic to happen, set the $ContentWidth variable on _variables.scss | |
| // to match your content box width (normally this is 640px, 740px, etc...). |
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
| CREATE USER `user`@`%` IDENTIFIED VIA mysql_native_password USING '*6048229B303DAF9E889FCB02B385C27823607B85' OR unix_socket; | |
| SHOW CREATE USER `user`@`%`\G | |
| GRANT ALL PRIVILEGES ON *.* TO `user`@`%`; | |
| FLUSH PRIVILEGES; | |
| SET GLOBAL general_log = 'ON'; | |
| SET GLOBAL log_output='TABLE'; | |
| SET GLOBAL slow_query_log=1; | |
| SET GLOBAL log_output='TABLE'; | |
| SET GLOBAL long_query_time=5.0; |
My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)
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
| $sql = 'INSERT INTO users.contacts (firstname, created_at) VALUES (?, ?)'; | |
| $query = $db->prepare($sql); | |
| $faker = Faker\Factory::create('fr_FR'); | |
| $insertedPKs = array(); | |
| for ($i = 0; $i < 100; $i++) { | |
| $query->bindValue(1, $faker->firstName, PDO::PARAM_STR); | |
| // $stmt->bindValue(2, $faker->lastName, PDO::PARAM_STR); | |
| $query->bindValue(2, $faker->date("Y-m-d H:i:s"), PDO::PARAM_STR); | |
| // $stmt->bindValue(1, $faker->email, PDO::PARAM_STR); | |
| $query->execute(); |