Skip to content

Instantly share code, notes, and snippets.

@tgamanov
tgamanov / ImageChooser.php
Created July 24, 2018 15:15 — forked from cedricblondeau/ImageChooser.php
Image Chooser for Magento2 widgets
<?php
namespace Vendor\Module\Block\Adminhtml\Widget;
class ImageChooser extends \Magento\Backend\Block\Template
{
/**
* @var \Magento\Framework\Data\Form\Element\Factory
*/
protected $_elementFactory;
@tgamanov
tgamanov / customer_account.xml
Created June 19, 2018 14:15 — forked from matt-bailey/customer_account.xml
Disable My Account sidebar links in Magento 2
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<!-- Remove unwanted account navigation links -->
@tgamanov
tgamanov / tip.md
Last active July 24, 2018 10:06 — forked from devdrops/tip.md
Restart PHP-FPM on Mac

Brew restart services

restart php-fpm: brew services restart php70

restart all brew services restart --all

If you don't have brew services, try installing it like this: brew tap homebrew/services

@tgamanov
tgamanov / setup_mailcatcher.sh
Created August 17, 2016 11:42 — forked from conroyp/setup_mailcatcher.sh
Mailcatcher installation script for Ubuntu 14.04
#!/bin/bash
# Install dependencies
apt-get install libsqlite3-dev ruby1.9.1-dev
# Install the gem
gem install mailcatcher
# Make it start on boot
echo "@reboot $(which mailcatcher) --ip=0.0.0.0" >> /etc/crontab
update-rc.d cron defaults