Skip to content

Instantly share code, notes, and snippets.

@zeloc
zeloc / Mailhog_installation.md
Created August 30, 2023 10:47 — forked from dipenparmar12/Mailhog_installation.md
Mailhog installation guide (Linux)

Mailhog

Video Tutorial

1. Install GoLang

Install

Mailhog Requires Go 1.4+ to run so we will install GO language in system.

@zeloc
zeloc / set-multiple-magento-2-websites-stores-nginx
Last active January 4, 2021 17:26 — forked from thiagolima-bm/set-multiple-magento-2-websites-stores-nginx
Configure Multiple Magento2 Websites or Stores with Nginx
#etc/nginx/sites-available
map $http_host $MAGE_RUN_CODE {
ecc-m234-s1.vm ubs_view;
}
server {
listen 80;
server_name mystore.com mystore.de mystore.es;
set $MAGE_ROOT /path/to/your/magento2;
set $MAGE_MODE default;
rm -rf var/cache/* generated/* var/view_preprocessed/* pub/static/*
@zeloc
zeloc / generate-ssh-key.sh
Created December 29, 2018 17:03 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa
@zeloc
zeloc / gist:7e8b244bc1ef1d9ea95ce57cf7483fa8
Last active June 22, 2019 18:19
magento 2 install script
php bin/magento setup:install --base-url=http://ecc-m231.vm/ --db-host=localhost --backend-frontname=admin1234 --db-name=magento --db-user=root --db-password=nga3Quae* --admin-firstname=myname --admin-lastname=mylastname [email protected] --admin-user="admin" --admin-password=Test@123456 --language=en_GB --currency=GBP --timezone=Europe/London --use-rewrites=1
@zeloc
zeloc / nginx.conf.sample
Created December 12, 2018 14:51
magento 2 setup using windows subsystem in ubuntu, the nginx.conf.sample needs updating as the fastcgi_pass only seems to work using 127.0.0.1:9000;
## Example configuration:
# upstream fastcgi_backend {
# # use tcp connection
# # server 127.0.0.1:9000;
# # or socket
# server unix:/var/run/php/php7.0-fpm.sock;
# }
# server {
# listen 80;
# server_name mage.dev;
@zeloc
zeloc / getConfigNodes.php
Created August 16, 2018 08:23 — forked from doug48/getConfigNodes.php
magento 1 get config.xml node values
<?php
//Note name children with unique names
//<store_attachments>
// <store_1></store_1>
//
//</store_attachments>
$value = Mage::getConfig()->getNode('store_attachemnts')->asArray();
// or
$value = Mage::getConfig()->getNode('default/store_attachemnts')->asArray();
@zeloc
zeloc / importdb.sh
Created August 16, 2018 08:22
ofl import database script
#! /bin/bash
db_name='ofl_local'
remotedb='https://s3-eu-west-1.amazonaws.com/jbgbackups/ofldotcom/ofldotcom.sql.dump.gz'
cd /var/www/vhosts/oakfurnitureland.com/production/htdocs
wget $remotedb
echo "...Unzip ofl database"
gunzip ofldotcom.sql.dump.gz
@zeloc
zeloc / get_bundle_product_ids_with_options.php
Created August 16, 2018 08:22
Gets the product ids for bundle products that have options, that is more then one where a customer has to choose an option
<?php
require_once('abstract.php');
class Space48_Shell_ProductIds extends Mage_Shell_Abstract
{
/**
* Entry point
*/
@zeloc
zeloc / bundle_selections.php
Created August 16, 2018 08:21
Get the bundle options that have selections
<?php
require_once('abstract.php');
class Space48_Shell_Bundle_Options extends Mage_Shell_Abstract
{
/**
* Entry point
*/