Skip to content

Instantly share code, notes, and snippets.

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

Mário Valney mariovalney

🏠
Working from home
View GitHub Profile
@mariovalney
mariovalney / cf7-to-webhook-discord-integration.php
Last active April 1, 2024 22:21
Format data to send a webhook to discord
<?php
/**
*
* Plugin Name: CF7 to Webhook - Discord Integration
* Description: Format data to send a webhook to discord
* Version: 1.0.0
* Author: Mário Valney
* Author URI: https://mariovalney.com
* Text Domain: cf7-to-webhook-discord-integration
*
@mariovalney
mariovalney / woo-enable-reviews-bulk-edit.php
Created August 7, 2017 19:55
WooCommerce Enable Reviews - Bulk Edit
<?php
/**
*
* Plugin Name: WooCommerce Enable Reviews - Bulk Edit
* Description: Allow enable reviews by bulk edit into WooCommerce
* Version: 1.0.0
* Author: Mário Valney
* Author URI: http://mariovalney.com
* Text Domain: woo-enable-reviews-bulk-edit
*
@mariovalney
mariovalney / pre-commit
Last active September 8, 2023 08:07
Pre-commit hook to check code with PHPCS, fix with PHPCBF and check mess with PHPMD
#!/bin/sh
#########################
# #
# Initializing #
# #
#########################
##
# You should add all tools as composer dependencies or change this path
@mariovalney
mariovalney / jquery-slick-filterable.js
Created November 9, 2018 17:54
Filter a Slick carousel when using grid mode (rows).
(function( $ ) {
$.fn.slickFilterable = function( options ) {
/**
* A plugin to create a slick we can filter.
*
* If you are not using Rows you can use slickFilter
* (check documentation) otherwise we can provide a valid filter.
*
* options {
@mariovalney
mariovalney / docker-compose.yml
Created February 6, 2020 23:07
Docker Compose to WordPress + Mailhog + Database + Network
version: '2'
services:
nginx-proxy:
image: jwilder/nginx-proxy
ports:
- "80:80"
- "443:443"
- "3306:3306"
volumes:
@mariovalney
mariovalney / cf7-to-webhook-air-table.php
Created October 20, 2020 12:11
Send webhook to Airtable API
<?php
/**
*
* Plugin Name: CF7 to Webhook - Airtable
* Description: Send webhook to Airtable API
* Version: 1.0.0
* Author: Mário Valney
* Author URI: https://mariovalney.com
* Text Domain: cf7-to-webhook-air-table
*/
@mariovalney
mariovalney / image-selector-example.js
Last active July 11, 2021 18:34
WordPress - Gutenberg Image Selector Component
import { __ } from '@wordpress/i18n';
import { registerBlockType } from '@wordpress/blocks';
import { InnerBlocks, InspectorControls, useBlockProps } from '@wordpress/block-editor';
import { PanelBody } from '@wordpress/components';
import { withSelect } from '@wordpress/data';
import ImageSelector from './image-selector';
registerBlockType( 'mariovalney/image-selector-example', {
apiVersion: 2,
@mariovalney
mariovalney / cf7-to-webhook-add-cookies.php
Last active June 9, 2021 18:55
Add Cookies data to webhook
<?php
/**
*
* Plugin Name: CF7 to Webhook - Add Cookies
* Description: Add Cookies data to webhook
* Version: 1.0.0
* Author: Mário Valney
* Author URI: https://mariovalney.com
* Text Domain: cf7-to-webhook-add-cookies
*/
@mariovalney
mariovalney / bitbucket-pipelines.yml
Last active May 18, 2021 01:08
Runs a build and publish to WP Engine Git Push
image: node:lts
pipelines:
default:
- step:
caches:
- node
deployment: staging
name: Deploy to Staging
script:
@mariovalney
mariovalney / bitbucket-pipelines.yml
Last active April 8, 2021 13:39
Deploying from Bitbucket Pipelines to WP Engine using Gulp
image: node:10.9.0
pipelines:
custom:
production:
- step:
deployment: production
caches:
- node
script: