Skip to content

Instantly share code, notes, and snippets.

@joshfortyfour
joshfortyfour / container-layout-names.md
Last active June 6, 2024 17:22
List of container layout names in Magento 2 Community Edition
  • actions_apply_to
  • admin.scope.col.wrap
  • adminhtml.block.report.product.lowstock.grid.container
  • adminhtml.catalog.product.set.edit.wrapper
  • after.body.start
  • alert.urls
  • assign_products_container
  • available_sort_by_group
  • backend.page
  • backend.session.activity
@samtay
samtay / magento2-auto-login.js
Created February 14, 2017 23:46
Tamper Monkey script to automatically log into Magento2 admin panel
// ==UserScript==
// @name Local Login - M2
// @namespace http://your.homepage/
// @version 0.1
// @description enter something useful
// @author Sam Tay
// @match *.dev/*admin*
// ==/UserScript==
// Credentials
@iamphilrae
iamphilrae / phpMyAdmin Export Filename Template, Including Date and Time
Last active April 3, 2024 20:30
phpMyAdmin Export Filename Template, Including Date and Time
@DATABASE@__%Y-%m-%d_%H-%M-%S
@santisbon
santisbon / Update-branch.md
Last active March 21, 2024 15:50
Deploying from #Git branches adds flexibility. Bring your feature branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master.

@bjornjohansen
bjornjohansen / sitemap-crawler.php
Last active August 14, 2023 18:19
Basic sitemap crawler to warm up a full page cache
#!/usr/bin/php
<?php
/**
* @license http://www.wtfpl.net/txt/copying/ WTFPL
*/
date_default_timezone_set( 'UTC' );
$sitemaps = array(
@chales
chales / cache-warmer-3.sh
Last active January 19, 2022 14:01
A couple of simple options to parse sitemap.xml to warm the cache or for other actions such as generating memory_profiler checks.
# This can be added to your cron job to run right after Drupal's cron or combine them into a single command so
# that it automatically executes when the cron run completes.
wget -q http://www.example.com/sitemap.xml -O - | egrep -o "http://www\.example\.com[^<]+" | wget -q -i - -O /dev/null --wait 1