Skip to content

Instantly share code, notes, and snippets.

View amariliscamargo's full-sized avatar
🎯
Focusing

Amarilis Camargo amariliscamargo

🎯
Focusing
  • MoovenConsulting
  • São Paulo
View GitHub Profile
@amariliscamargo
amariliscamargo / like-dislike.js
Created July 3, 2022 20:23 — forked from tjercus/like-dislike.js
like-dislike buttons. Created with create-react-app
import React, { Component } from "react";
import "./App.css";
const reduceOne = (prevState, groupName, otherGroupName) => {
prevState[groupName].wasClicked
? prevState[groupName].count = prevState[groupName].count - 1
: prevState[groupName].count = prevState[groupName].count + 1;
prevState[groupName].wasClicked = !prevState[groupName].wasClicked;
if (prevState[otherGroupName].wasClicked) {
prevState[otherGroupName].count = prevState[otherGroupName].count - 1;
@amariliscamargo
amariliscamargo / settings.js
Created June 12, 2022 14:48
Configuração do vs code para "limpar" o ambiente para desenvolver React (.vscode/settings.js)
{
"git.enabled":false,
"files.exclude":{
"node_modules":true,
".vscode":true,
".gitignore":true,
"package.json":true,
"package-lock.json":true,
"public":true
}
// This is a combination of two modified files from jQuery Mobile,
// jquery.mobile.vmouse.js and jquery.mobile.event.js
// They were modified to only provide the touch event shortcuts, and
// avoid the rest of the jQuery Mobile framework.
// The normal jQuery Mobile license applies. http://jquery.org/license
//
// This plugin is an experiment for abstracting away the touch and mouse
// events so that developers don't have to worry about which method of input
// the device their document is loaded on supports.
//
@amariliscamargo
amariliscamargo / git.md
Created February 23, 2022 19:54 — forked from leocomelli/git.md
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@amariliscamargo
amariliscamargo / composer.json
Created February 23, 2022 14:06 — forked from michaelwhyte/composer.json
mail.php - phpmailer + mailhog - send mail via smtp
{
"require": {
"phpmailer/phpmailer": "^5.2"
}
}
@amariliscamargo
amariliscamargo / container-layout-names.md
Created January 7, 2021 17:24 — forked from joshfortyfour/container-layout-names.md
List of container layout names in Magento 2 Community Edition
  • actions_apply_to
  • admin.scope.col.wrap
  • adminhtml.block.report.product.lowstock.grid.container
  • adminhtml.catalog.product.set.edit.wrapper
  • after.body.start
  • alert.urls
  • assign_products_container
  • available_sort_by_group
  • backend.page
  • backend.session.activity
@amariliscamargo
amariliscamargo / magento2-clear.sql
Created October 7, 2020 15:21 — forked from sergiojovanig/magento2-clear.sql
Magento 2 Clear Database
##########################################################
# PRODUCTS
##########################################################
DELETE FROM `catalog_product_bundle_option`;
DELETE FROM `catalog_product_bundle_option_value`;
DELETE FROM `catalog_product_bundle_selection`;
DELETE FROM `catalog_product_entity_datetime`;
DELETE FROM `catalog_product_entity_decimal`;
DELETE FROM `catalog_product_entity_gallery`;
DELETE FROM `catalog_product_entity_int`;
@amariliscamargo
amariliscamargo / CustomAttributeInstaller.php
Created September 15, 2020 14:38 — forked from 0-Sony/CustomAttributeInstaller.php
Magento 2 : Create attributeSet, AttributeGroup, Product Attributes programmatically, and add Options (tested on Version 2.3, but older should work as well)
<?php
/**
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @author Phuong LE <sony@meincode.com> <@>
* @copyright Copyright (c) 2019 Menincode (http://www.menincode.com)
*/
namespace MyNameSpace\Catalog\Setup;
@amariliscamargo
amariliscamargo / docker_wordpress.md
Created August 15, 2019 01:53 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@amariliscamargo
amariliscamargo / .editorconfig
Created January 31, 2019 15:03 — forked from marcoslhc/.editorconfig
editorconfig for JS + HTML + CSS
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true