Skip to content

Instantly share code, notes, and snippets.

View uxmoon's full-sized avatar
🏠
Working from home

Martin Luna uxmoon

🏠
Working from home
  • Buenos Aires, Argentina
View GitHub Profile
@uxmoon
uxmoon / code-snippet.php
Created March 4, 2023 19:22
Remove MailPoet CSS files
<?php
// Force removal of styles
add_filter('print_styles_array', 'custom_print_styles_array');
/**
* Force removal of styles that are not enqued properly
*/
function custom_print_styles_array($styles){
$styles_to_remove = array(
'mailpoet_public', // plugins/mailpoet
'mailpoet_custom_fonts_css' // plugins/mailpoet
@uxmoon
uxmoon / input.scss
Created December 19, 2022 20:37
Generated by SassMeister.com.
$accents: (
primary: --color-big-sky-500,
spotlight: --color-aruba-500,
warning: --color-yellow-500,
danger: --color-cardinal-500,
info: --color-scarlet-500
);
.card-accent {
@uxmoon
uxmoon / input.scss
Created April 28, 2022 19:20
Generated by SassMeister.com.
.vv-wizard-stepper {
display: flex;
justify-content: center;
margin: 20px 0;
}
.vv-wizard-stepper ul {
display: flex;
margin: 0;
padding: 0;
}
@uxmoon
uxmoon / input.scss
Created April 28, 2022 19:20
Generated by SassMeister.com.
.vv-wizard-stepper {
display: flex;
justify-content: center;
margin: 20px 0;
}
.vv-wizard-stepper ul {
display: flex;
margin: 0;
padding: 0;
}
@uxmoon
uxmoon / npm-frontend-guide.md
Last active September 12, 2020 23:24
Node - NPM command list guide for frontend web development

NPM

This is a small guide as a self-reminder :)

Requirements

Install NodeJs

Installation

@uxmoon
uxmoon / setattributes.js
Last active April 26, 2018 13:36
vanilla js add multiple attributes
var el = document.querySelector('.button');
function setAttributes(el, attrs) {
Object.keys(attrs).forEach(key => el.setAttribute(key, attrs[key]));
}
setAttributes(el, {
class: 'button button--lg button--inverted',
'data-src': 'https://player.vimeo.com/video/28629415?autoplay=false',
'data-padding-bottom': '56.25%',
@uxmoon
uxmoon / .zshrc
Created February 11, 2018 15:08
hide username in terminal (linux ubuntu)
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER"
fi
}
@uxmoon
uxmoon / WordPress custom loop.md
Last active August 15, 2017 20:25
WordPress Custom WP_Query
<?php

  $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;

  $args = array(
    'post_type' => 'press_article',
    'showposts' => '1',
    'paged'     => $paged,
 );
@uxmoon
uxmoon / functions.md
Last active August 3, 2017 13:45
WordPress clean <head> code
function wp_head_cleanup () {
  remove_action('wp_head', 'wp_generator');
  remove_action('wp_head', 'wlwmanifest_link');
  remove_action('wp_head', 'rsd_link');
  remove_action('wp_head', 'wp_shortlink_wp_head');

  remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10);
@uxmoon
uxmoon / functions.md
Last active August 3, 2017 13:45
WordPress - Enable shortcodes in Widgets
// Enable shortcodes in widgets
add_filter('widget_text', 'do_shortcode');