Skip to content

Instantly share code, notes, and snippets.

View sawwd's full-sized avatar
💭
What's happening?

Aprier sawwd

💭
What's happening?
View GitHub Profile
@DominicWatts
DominicWatts / product-repository-cheatsheet.md
Created October 13, 2023 09:42
magento 2 : product repository cheatsheet #magento2

Product Repository Cheatsheet

Import Statement

use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Catalog\Api\Data\ProductInterfaceFactory;

Constructor

@Neo23x0
Neo23x0 / log4j_rce_detection.md
Last active October 4, 2025 08:06
Log4j RCE CVE-2021-44228 Exploitation Detection

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders

sudo egrep -I -i -r '\$(\{|%7B)jndi:(ldap[s]?|rmi|dns|nis|iiop|corba|nds|http):/[^\n]+' /var/log
@kellymears
kellymears / webpack.mix.js
Created January 20, 2019 20:08
[Gutenberg Webpack Mix] #gutenberg #mix #js
const mix = require('laravel-mix');
const url = 'http://lab.tinypixel.test';
const app = './src';
const config = './config';
const resources = './resources';
const assets = './resources/assets';
const dist = './dist';
const externals = {
@jhaddix
jhaddix / all.txt
Created January 19, 2019 04:35 — forked from orangetw/all.txt
all wordlists from every dns enumeration tool... ever. Please excuse the lewd entries =/
This file has been truncated, but you can view the full file.
.
..
........
@
*
*.*
*.*.*
🐎
@ipascual
ipascual / magento2 - delete invoices
Created March 19, 2018 22:36
magento2 - delete invoices SQL
fromInvoiceId = 418
fromOrderId = 371
DELETE FROM sales_invoice WHERE entity_id >= 418;
ALTER TABLE sales_invoice AUTO_INCREMENT = 418;
DELETE FROM sales_invoice_grid WHERE entity_id >= 418;
ALTER TABLE sales_invoice_grid AUTO_INCREMENT = 418;
DELETE FROM sales_invoice_item WHERE parent_id >= 418;
'use strict';
function sayHello() {
if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {
var args = ['\n %c Made with ♥ by Dogstudio %c %c %c http://www.dogstudio.be/ %c %c🐶 \n\n', 'color: #fff; background: #b0976d; padding:5px 0;', 'background: #494949; padding:5px 0;', 'background: #494949; padding:5px 0;', 'color: #fff; background: #1c1c1c; padding:5px 0;', 'background: #fff; padding:5px 0;', 'color: #b0976d; background: #fff; padding:5px 0;'];
window.console.log.apply(console, args);
} else if (window.console) {
window.console.log('Made with love ♥ Dogstudio - http://www.dogstudio.be/ 🐶');
}
@subfuzion
subfuzion / curl.md
Last active November 20, 2025 12:10
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@Lewiscowles1986
Lewiscowles1986 / Vagrantfile
Last active November 23, 2022 12:36
Magento 2 (Stable) Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "debian/jessie64"
config.vm.network "private_network", ip: "10.0.0.7"
config.vm.hostname = "magento2.local"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
@johnbillion
johnbillion / wp_mail.md
Last active July 7, 2025 13:21
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here: https://github.com/johnbillion/wp_mail

@paulirish
paulirish / what-forces-layout.md
Last active November 21, 2025 16:16
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent