Skip to content

Instantly share code, notes, and snippets.

View JonathanCosta's full-sized avatar
😁
Focusing

Jonathan Martins Costa JonathanCosta

😁
Focusing
View GitHub Profile
#!/bin/bash
PROGNAME=${0##*/}
INPUT=''
QUIET='0'
NOSTATS='0'
max_input_size=0
max_output_size=0
usage()
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE TABLE `customer_entity`;
TRUNCATE TABLE `customer_entity_datetime`;
TRUNCATE TABLE `customer_entity_decimal`;
TRUNCATE TABLE `customer_entity_int`;
TRUNCATE TABLE `customer_entity_text`;
TRUNCATE TABLE `customer_entity_varchar`;
TRUNCATE TABLE `customer_address_entity`;
TRUNCATE TABLE `customer_address_entity_datetime`;
@JonathanCosta
JonathanCosta / .gitignore
Created April 12, 2022 12:55 — forked from rafaelstz/.gitignore
Gitignore to Magento 2
#=========================#
# LeSite eCommerce Agency #
#=========================#
# Custom
#=========================#
/.dep/*
/.github
/*.sql
/*.sql.gz
@JonathanCosta
JonathanCosta / README
Created April 20, 2021 00:46 — forked from claudiorrrr/README
bash script to create nginx virtual hosts
# README
This is a very basic repo. It consist in 2 files:
1. `addvhost.sh`
2. `wp.sh`
They will help you to streamline a basic virtual host configuration in a Ubuntu machine using Nginx. Also, in case you would like to chose Wordpress, the `wp.sh` script will guide you to install it without messing around with databases, etc. It will do everything automatically.
In a fresh machine, they should be used in order.
@JonathanCosta
JonathanCosta / WritingMagentoModules.md
Last active November 13, 2020 11:59 — forked from leek/WritingMagentoModules.md
Writing Modules for Magento 1.x

Writing Magento Modules

All custom modules should have a Namespace and Module Name. These are used below as {Namespace} and {Module}.

Caution: The Magento autoloader is known to have problems with CamelCase namespaces and/or modules between Windows and *nix systems. If your module requires more than one word for either of these, it is best to just concatenate them to avoid any issues (Example: {Namespace}_{Examplemodule}).

Index

@JonathanCosta
JonathanCosta / trelloHack.user.js
Created November 12, 2020 11:58 — forked from GroupoidKid/trelloHack.user.js
ViolentMonkey script for Trello
// ==UserScript==
// @name [Trello] colorHack
// @namespace Trello
// @description Colorize Trello cards from their label(s)
// @author Dabihul
// @version 0.1.0.0
// @include https://trello.com/b/sAqFguwJ/dev-scripts-mh
// @grant none
// ==/UserScript==
$id=1; // get Customer Id
$customer = Mage::getModel('customer/customer')->load($id);
$transaction = Mage::getModel('core/resource_transaction');
$storeId = $customer->getStoreId();
$reservedOrderId = Mage::getSingleton('eav/config')->getEntityType('order')->fetchNewIncrementId($storeId);
$order = Mage::getModel('sales/order')
->setIncrementId($reservedOrderId)
->setStoreId($storeId)
@JonathanCosta
JonathanCosta / ShameEyesdroper.user.js
Created September 16, 2019 22:06 — forked from jinyu121/ShameEyesdroper.user.js
ShameEyesdroper.user.js
// ==UserScript==
// @name Shame Eyesdroper
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match *://*/*
// @grant none
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// @run-at document-start
<html>
<head>
<style>
.item {width:300px; display: inline-block; }
.item .itemtitle {font-weight:bold; font-size:2em;}
.hidden {display:none;}
</style>
</head>
<body>
<h1>Amalgam Comics Characters</h1>
@JonathanCosta
JonathanCosta / magento-xhrcart.js
Created December 2, 2017 12:07 — forked from rafaelpatro/magento-xhrcart.js
Add ajax compatibility to Magento action buttoms
/**
* Add XHR compatibility to Magento action buttoms
*
* Author:
* Rafael Patro <rafaelpatro@gmail.com>
*
* Requirements:
* DOMParser HTML fixes
* jQuery Growl library
*