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
-- riepilogo della sintassi più importante in SQL | |
-- SQL inizia SEMPRE con ... | |
CREATE DATABASE nome_database; | |
CREATE TABLE Customers ( | |
id INT AUTO_INCREMENT PRIMARY KEY, | |
CustomerName VARCHAR(60) NOT NULL, | |
ContactName VARCHAR(70) NOT NULL, | |
Address VARCHAR(100) NOT NULL, |
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
function palindrome(str) { | |
// Step 1. Lowercase the string and use the RegExp to remove unwanted characters from it | |
var re = /[\W_]/g; // or var re = /[^A-Za-z0-9]/g; | |
var lowRegStr = str.toLowerCase().replace(re, ''); | |
// str.toLowerCase() = "A man, a plan, a canal. Panama".toLowerCase() = "a man, a plan, a canal. panama" | |
// str.replace(/[\W_]/g, '') = "a man, a plan, a canal. panama".replace(/[\W_]/g, '') = "amanaplanacanalpanama" | |
// var lowRegStr = "amanaplanacanalpanama"; | |
// Step 2. Use the same chaining methods with built-in functions from the previous article 'Three Ways to Reverse a String in JavaScript' |
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
Trovare file che occupano più spazio via SSH | |
find / -size +250M -ls | |
-- | |
Liberare spazio su disco Linux via SSH | |
cd / | |
sudo du -h --max-depth=1 | |
- Note which directories are using a lot of disk space. | |
- cd into one of the big directories. |
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
Aggiornato al 18 luglio 2021 |
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
HelloWorld/ | |
helloworld/ | |
__init__.py | |
asgi.py | |
settings.py | |
urls.py | |
wsgi.py | |
manage.py | |
------------------------------------- |
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
Step 1 | |
SELECT CONCAT('ALTER TABLE ',TABLE_NAME,' ENGINE=InnoDB;') | |
FROM INFORMATION_SCHEMA.TABLES | |
WHERE ENGINE='MyISAM' AND table_schema = 'wordpress'; | |
# wordpress = database name | |
Step 2 | |
Copiare l'output generato dal precedente comando, ad esempio (PS copiare senza | orizzontali) |
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
# table is marked as crashed ... | |
service mysql stop | |
cd /var/lib/mysql/DATABASE | |
ls | |
myisamchk -s /var/lib/mysql/*/*.MYI | |
#ripara tutte le tabelle | |
service mysql restart |
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
Messaggi di errore: prova a cancellare i cookie, too many redirects, ecc. | |
Sito: http://example.com | |
1) rinominare temporaneamente .htaccess in OLD.htaccess | |
2) aggiungere nel file wp-config.php le righe per forzare la connessione alla versione HTTP | |
define( 'WP_HOME', 'http://example.com' ); | |
define( 'WP_SITEURL', 'http://example.com' ); |
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
.----------------. .----------------. .----------------. .----------------. .----------------. | |
| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. | | |
| | _______ | || | ________ | || | _________ | || | _______ | || | _________ | | | |
| | / ___ | | || | |_ ___ `. | || | |_ ___ | | || | |_ __ \ | || | |_ ___ | | | | |
| | | (__ \_| | || | | | `. \ | || | | |_ \_| | || | | |__) | | || | | |_ \_| | | | |
| | '.___`-. | || | | | | | | || | | _| _ | || | | __ / | || | | _| _ | | | |
| | |`\____) | | || | _| |___.' / | || | _| |___/ | | || | _| | \ \_ | || | _| |___/ | | | | |
| | |_______.' | || | |________.' | || | |_________| | || | |____| |___| | || | |_________| | | | |
| | | || | | || | | || | | || | | | | |
| '--------------' || '--------------' || '--------------' || '--------------' || '--------------' | |
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
######################################################################## | |
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2020 | |
# ---------------------------------------------------------------------- | |
# @Author: Andreas Hecht | |
# @Author URI: https://seoagentur-hamburg.com | |
# License: GNU General Public License v2 or later | |
# License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
######################################################################## | |