This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: AIFW Create Categories | |
* Description: Will create categories if not found. | |
* Version: 1.0.0 | |
* Author: Mário Valney | |
* Author URI: https://mariovalney.com | |
* Text Domain: aifw-create-categories | |
* | |
* @link https://github.com/mariovalney/api-improver-for-woocommerce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: CF7 Custom Select | |
* Description: Add data to select like Listo | |
* Version: 1.0.0 | |
* Author: Mário Valney | |
* Author URI: https://mariovalney.com | |
* Text Domain: cf7-custom-select | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
# Common variables | |
BL=$'\n' | |
SELECT_YES="YES" | |
SELECT_NO="NO" | |
SELECT_OVERWRITE="Overwrite" | |
SELECT_EXIT="Exit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* Plugin Name: WC Products Shortcode by User | |
* Description: Ass "current_user" to [products] shortcode to show only products from current user. | |
* Version: 1.0.0 | |
* Author: Mário Valney | |
* Author URI: https://mariovalney.com | |
* Text Domain: wc-products-shortcode-by-user | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Content-type: text/csv"); | |
header("Content-Disposition: attachment; filename=file.csv"); | |
header("Pragma: no-cache"); | |
header("Expires: 0"); | |
// Load file | |
$xml_string = file_get_contents(dirname(__FILE__) . '/file.xml'); | |
str_replace($xml_string, 'dc:', 'dc-'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Developed by Mário Valney <mariovalney@gmail.com> | |
* | |
* Inspired on "Save Extra JPEG" and created using: | |
* https://www.adobe.com/content/dam/acom/en/devnet/photoshop/pdfs/photoshop_scriptref_js.pdf | |
*/ | |
/** | |
* @@@BUILDINFO@@@ Save PNG 4 XP.jsx 1.0.0 Thu Oct 24 2019 19:21:44 GMT-0300 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const API_URL = "https://api.example.com/your-endpoint"; // Your API request | |
const SLACK_URL = ""; // Check: https://api.slack.com/incoming-webhooks | |
const NOTIFICATION = {text: "ITEM I WANT CHANGED!"}; // Message sent to Slack | |
const INTERVAL = 60000; // Interval in miliseconds | |
const interval = setInterval(() => { | |
fetch(API_URL) | |
.then(response => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
jQuery(document).ready(function($) { | |
// Nineth Digit behavior | |
var ninethDigitMask = function( val ) { | |
return ( val.replace( /\D/g, '' ).length === 11 ) ? '(00) 00000-0000' : '(00) 0000-00009'; | |
} | |
// Multiple Documents Behaviour | |
var multipleDocumentsMask = function( val, e, field, options ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Database; | |
interface Database | |
{ | |
public static function getInstance(); | |
public function create(string $table, array $columns); |