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
UPDATE TABLE_NAME SET COLUMN = REPLACE(COLUMN,'Š','S'); | |
UPDATE TABLE_NAME SET COLUMN = REPLACE(COLUMN,'š','s'); | |
UPDATE TABLE_NAME SET COLUMN = REPLACE(COLUMN,'Ð','Dj'); | |
UPDATE TABLE_NAME SET COLUMN = REPLACE(COLUMN,'Ž','Z'); | |
UPDATE TABLE_NAME SET COLUMN = REPLACE(COLUMN,'ž','z'); | |
UPDATE TABLE_NAME SET COLUMN = REPLACE(COLUMN,'À','A'); | |
UPDATE TABLE_NAME SET COLUMN = REPLACE(COLUMN,'Á','A'); | |
UPDATE TABLE_NAME SET COLUMN = REPLACE(COLUMN,'Â','A'); | |
UPDATE TABLE_NAME SET COLUMN = REPLACE(COLUMN,'Ã','A'); | |
UPDATE TABLE_NAME SET COLUMN = REPLACE(COLUMN,'Ä','A'); |
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
while read -r url name ; do | |
wget -O $name $url | |
done < images.txt |
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
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}", | |
"initialCols": 120, | |
"initialRows": 30, | |
"copyOnSelect": true, | |
"profiles": { | |
"defaults": { | |
"acrylicOpacity": 0.85, | |
"cursorColor": "#CCC", |
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
REM WSL symlink guide here https://dev.to/themartes_/how-to-make-wsl2-even-faster-with-fast-git-28p8 | |
REM --------------------- | |
REM Now when we have our script we need to run it every time we boot into our machine. We also need to do that with the highest privileges because you need to be an admin to make a symlink from network drive to your base drive. | |
REM So go ahead and search for Task Scheduler. On the left sidebar you will see Task Scheduler Library. Click on it and on the right sidebar click on Create Task.... | |
REM Now make sure you'll give a name to your task, then write a little description and Check "Run with highest privileges". Also make sure you'll change Configure for: To Windows10 | |
REM Next click on Triggers tab and add new trigger. This will look fairly simple, Just make sure it's like this, and click OK. | |
REM Next click on Actions add New and Select the .bat script we created earlier with the following code: | |
REM --------------------- | |
@echo off |
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
https://example.com/file1.gz | |
https://example.com/file2.gz | |
https://example.com/file3.gz |
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
# Enable Compression | |
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
AddOutputFilterByType DEFLATE application/x-font | |
AddOutputFilterByType DEFLATE application/x-font-opentype | |
AddOutputFilterByType DEFLATE application/x-font-otf | |
AddOutputFilterByType DEFLATE application/x-font-truetype | |
AddOutputFilterByType DEFLATE application/x-font-ttf |
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
UPDATE | |
wp_posts | |
SET | |
post_content = ( | |
REPLACE(post_content, 'src="http://', 'src="//') | |
) | |
WHERE | |
INSTR(post_content, 'jpeg') > 0 | |
OR INSTR(post_content, 'jpg') > 0 | |
OR INSTR(post_content, 'gif') > 0 |
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
SELECT | |
COUNT(*) as total | |
FROM | |
wp_posts as p | |
JOIN wp_postmeta as m ON p.ID = m.post_id | |
WHERE | |
p.`post_type` = 'page' | |
AND p.`post_status` = 'publish' | |
AND m.`meta_key` = '_wp_page_template' | |
AND m.`meta_value` = 'page-your-template-name.php' |
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 | |
add_action( 'wp_dashboard_setup', 'iv_wp_dashboard_setup' ); | |
function iv_wp_dashboard_setup() { | |
if( current_user_can( 'install_plugins' ) ) | |
wp_add_dashboard_widget( 'iv_folder_sizes', __( 'Folder Sizes' ), 'iv_wp_add_dashboard_widget' ); | |
} | |
function iv_wp_add_dashboard_widget() { | |
$upload_dir = wp_upload_dir(); |
OlderNewer