Skip to content

Instantly share code, notes, and snippets.

View aliuosio's full-sized avatar
🎯

Osiozekhai Aliu aliuosio

🎯
View GitHub Profile
@ssi-anik
ssi-anik / gdrive_get_large_file.sh
Created September 26, 2021 03:47 — forked from hershkoy/gdrive_get_large_file.sh
Download large file from Google Drive (2020)
#!/bin/bash
if [ $# != 2 ]; then
echo "Usage: googledown.sh ID save_name"
exit 0
fi
confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id='$1 -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')
echo $confirm
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$confirm&id=$1" -O $2 && rm -rf /tmp/cookies.txt
@ssi-anik
ssi-anik / Dockerfile
Created July 18, 2021 09:16
xdebug 3, docker integrate with PhpStorm
FROM sirajul/php74-fpm:latest
RUN pecl install xdebug
#RUN docker-php-ext-enable xdebug
RUN mkdir -p /home/xdebug
COPY ./docker/php/xdebug-debug.ini /home/xdebug/xdebug-debug.ini
COPY ./docker/php/xdebug-default.ini /home/xdebug/xdebug-default.ini
COPY ./docker/php/xdebug-off.ini /home/xdebug/xdebug-off.ini
COPY ./docker/php/xdebug-profile.ini /home/xdebug/xdebug-profile.ini
@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.
*/
@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 / 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>
@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
@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/
@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
@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

@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}";