Skip to content

Instantly share code, notes, and snippets.

View amansilla's full-sized avatar
🚀
Automate all the things!

Antonio Mansilla amansilla

🚀
Automate all the things!
View GitHub Profile
@amansilla
amansilla / composer.json
Created October 8, 2020 14:29 — forked from naderman/composer.json
Composer Meta Package
{
"name": "naderman/sample-meta-package",
"version": "1.0.0",
"type": "metapackage",
"require": {
"naderman/package1": "self.version",
"naderman/package2": "self.version",
"naderman/package3": "2.0.3"
}
}
@amansilla
amansilla / gist:e4b18778c314c9d2b49b8128678b9f8e
Created October 8, 2020 09:00
[Composer] Install local package
{
"name": "spryker-shop/b2b-demo-shop",
"require": {
"vendor-name/spryker-category-by-key-importer": "dev-master",
},
"repositories": {
"0": {
"type": "path",
"url": "../vendor-name/spryker-category-by-key-importer",
"options": {
[ISSUE-ID] Short summary up to 50 chars
# More detailed explanatory text, if necessary. Wrap it to
# 72 characters. In some contexts, the first line is treated
# as the subject of an email and the rest of the text as
# the body. The blank line separating the summary from the
# body is critical (unless you omit the body entirely); tools
# like rebase can get confused if you run the two together.
#
# Further paragraphs come after blank lines.
@amansilla
amansilla / check_health.sh
Last active January 14, 2019 14:23
check_health.sh
#!/bin/bash
# Simple script to check the health of a created droplet
fail_count=1
while true
do
response=$(curl --write-out %{http_code} --silent --output /dev/null $1)
if [ $response -eq 200 ] ; then
@amansilla
amansilla / WebsiteAndStoreCreator.php
Created April 26, 2018 16:42 — forked from 0-Sony/WebsiteAndStoreCreator.php
Magento 2 : Create Programmatically Website/Store/StoreGroup
<?php
/**
* This file is part of Namespace for Magento.
*
* @license All rights reserved
* @author Phuong LE <phuong.le@agence-soon.fr> <@>
* @category Namespace
* @package Namespace_Core
* @copyright Copyright (c) 2016 Agence Soon (http://www.agence-soon.fr)
*/
@amansilla
amansilla / autoshipping.php
Created December 1, 2016 09:47 — forked from herveguetin/autoshipping.php
Set shipping method and rate if they do not exist yet in Magento
<?php
/**
* Has shipping been applied to quote?
*
* @var bool
*/
protected $_hasShipping = false;
/**
@amansilla
amansilla / add-magento-version.php
Last active October 14, 2016 09:56 — forked from AydinHassan/add-magento-version.php
Add a new version of Magento to a repository compatible with https://github.com/AydinHassan/magento-core-composer-installer
<?php
/**
* Script to manage to version of Magento in a git mirror
* php $argv[0] core-repository new-version-of-magento
*
* It will look for Mage.php in new-version-of-magento and parse the version
* and edition from it.
*
* It will copy the code, remove the old files, create new branches if necessary
@amansilla
amansilla / magento-nginx-fpm.config
Last active May 13, 2019 08:38
Magento 1 - NGINX & PHP-FPM config
server {
listen 80 default_server;
listen 443 default ssl;
root /var/www/domain.com;
server_name domain.com www.domain.com;
ssl_certificate /etc/letsencrypt/live/domain.com/cert.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;