Skip to content

Instantly share code, notes, and snippets.

View aliuosio's full-sized avatar
🎯

Osiozekhai Aliu aliuosio

🎯
View GitHub Profile
@ankurk91
ankurk91 / xdebug-mac.md
Last active March 9, 2024 22:20
php xDebug v3 on Ubuntu/Mac and phpStorm

🪲 Install and Configure xDebug v3 on MacOS for PhpStorm 🐘

  • Assuming that you have already installed php and apache via Homebrew

  • Install xDebug php extension

pecl channel-update pecl.php.net
pecl clear-cache

pecl install xdebug
@codekoala
codekoala / export_chrome_passwords.js
Last active June 24, 2023 11:54
Dump all passwords saved in Google Chrome (tested with Chrome 56.0.2906.0 on Arch Linux)
// Modified version of https://github.com/megmage/chrome-export-passwords
//
// This script allows you to dump all of the passwords stored in your Chrome
// profile. I tested it with Chrome 56.0.2906.0 dev (64-bit) on Arch Linux and
// it worked quite well.
//
// Usage:
//
// - Navigate to chrome://settings-frame/passwords
// - Copy this code into a snippet in Chrome
@csonuryilmaz
csonuryilmaz / clone-mysql-db.sh
Last active May 17, 2024 12:12 — forked from christopher-hopper/clone-mysql-db.sh
Clone a MySQL database to a new database on the same server without using a dump file. This is much faster than using mysqldump.
#!/bin/bash
DBUSER="root";
DBPASS="";
DBHOST="localhost";
DB_OLD=mydatabase
DB_NEW=clone_mydatabase
DBCONN="--host=${DBHOST} --user=${DBUSER} --password=${DBPASS}";
@manuelselbach
manuelselbach / README.md
Last active January 28, 2025 01:21
xdebug docker on macOS with PhpStorm

Use xdebug with docker on macOS and PhpStorm

To use xdebug with macOS and docker is quite, let´s call it tricky ;)

The following steps need to be proceed to get it working:

  1. use the config from the xdebug.ini wihtin your docker web container. Important: set remote_connect_back to off

UPDATE

@joostvanveen
joostvanveen / clean_magento_product_images.sh
Created April 25, 2018 11:20
Clean old product images cache and orphaned product images for Magento 1
# Delete all cached images older than 365 days
find ~/public/media/catalog/product/cache/* -type f -atime +365 -exec rm {} \;
# Remove product images that are not present in the database
magerun media:images:removeorphans
@TerrorSquad
TerrorSquad / Dockerfile
Created July 17, 2018 12:57
Magento 2 - Docker configuration
FROM sensson/magento2
COPY src/cron /etc/cron.d/magento2
COPY src/ /var/www/html/
@ypresto
ypresto / docker-compose-mutagen.yml
Last active March 25, 2021 18:49
Use mutagen with docker-sync like setup.
version: "3.7"
services:
service1:
volumes:
- your-app-mutagen-service1:/var/app:nocopy
service2:
volumes:
- your-app-mutagen-service2:/var/app:nocopy
@aliuosio
aliuosio / phpunit.xml
Last active May 28, 2020 07:03
Magento 2 Integration Test Config
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
colors="true"
bootstrap="./framework/bootstrap.php"
>
<testsuites>
<testsuite name="Memory Usage Tests">
<directory>../../../app/code/*/*/Test/Integration</directory>
@aliuosio
aliuosio / install-config-mysql.php
Last active May 28, 2020 07:03
Magento 2 Integration Test DB Connect
<?php
return [
'db-host' => '172.21.0.1',
'db-user' => 'root',
'db-password' => 'root',
'db-name' => 'magento_integration_tests',
'db-prefix' => '',
'backend-frontname' => 'backend',
'admin-user' => \Magento\TestFramework\Bootstrap::ADMIN_NAME,
'admin-password' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD,
@aliuosio
aliuosio / Memory.php
Created June 1, 2020 17:38
Alpine Overide Memory.php
<?php
/**
* Helper for determining system memory usage
*
* Uses OS tools to provide accurate information about factual memory consumption.
* The PHP standard functions may return incorrect information because the process itself may have leaks.
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/