Skip to content

Instantly share code, notes, and snippets.

View thurow's full-sized avatar
😃
Discovering new Frameworks

Alexandre Thurow thurow

😃
Discovering new Frameworks
View GitHub Profile
@thurow
thurow / shimmer.html
Created October 8, 2019 23:57 — forked from gastonambrogi/shimmer.html
Shimmer CSS - Shimmer effect
<h1 class="shimmer">Some Shimmer Text</h1>
<style>
@import url('http://fonts.googleapis.com/css?family=Alegreya+Sans:300');
body{
background: #000;
}
.shimmer{
/* styling stuff */
font-family:"Alegreya Sans";
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var elements = document.body.getElementsByTagName('*');
var items = [];
for (var i = 0; i < elements.length; i++) {
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) {
items.push(elements[i]);
}
}
@thurow
thurow / README.md
Created September 20, 2018 23:11 — forked from odahcam/README.md
Validação de CPF e CNPJ com integração com React Forms, implementado com Angular 6.

Exemplos

Uso com reactive forms

new FormGroup({
    cpf: new FormControl('', [
        Validators.required,
        Validators.pattern(/^(\d{3}\.){2}\d{3}\-\d{2}$/),
 Validators.minLength(14),
@thurow
thurow / criar_dump.md
Last active May 8, 2018 14:13 — forked from igorhasse/criar_dump.md
Criar dump mysql externo

Criar dump:

mysqldump -u <user> -p -h <server.domain.com> <bd> > dumps/dump.sql --single-transaction

Exportar Dump:

mysql -u <user> -p -v -h <server.domain.com> <bd> < dumps/dump.sql

gunzip < arquivo_dump.sql.gz | mysql <nome_do_banco>

mysql -e 'drop schema <nome_do_banco> ; create schema <nome_do_banco>' ; gunzip < /caminho/do/sql.gz | mysql <nome_do_banco>

@thurow
thurow / criar-bloco-produto-mais-vendidos.md
Created November 23, 2015 18:51 — forked from cagartner/criar-bloco-produto-mais-vendidos.md
Criar listagem de produtos novos, mais visualizados e mais vendidos no magento
  1. Criar um arquivo chamado Mostviewed.php no seguinte caminho: app/code/local/Mage/Catalog/Block/Product/Mostviewed.php

2 ) Adicionar o seguinte código:

<?php
/**
 * Lista Produtos Mais visualizados
 * @author Carlos Gartner <[email protected]>
 */
@thurow
thurow / chagen_status_order.sql
Created September 30, 2015 23:51 — forked from cagartner/chagen_status_order.sql
Mudar status pedido magento
UPDATE sales_flat_order_grid SET status = 'canceled' WHERE increment_id = <order_increment_id>;
UPDATE sales_flat_order SET state='canceled', status='canceled' WHERE increment_id =<order_increment_id>;

Magento Snippets

Set all categories to is_anchor 1

Find attribute_id

SELECT * FROM eav_attribute where attribute_code = 'is_anchor'

Update all of them with anchor_id from above (usually is ID 51)

UPDATE `catalog_category_entity_int` set value = 1 where attribute_id = 51
@thurow
thurow / magento-code-snippets.md
Created September 30, 2015 18:11 — forked from cagartner/magento-code-snippets.md
[magento] - code snippets

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name