Skip to content

Instantly share code, notes, and snippets.

:octocat:
Vita brevis, ars longa

Carlos Eduardo tresloukadu

:octocat:
Vita brevis, ars longa
Block or report user

Report or block tresloukadu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tresloukadu
tresloukadu / shell
Last active Oct 30, 2019
Python avoid message: Failed building wheel for...
View shell
# Add the no-cache-dir to pip command:
pip install nameOfPacket --no-cache-dir
@tresloukadu
tresloukadu / shell
Created Oct 20, 2019
MacOS Catalina fix brew | home-brew
View shell
$ brew update
$ brew upgrade
$ brew cleanup
@tresloukadu
tresloukadu / gist:e63e94776297960867914a8c62c02fce
Created Oct 20, 2019
Brew - Homebrew - macOS Catalina - Error showing “xcrun: error: invalid active developer path” when running brew update
View gist:e63e94776297960867914a8c62c02fce
# To fix the problem, just run
xcode-select --install
@tresloukadu
tresloukadu / sql
Created Oct 3, 2019
Disable foreign key constraint in MySQL temporarily
View sql
-- Before running queries
SET FOREIGN_KEY_CHECKS=0;
-- RUN ALL QUERIES
-- Then return back to default
SET FOREIGN_KEY_CHECKS=1;
@tresloukadu
tresloukadu / ts
Created Aug 12, 2019
Updating Current URL in Angular 7 Apps | Pretty URL | Friendly URL
View ts
// 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}`);
@tresloukadu
tresloukadu / txt
Created Aug 10, 2019
PHPStorm Rename Shortcut
View txt
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
@tresloukadu
tresloukadu / txt
Created Aug 3, 2019
Disable spell check WebStorm or PHPStorm - Desativar verificação ortográfica
View txt
Windows
File | Default Settings | Editor | Inspections | Spelling
MacOS
WebStorm | Preferences | Editor | Inspections | Spelling
@tresloukadu
tresloukadu / txt
Created Jul 22, 2019
Get rid of webpack-dev-server status bar
View txt
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!
@tresloukadu
tresloukadu / bash
Created Jul 18, 2019
Como atualizar o VisualCode no OpenSUSE LEAP
View bash
# 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
@tresloukadu
tresloukadu / bash
Created Jul 17, 2019
OpenSUSE LEAP 15 - Set an snapshot as default
View bash
# After getting into the system from a snapshot, use the following command to set the snapshot
snapper rollback
You can’t perform that action at this time.