Skip to content

Instantly share code, notes, and snippets.

View miguelbalparda's full-sized avatar
🏠
Working from home

Miguel Balparda miguelbalparda

🏠
Working from home
View GitHub Profile
git clone https://github.com/STS-Rosario/carpoolear_backend.git
Create vhost www.carpoolear-dev.com.ar pointing to carpoolear_backend/public
Add AllowOverride All between </Directory> inside the created vhost
Point www.carpoolear-dev.com.ar to 127.0.0.1 in hosts file.
composer install
cp .env.example .env
Change DB credentials
Change MAIL_DRIVER=smtp to MAIL_DRIVER=log for local development
chmod -R ugo+rw storage/
php artisan key:generate
Date & Time, Trans, Elap Time, Data Trans, Resp Time, Trans Rate, Throughput, Concurrent, OKAY, Failed
1455023289, 2483, 59.57, 200, 0.69, 41.68, 3.36, 28.74, 2483, 10
1455023409, 2594, 59.97, 208, 0.18, 43.25, 3.47, 7.78, 2594, 11
1455023529, 2580, 59.97, 207, 0.18, 43.02, 3.45, 7.67, 2580, 15
1455023649, 2662, 59.97, 213, 0.18, 44.39, 3.55, 7.99, 2662, 10
Date & Time, Trans, Elap Time, Data Trans, Resp Time, Trans Rate, Throughput, Concurrent, OKAY, Failed
1455020092, 199, 59.83, 15, 12.74, 3.33, 0.25, 42.39, 199, 1
1455020212, 215, 59.97, 17, 7.25, 3.59, 0.28, 26.00, 215, 0
** SIEGE 3.0.6
** Preparing 500 concurrent users for battle.
The server is now under siege...
Lifting the server siege...      done.
Transactions:                  39116 hits
Availability:                 100.00 %
Elapsed time:                  59.44 secs
Data transferred:             541.05 MB
Response time:                  0.26 secs
@miguelbalparda
miguelbalparda / gist:ec670c6109c719ee2e53
Created November 6, 2015 18:57 — forked from sprankhub/gist:a386a2969ca7cc6f6552
Fish Shell Autocompletion for the Magento 2 Shell Script
# Installation:
# Copy to ~/.config/fish/completions/magento.fish
# Open new or restart existing shell session
# Commands based on Magento 2.0.0-rc and the command
# bin/magento --raw --no-ansi list
# It is a static list since you probably do not have the magento shell script
# in your path.
complete -f -c magento -a --help;
complete -f -c magento -a -h;
<?php
/*
If your products have been deleted but not your media gallery images you
can use the following SQL statement to remove these dormant records.
Please make sure you backup your installation and database before running this
SQL statement. It has been used on Mage 1.8.1 system:
DELETE `img` FROM `catalog_product_entity_media_gallery` img
SELECT email FROM customer_entity as ce JOIN newsletter_subscriber as ns ON ns.subscriber_email = ce.email AND ns.subscriber_status = 1 JOIN sales_flat_order as sfo ON sfo.customer_id = ce.entity_id JOIN sales_flat_order_item as sfoi ON sfo.entity_id = sfoi.order_id JOIN catalog_product_entity as cpe ON cpe.entity_id = sfoi.product_id WHERE cpe.sku !='' group by ce.email;
@miguelbalparda
miguelbalparda / gist:b57a47a010a5995bc44d
Last active August 29, 2015 14:16
Check for global/crypt/key in Magento
find . -path './app/code/core' -prune -o -iname '*php' \! -type d -print0 | xargs -0 grep -il "global/crypt/key"
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
<?php
// Import coupon codes
// Thanks go out to Marius Strajeru
// Original URL: http://marius-strajeru.blogspot.nl/2010/04/create-bulk-discount-rules.html
ini_set('memory_limit', '-1');
require 'app/Mage.php';
Mage::app();
// Import CSV from ViArt format:
@miguelbalparda
miguelbalparda / gist:8224017
Created January 2, 2014 18:30
Magento rewrite vis mysql console
mysql> CREATE table temporary_table AS SELECT * FROM core_url_rewrite;
mysql> UPDATE temporary_table SET url_rewrite_id = NULL;
mysql> UPDATE temporary_table SET store_id = 4; //set the store_id you need to
mysql> UPDATE temporary_table SET id_path = UUID(); //create a unique id_path
mysql> insert ignore into core_url_rewrite select * from temporary_table; //insert the new records ignoring the ones with conflicts