Skip to content

Instantly share code, notes, and snippets.

View claudiu-marginean's full-sized avatar

Claudiu Marginean claudiu-marginean

View GitHub Profile
@jfcherng
jfcherng / .env
Last active October 6, 2024 18:30
Symfony 5 maintenance mode
MAINTENANCE_MODE=0
@mpneuried
mpneuried / Makefile
Last active August 22, 2024 10:36
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@DirtyF
DirtyF / magento2-beta-docker-install.md
Last active September 13, 2015 10:49
Magento 2 five minutes install

Magento 2 0.42.0-beta1 is available since a few days. In order to test it right away, we will see how to install a running demo in 5 minutes sharp thanks to Docker. If you don't know Docker, please report to our previous tutorial.

We will even go further and give you the choice between two types of setup:

  • a read-only discovery mode running instance of Magento 2 in order to discover the new admin interface and click
  • a developer mode, in order to have a development environnement and start playing with the brand new technical features of Magento 2.

Disclaimer : We assume you have a running and fonctionnal Docker on your computer.

@maxivak
maxivak / 00. tutorial.md
Last active September 11, 2024 19:58
Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler
@claudiu-marginean
claudiu-marginean / httpd-vhosts.conf
Last active August 29, 2015 14:08 — forked from anonymous/httpd-vhosts.conf
VirtualHost in XAMPP with https (with certif from localhost)
<VirtualHost *:80>
DocumentRoot "D:/www/project-name"
ServerName local.project-name.net
ServerAlias local.project-name.net
#SetEnv MAGE_IS_DEVELOPER_MODE "true"
<Directory "D:/www/project-name">
Options Indexes FollowSymLinks
AllowOverride All
anonymous
anonymous / httpd-vhosts.conf
Created November 3, 2014 08:42
Created with Gistr for Brackets.iohttps://github.com/LucasKA/Gistr
<VirtualHost *:80>
DocumentRoot "D:/www/_BuyerQuest"
ServerName local.buyerquest.net
ServerAlias local.buyerquest.net
#SetEnv MAGE_IS_DEVELOPER_MODE "true"
<Directory "D:/www/_BuyerQuest">
Options Indexes FollowSymLinks
AllowOverride All
@greenwellness
greenwellness / wagner.cson
Created May 22, 2014 00:27
A contrived setup of many different Magento composer packages
{
name: 'greenwellness/wellnessbon'
description: 'Definitie voor Green Wellness Wellnessbon.'
license: 'proprietary'
'minimum-stability': 'dev'
config:
@claudiu-marginean
claudiu-marginean / Magento-Snippets-Claudiu.md
Last active July 6, 2021 08:54
Magento Snippets - Claudiu

Magento Snippets

Code snippets from different sections of Magento that are very useful.

JS Translation in phtml files

<script>
//<![CDATA[
Translator.add(
    <?php echo Mage::helper('core')->jsonEncode(array(
@pgraham
pgraham / gist:4127832
Created November 21, 2012 21:22
function to create a mock iterator over an array using PHPMock
/**
* Create a mock iterator over the given array.
*
* @param array $a
* @param string $class The class to use for the mock, should be/implement/extend Iterator
* @param boolean $complete Whether or not to build a complete iteration. This is
* used when an exception/break is expected in the middle of the iteration.
* @param integer $numElms The number of elements that should be iterated in the case of an
* incomplete iteration.
*/
@j-manu
j-manu / uri.js
Created April 21, 2012 04:07 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.host; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"