Skip to content

Instantly share code, notes, and snippets.


Luiz Fernando de Souza Filho fernandoperigolo

View GitHub Profile
fernandoperigolo / index.html
Created April 25, 2023 17:40
Identify user HubPost
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
fernandoperigolo / index.html
Created December 21, 2019 00:41
Javascript redirect example
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Form Redirect</title>
<h1>Luiz Cloud</h1>
View PostList.js
import React, { Component, Fragment } from 'react'
import { connect } from 'react-redux'
import { handleGetAllPosts } from '../actions/posts'
class PostList extends Component {
componentDidMount () {
render() {
const { posts } = this.props
fernandoperigolo / ebitsuccess.phtml
Created August 24, 2017 18:23
Monta tag do banner do Ebit na página de sucesso do Magento 1 com o lightbox
View ebitsuccess.phtml
$order = Mage::getModel('sales/order');
$amount = number_format($order->getGrandTotal(),2);
$email = $order->getCustomerEmail();
$dob = $order->getCustomerDob();
$dob = explode(' ', $dob);
$dob2 = explode('-', $dob[0]);
$dobYear = $dob2[0];
$dobMonth = $dob2[1];
fernandoperigolo / searchByTaxvat.sql
Created March 20, 2017 13:03
This is a Query for Magento where you can search a customer by taxvat. The entity_id result is the ID of customer, so you can find easily in Magento admin
View searchByTaxvat.sql
SELECT * FROM customer_entity_varchar WHERE value = "12312312312";
fernandoperigolo / server.conf
Created November 1, 2016 19:20
Use this NGINX server conf to run more than one Magento instalation on server. You can access based on folder. Works copy and past if you created a machine using
View server.conf
server {
listen *:80;
client_max_body_size 30m;
set $basepath "/var/www";
set $domain $host;
if ($domain ~ "^(.*)\.awesome\.dev$") {
set $project $1;
fernandoperigolo / compose.js
Last active September 12, 2017 13:13
This is a example about how implement Compose Technique in Javascript.
View compose.js
// Adding compose to Function prototype
Function.prototype.compose = function(argFn) {
var fnToCall = this;
return function() {
// This line is really complex and i don't know exactly what this line do
return, argFn.apply(this,arguments));