Skip to content

Instantly share code, notes, and snippets.

View rodde177's full-sized avatar

rodde177

  • sthlm
View GitHub Profile
@rodde177
rodde177 / delete_git_submodule.md
Created January 26, 2019 18:03 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@rodde177
rodde177 / sync_prod_to_stage.sh
Created January 21, 2019 11:28 — forked from erikhansen/sync_prod_to_stage.sh
Magento 2 script to push DB and `pub/media` changes from prod>stage
#!/bin/bash
# stop on errors
set -e
# turn on debugging if you're running into issues
#set -x
#########################
# Overview
#########################
# Magento 2 script to push DB and pub/media changes from prod>stage
@rodde177
rodde177 / multi-git-win.md
Created December 3, 2018 13:37 — forked from rosswd/multi-git-win.md
Setting up a Github and Bitbucket account on the same computer on Mac OS. Now with a guide for Windows 10.

Setting up github and bitbucket on the same computer (Windows)

Guide for Windows

mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.

Github will be the main account and bitbucket the secondary.

Git for Windows

  • Download and install Git for Windows
    • In the installer, select everything but decide if you want a desktop icon (2nd step)
@rodde177
rodde177 / PULL_REQUEST_TEMPLATE.md
Created November 24, 2018 16:06
PULL REQUEST TEMPLATE
@rodde177
rodde177 / xdebug-cron.md
Last active January 15, 2021 23:34
Running Xdebug with cron jobs

Preconditions:

In command line, run following command first time (with same server name as configured in PHPStorm):

export PHP_IDE_CONFIG="serverName=localhost.tld" export XDEBUG_CONFIG="idekey=PHPSTORM"

@rodde177
rodde177 / mysql-docker.sh
Created March 1, 2018 13:54 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@rodde177
rodde177 / Events fired during order submit process
Created May 8, 2017 02:13 — forked from wkw/Events fired during order submit process
Main events fired during one-page checkout in Magento
### Events during order submit process
`core_copy_fieldset_customer_account_to_quote`
`core_copy_fieldset_sales_convert_quote_to_order`
`sales_convert_quote_to_order`
`core_copy_fieldset_sales_convert_quote_address_to_order`
`sales_convert_quote_address_to_order`
`core_copy_fieldset_sales_convert_quote_address_to_order_address`
`sales_convert_quote_address_to_order_address`