Skip to content

Instantly share code, notes, and snippets.

View mauriciopazpp's full-sized avatar

Mauricio Paz mauriciopazpp

  • Guarapuava-PR / Brazil
  • 07:37 (UTC -12:00)
View GitHub Profile
log ssh
run
vendor/bin/ece-tools cron:kill
@mauriciopazpp
mauriciopazpp / create-admin-user-magento2.md
Last active August 28, 2020 18:43
[Create admin user] Create admin user magento 2 #magento2
/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="[email protected]" --admin-firstname="Admin" --admin-lastname="Admin"
admin:user:create --admin-user="admin2" --admin-password="@123123q" --admin-email="[email protected]" --admin-firstname="Admin" --admin-lastname="Admin"
##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 August 2, 2019 12:31
APT - CORRIGIR ERRO DE CHAVE PÚBLICA (W: ERRO GPG)
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 August 28, 2020 18:46
How to edit the zshel oh my zshel theme?

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

@mauriciopazpp
mauriciopazpp / gist:1ccd521b097e7c8c26bf84e0f3a33f9b
Created April 24, 2019 02:57
window switcher linux ubuntu
https://ulauncher.io/
https://github.com/beajeanm/ulauncher-windows-switcher
@mauriciopazpp
mauriciopazpp / fix_history_zsh_problem.txt
Created April 2, 2019 22:29
How to fix history zsh - history terminal zsh not working
mv .zsh_history .zsh_history_bad
strings .zsh_history_bad > .zsh_history
fc -R .zsh_history
@mauriciopazpp
mauriciopazpp / magento_url_rewrite.md
Last active April 2, 2019 19:39
Duplicate entries core_url_rewrite magento 1

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)
@mauriciopazpp
mauriciopazpp / disable-cors-chrome
Last active August 28, 2020 18:47
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 August 28, 2020 18:48
Comandos 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