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
SELECT order_id,product_name,qty | |
FROM orders | |
WHERE foo = 'bar' | |
INTO OUTFILE '/var/lib/mysql-files/orders.csv' | |
FIELDS TERMINATED BY ',' | |
ENCLOSED BY '"' | |
LINES TERMINATED BY '\n'; | |
Note: That syntax may need to be reordered to | |
SELECT order_id,product_name,qty |
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 TABLE new_table SELECT * FROM original_table; | |
Поверхностное клонирование | |
CREATE TABLE new_table LIKE original_table; | |
Глубокое клонирование | |
CREATE TABLE new_table LIKE original_table; | |
INSERT INTO new_table SELECT * FROM original_table; |
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 | |
function houzez_property_img_upload_houzi_import( $img_url ): array { | |
$upload_dir = wp_upload_dir(); | |
$image_data = file_get_contents( $img_url ); | |
$filename = basename( $img_url ); | |
if ( wp_mkdir_p( $upload_dir['path'] ) ) { |
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
Similar to Kaspar's answer but with the g flag to replace all the occurrences on a line. | |
find ./ -type f -exec sed -i 's/old_string/new_string/g' {} \; | |
For global case insensitive: | |
find ./ -type f -exec sed -i 's/old_string/new_string/gI' {} \; |
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
[Desktop Entry] | |
Version=1.0 | |
Name=название | |
Comment=описание | |
Exec=/путь/к/исполняемому/файлу | |
Icon=/путь/к/иконке | |
Terminal=false | |
Type=Application | |
Categories=категории |
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
du -hsx * | sort -rh | head -10 |
NewerOlder