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
-- Before running queries | |
SET FOREIGN_KEY_CHECKS=0; | |
-- RUN ALL QUERIES | |
-- Then return back to default | |
SET FOREIGN_KEY_CHECKS=1; |
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
// import location | |
import {Location} from '@angular/common'; | |
// add in constructor | |
private location: Location | |
//Updating current url | |
this.location.replaceState(`/my/url/${this.code}/${this.id}`); |
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
For some reason PHPStorm 2019 file dialog do not show rename option, at least on MacOS. To rename a file you have to use your keyboard shortcut: | |
FN+SHIFT+F6 |
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
Windows | |
File | Default Settings | Editor | Inspections | Spelling | |
MacOS | |
WebStorm | Preferences | Editor | Inspections | Spelling |
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
To get rid of webpack-dev-server status bar when compiling Angular script there is an easy solution. No change in configuration is ncessary. | |
When running ng serve it will give the following link http://localhost:4200/webpack-dev-server/ | |
Just remove the last part of it "webpack-dev-server/" | |
BANG! no status bar. Problem solved! |
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
# Primeira coisa a ser feita (caso não tenha feito ainda) é rodar os três comandos abaixo: | |
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc | |
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/zypp/repos.d/vscode.repo' | |
sudo zypper refresh | |
# Depois rodar o comando que vai atualizar o pacote |
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
# After getting into the system from a snapshot, use the following command to set the snapshot | |
snapper rollback |
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
-- An easy way to find which mysql.sock is being used and the path of it, simply log in into your mysql and run this command: | |
SHOW VARIABLES LIKE '%sock%'; |
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
-- Some say MySQL already support UUID() function as default, but old versions and MariaDB not! | |
-- In case you deal with various tables create trigger to insert UUID is not a good solution from | |
-- a manteinance point of view. | |
-- DISCLAIMER 1: For learning purposes only. It is NOT secure setting a fixed value for UUID due to obvious reasons. | |
-- DISCLAIMER 2: Use char to store UUID is not a wise solution the correct approach is to use BINARY(16). I will keep | |
-- the below solution just for very small apps. | |
CREATE TABLE 'tb_test' ( | |
'id_test' INT NOT NULL AUTO_INCREMENT PRIMARY KEY |
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 artisan cache:clear | |
php artisan view:clear | |
php artisan route:clear | |
php artisan clear-compiled | |
php artisan config:cache |