This file contains hidden or 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
/*! Convert field content to utf8 */ | |
UPDATE table SET field = convert(cast(convert(field using latin1) as binary) using utf8 |
This file contains hidden or 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
/** | |
* CSS file created using Bennett Feely's clip-path generator <https://bennettfeely.com/clippy/> | |
*/ | |
.clipped-parallelogram { | |
-webkit-clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%); | |
clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%); | |
} | |
.clipped-trapezoid { |
This file contains hidden or 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("Access-Control-Allow-Origin: *"); | |
header("Access-Control-Allow-Methods: POST"); | |
header("Access-Control-Allow-Headers: Content-Type"); | |
header("Content-Type: application/json"); | |
require_once '../vendor/autoload.php'; | |
use Cielo\API30\Ecommerce\Browser; |
This file contains hidden or 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
Index: | |
<?php | |
define("RECAPTCHA_V3_SITE_KEY", "XXX"); | |
?> | |
<script src="https://www.google.com/recaptcha/api.js?render=<?php echo RECAPTCHA_V3_SITE_KEY; ?>"></script> | |
<script> | |
grecaptcha.ready(function() { | |
grecaptcha.execute('<?php echo RECAPTCHA_V3_SITE_KEY; ?>', {action: 'contato'}).then(function(token) { | |
document.getElementById('recaptchaResponse').value = token; |
This file contains hidden or 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 | |
class ResumeDownload { | |
private $file; | |
private $name; | |
private $boundary; | |
private $delay = 0; | |
private $size = 0; | |
function __construct($file, $delay = 0) { | |
if (! is_file($file)) { |
This file contains hidden or 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 | |
if ( ! function_exists( 'my_theme_setup' ) ) { | |
function my_theme_setup() { | |
//Ref. https://developer.wordpress.org/reference/functions/wp_create_nav_menu/ | |
$menu_name = 'Menu 1'; | |
$menu_exists = wp_get_nav_menu_object( $menu_name ); | |
if( !$menu_exists ) { | |
$menu_id = wp_create_nav_menu($menu_name); |
This file contains hidden or 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
Options -Indexes | |
RewriteEngine On | |
# Force https | |
RewriteCond %{HTTPS} !on | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
# Disable folder navigation | |
RewriteCond %{REQUEST_FILENAME} !-f |
This file contains hidden or 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 | |
$xmlr = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.calculoFrete.mercurio.com" xmlns:mod="http://model.vendas.lms.mercurio.com"> | |
<soapenv:Header/> | |
<soapenv:Body> | |
<ser:calculaFrete> | |
<ser:in0> | |
<mod:login>' . $user_login . '</mod:login> | |
<mod:senha></mod:senha> | |
<mod:nrIdentifClienteRem>' . $cnpj . '</mod:nrIdentifClienteRem> |
This file contains hidden or 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
function mostrarDataHora(){ | |
var hoje = new Date(); | |
//https://stackoverflow.com/questions/24998624/day-name-from-date-in-js | |
var days = ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado']; | |
var mons = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; | |
var nome = days[hoje.getDay()]; | |
var data = nome + ', ' + ("0" + hoje.getDate()).slice(-2) + ' de ' + mons[hoje.getMonth()] + ' de ' + hoje.getFullYear(); | |
var hora = ("0" + hoje.getHours()).slice(-2) + ":" + ("0" + hoje.getMinutes()).slice(-2) + ":" + ("0" + hoje.getSeconds()).slice(-2); |
This file contains hidden or 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 | |
/** | |
* Altera detalhes nos forms de checkout | |
* | |
* Lista de campos disponível em: | |
* https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/ | |
*/ | |
function my_shipping_fields($fields){ | |
$fields['shipping']['shipping_address_2']['label_class'] = "visible"; //form de entrega |
NewerOlder