Skip to content

Instantly share code, notes, and snippets.

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

Diogenes Oliveira Junior diogenesjup

🏠
Working from home
View GitHub Profile
@diogenesjup
diogenesjup / agente-imagens.php
Created March 17, 2025 04:44
Agente de avaliação de imagens
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.diogenesjunior.com.br/ia/gpt4-avaliar-imagem/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
@diogenesjup
diogenesjup / agente-avaliacao.php
Created March 17, 2025 04:43
Mini agente avaliação de resposta
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.diogenesjunior.com.br/ia/gpt4-agents-mini',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://diogenesjunior.com.br/api/ia/gpt4/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
@diogenesjup
diogenesjup / vendedor.php
Created February 19, 2025 16:25
Exibir o nome do vendedor
<?php
// Adiciona a coluna "Vendedor" na listagem de pedidos do WooCommerce
add_filter('manage_edit-shop_order_columns', 'adicionar_coluna_vendedor_pedidos');
function adicionar_coluna_vendedor_pedidos($columns) {
$columns['vendedor'] = 'Vendedor';
return $columns;
}
// Exibe o nome do vendedor salvo no meta_dado 'ident_vendedor'
@diogenesjup
diogenesjup / exemplo.js
Created February 10, 2025 15:14
Exemplo JS
enviarAjaxHarmonics('harmonics_diocomp', 'rede_social_apagar', { id_postagem: idPostagem }, 'confirmacao', function(response) {
console.log("RETORNO HARMONICS");
console.log(response);
abrirFecharHarmonics();
var sucesso = $.confirm({
title: 'Deu certo!',
type: 'green',
@diogenesjup
diogenesjup / custom.php
Created February 10, 2025 15:12
Coloque isso no seu plugin personalizado
<?php
add_action('harmonics_pipe', function($identificador, $dados) {
if ($identificador === 'fluxo3') {
echo '<div>Este é o conteúdo do Fluxo 3 carregado via do_action e você está vendo isso, funcionou</div>';
}
}, 10, 2);
?>
<?php
add_action( 'rest_api_init', 'custom_routes_webhook_0277');
function custom_routes_webhook_0277(){
//(exemplo: /wp-json/exemplo/notificacoes)
register_rest_route(
'exemplo', '/notificacoes/', array(
'methods' => 'POST',
This file has been truncated, but you can view the full file.
Running with gitlab-runner 14.10.1 (f761588f)
on Ionic Package Android Runner 8edcfcad
Preparing the "kubernetes" executor
Using Kubernetes namespace: ionic-runners
Using Kubernetes executor with image 319312831725.dkr.ecr.us-west-2.amazonaws.com/appflow-runners/linux:2023.10 ...
Using attach strategy to execute scripts...
Preparing environment
Waiting for pod ionic-runners/runner-8edcfcad-project-0-concurrent-15qlm2 to be running, status is Pending
Running on runner-8edcfcad-project-0-concurrent-15qlm2 via gitlab-runner-5cd9bd7bf6-z82g8...
This file has been truncated, but you can view the full file.
Running with gitlab-runner 14.10.1 (f761588f)
on Ionic Package Android Runner 8edcfcad
Preparing the "kubernetes" executor
Using Kubernetes namespace: ionic-runners
Using Kubernetes executor with image 319312831725.dkr.ecr.us-west-2.amazonaws.com/appflow-runners/linux:2023.10 ...
Using attach strategy to execute scripts...
Preparing environment
Waiting for pod ionic-runners/runner-8edcfcad-project-0-concurrent-8jt24t to be running, status is Pending
Running on runner-8edcfcad-project-0-concurrent-8jt24t via gitlab-runner-5cd9bd7bf6-z82g8...
@diogenesjup
diogenesjup / declare.php
Created June 11, 2024 18:14
Variavel padrão para AJAX e outras chamadas JavaScript da plataforma BETWP
<script>
const homeUrl = "<?php echo get_option('home'); ?>";
</script>