Skip to content

Instantly share code, notes, and snippets.

View felipemarcos's full-sized avatar
:bowtie:

Felipe Marcos felipemarcos

:bowtie:
  • Soflyy
  • São Paulo, Brazil
  • 01:20 (UTC -03:00)
View GitHub Profile
@felipemarcos
felipemarcos / dribbble-like-menu.json
Last active March 23, 2023 19:59
Menus for Breakdance
{"source":"breakdance.local","element":{"id":204,"data":{"type":"EssentialElements\\HeaderBuilder","properties":{"design":{"layout":{"stack_vertically_at":"never"},"spacing":{"padding":{"breakpoint_base":{"left":{"number":24,"unit":"px","style":"24px"},"right":{"number":24,"unit":"px","style":"24px"},"top":{"number":0,"unit":"px","style":"0px"},"bottom":{"number":0,"unit":"px","style":"0px"}},"breakpoint_tablet_portrait":{"top":{"number":18,"unit":"px","style":"18px"},"bottom":{"number":18,"unit":"px","style":"18px"}}}},"size":{"width":{"breakpoint_base":"full"}},"borders":{"bottom":{"width":{"breakpoint_base":{"number":1,"unit":"px","style":"1px"}},"fill":{"breakpoint_base":"#f3f3f4"}}},"background":{"color":{"breakpoint_base":null,"breakpoint_tablet_portrait":"#fff"}},"sticky":null}}},"children":[{"id":205,"data":{"type":"EssentialElements\\Image","properties":{"content":{"content":{"image":{"id":-1,"type":"external_image","url":"https://breakdance.com/wp-content/uploads/2022/06/breakdance-logo.svg","alt":"
@felipemarcos
felipemarcos / duotone.php
Created May 5, 2022 15:32
WordPress: Remove Duotone code from <body>
/**
* Plugin Name: Remove Duotone Code
* Description: Remove inline junk added by WordPress
* Author: Felipe Marcos
* Version: 0.1
*/
add_action('plugins_loaded', function() {
remove_action( 'wp_body_open', 'wp_global_styles_render_svg_filters' );
});
@felipemarcos
felipemarcos / wp-cpf-login.php
Last active July 3, 2023 15:12
Permitir login por CPF - WordPress
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Plugin Name: Login por CPF
* Description: Permite o usuário se logar utilizando o CPF.
* Author: Felipe Marcos
* Author URI: https://felipe.zip
* License: GNU General Public License v3 or later
# Gzip compression
<IfModule mod_deflate.c>
# Active compression
SetOutputFilter DEFLATE
# Force deflate for mangled headers
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
# Don't compress images and other uncompressible content
@felipemarcos
felipemarcos / main.jsx
Created June 2, 2016 20:53
Reveal on scroll
import Packery from 'packery';
import imagesLoaded from 'imagesloaded';
export default class Mosaic {
constructor() {
this.options = {
pckry: {
percentPosition: true,
itemSelector: '.mosaic-item',
},
document.addEventListener('mouseleave', function(e) {
if ( e.clientY < 0 ) {
console.log('Leaving?');
}
});
@felipemarcos
felipemarcos / CustomEvents.js
Last active January 25, 2016 05:10
Custom Events
Element.prototype.dispatch = function(eventName, data) {
var event = data ? new CustomEvent(eventName, data) : new Event(eventName);
this.dispatchEvent(event);
}