Skip to content

Instantly share code, notes, and snippets.

Avatar

Mauricio Paz mauriciopazpp

  • Guarapuava-PR / Brazil
  • 03:31 (UTC -12:00)
View GitHub Profile
@mauriciopazpp
mauriciopazpp / create-admin-user-magento2.md
Last active Aug 28, 2020
[Create admin user] Create admin user magento 2 #magento2
View create-admin-user-magento2.md
/opt/rh/rh-php71/root/usr/bin/php -d memory_limit=-1 bin/magento admin:user:create --admin-user="redstage3" --admin-password="@123123q" --admin-email="test@redstage.com" --admin-firstname="Admin" --admin-lastname="Admin"
admin:user:create --admin-user="admin2" --admin-password="@123123q" --admin-email="test@admin.com" --admin-firstname="Admin" --admin-lastname="Admin"
View gist:dda12d321e56707f80886adcce42908f
##Sync google drive to local:
### This command will copy all files from google drive to local drive, if you delete a file from Google Drive, the file on your local will be deleted.
```
rclone sync GoogleDrive:/ /mnt/7B40D3947E61F989/GoogleDrive/
```
### [DANGEROUS!!!] This command will copy all files from your local and move to your Google Drive. If the file does't exist on your local, the file will be delted on your google drive!!!!
```
rclone sync /mnt/7B40D3947E61F989/GoogleDrive/ GoogleDrive:/
```
@mauriciopazpp
mauriciopazpp / gist:e9dea101cb8b77b70d4266ddf8bd3d9b
Created Aug 2, 2019
APT - CORRIGIR ERRO DE CHAVE PÚBLICA (W: ERRO GPG)
View gist:e9dea101cb8b77b70d4266ddf8bd3d9b
https://www.vivaolinux.com.br/dica/APT-Corrigir-erro-de-chave-publica-W-Erro-GPG
APT - CORRIGIR ERRO DE CHAVE PÚBLICA (W: ERRO GPG)
NOTA: dica válida só para Debian e derivadas.
Muitos usuários novatos não se atentam ao fato de que quando um novo repositório é adicionado, a instalação de sua chave pública (GPG) é obrigatória e tem que ser instalada manualmente (salvo em caso de comandos com a instalação da GPG prevista).
Quando isso não acontece, temos erros no update do sistema como o emulado abaixo.
@mauriciopazpp
mauriciopazpp / edit-oh-my-zsh-theme.md
Last active Aug 28, 2020
How to edit the zshel oh my zshel theme?
View edit-oh-my-zsh-theme.md

vim ${ZSH}/themes/${ZSH_THEME}.zsh-theme

View gist:1ccd521b097e7c8c26bf84e0f3a33f9b
https://ulauncher.io/
https://github.com/beajeanm/ulauncher-windows-switcher
@mauriciopazpp
mauriciopazpp / fix_history_zsh_problem.txt
Created Apr 2, 2019
How to fix history zsh - history terminal zsh not working
View fix_history_zsh_problem.txt
mv .zsh_history .zsh_history_bad
strings .zsh_history_bad > .zsh_history
fc -R .zsh_history
@mauriciopazpp
mauriciopazpp / magento_url_rewrite.md
Last active Apr 2, 2019
Duplicate entries core_url_rewrite magento 1
View magento_url_rewrite.md

How to find the duplicate entries:

select * from core_url_rewrite WHERE is_system <> 1 AND id_path REGEXP "^[0-9]+_[0-9]+$" AND (request_path REGEXP ".*-[0-9]*\.html" OR target_path = request_path)

Delete all the duplicate entries:

DELETE FROM core_url_rewrite 
WHERE is_system <> 1 AND id_path REGEXP "^[0-9]+_[0-9]+$" AND
      (request_path REGEXP ".*-[0-9]*\.html" 
          OR target_path = request_path)
View disable-cors-chrome
MAC os
open -n -a "Google Chrome" --args --user-data-dir=/tmp/temp_chrome_user_data_dir http://localhost:8100/ --disable-web-security
@mauriciopazpp
mauriciopazpp / docker.txt
Last active Aug 28, 2020
Comandos Docker.txt
View docker.txt
Sincronizar id do usuáiro do container com o do computdor
sudo chown -R $(id -u):$(id -g) .
--> Mostrar todos os container executando
docker ps
--> Parar todos os containers
docker stop $(docker ps -a -q)
--> Executar bash de um container