Skip to content

Instantly share code, notes, and snippets.

php bin/magento deploy:mode:set developer
php bin/magento setup:di:compile
setup:static-content:deploy
php bin/magento setup:static-content:deploy pt_BR -f
Servidor:
sed -E 's/DEFINER=`[^`]+`@`[^`]+`/DEFINER=CURRENT_USER/g' nameOfYourDump.sql > nameOfYourDumpClean.sql
@MateusM3
MateusM3 / bash_alias.sh
Last active February 26, 2025 17:15
Editar ~/.bashrc e colocar informações no final! não esquecer de deixar o seu gostei (estrelinha) e se inscrever no canal
### CUSTOM ALIAS GIT
alias res='reset'
alias gis='git status'
### CUSTOM ALIAS DOCKER
alias docker-super-clean='docker stop $(docker ps -a -q);docker system prune --all --force --volumes'
alias docker-stop-containers='docker stop $(docker ps -a -q)'
alias docker-magento-start='cd /home/mateus_k13/web/k13/docker/magento-mult && docker compose up -d'
alias docker-magento-stop='cd /home/mateus_k13/web/k13/docker/magento-mult && docker compose stop'
@MateusM3
MateusM3 / remove_file_git_index.git
Last active March 30, 2022 17:11 — forked from felipegomesdev/remove_file_git_index.git
Remover arquivo do git que foi commitado
git update-index --assume-unchanged <filename>
ou
git rm -r --cached <filename>
@MateusM3
MateusM3 / git_sync.sh
Created August 1, 2019 12:00 — forked from felipegomesdev/git_sync.sh
Sincronizar arquivos do servidor com um repositório remoto
$ git init
$ git remote add origin git@bitbucket.org:user/repositorio.git
$ git checkout -b master
$ git branch
$ git branch --set-upstream-to origin/master
$ git branch -f --track master origin/master
$ git fetch --all
$ git reset --hard origin/master
@MateusM3
MateusM3 / forgotpassword.phtml
Created May 3, 2018 13:40
Correção bug Botão "Recuperar senha" Admin magento"
<!--app/design/adminhtml/default/default/template/forgotpassword.phtm -->
<button class="forgot-password" type="submit"><span><span><span><?php echo Mage::helper('adminhtml')->__('Retrieve Password'); ?></span></span></span></button>
<head>
<style>
/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 100; /* Sit on top */
padding-top: 100px; /* Location of the box */
left: 0;
top: 0;
// Url Amigavel - metodo str_slug ()
protected static function boot()
{
parent::boot();
static::creating(function($noticia){
$noticia->url_titulo = str_slug($noticia->titulo,"-");
});
}
<script>
$(document).ready(function(){
$('#add_attribute').click(function(){
var i=1;
i++;
$('#dynamic_field').append(
'<tr id="row'+i+'">' +
'<td><input type="text" name="attributes_chave[]" placeholder="Atributo"/></td>' +