Skip to content

Instantly share code, notes, and snippets.

View mbmaciel's full-sized avatar
🏠
Working from home since 2008

Mauricio Maciel mbmaciel

🏠
Working from home since 2008
View GitHub Profile
@mbmaciel
mbmaciel / webhook.php
Created January 30, 2023 16:53
Webhook para eduzz
<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST');
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Origin, Cache-Control, Pragma, Authorization, Accept, Accept-Encoding");
require_once('wp-load.php');
require_once('wp-includes/user.php');
function generateRandomString($length = 10) {
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
@mbmaciel
mbmaciel / Atenticação Unobot
Created April 19, 2023 19:23
Authentication.php
<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST');
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Origin, Cache-Control, Pragma, Authorization, Accept, Accept-Encoding");
require_once('wp-load.php');
function generateRandomString($length = 10) {
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
@mbmaciel
mbmaciel / nginx.conf
Created May 19, 2023 12:54
Bloqueio de imagens no nginx
location ~ .(gif|png|jpe?g)$ {
valid_referers none blocked dominio.com, *.dominio.com, outrodominio.com, *.outrodominio.com;
if ($invalid_referer) {
return 403;
}
@mbmaciel
mbmaciel / usd.xml
Created May 23, 2023 19:49
Corrigir bug do bot com AUD (bots feitos na binary)
colocar o campo currency_list , logo depois de durationtype_list.
O código fica como abaixo:
<field name="DURATIONTYPE_LIST">t</field>
<field name="CURRENCY_LIST">USD</field>
@mbmaciel
mbmaciel / wordpress-multi.config
Created June 2, 2023 12:00
Nginx with multiple wordpress sites
// Command to activate
sudo curl -X PUT --data-binary @/home/user/wordpress-multi.config --unix-socket /run/control.unit.sock http://localhost/config
{
"listeners": {
"127.0.0.1:8090": {
"application": "script_index_php"
},
"127.0.0.1:8091": {
Verifying that I control the following Nostr public key: npub1pdn83s76f7wwehgdc7cw3ullxq8xdctg83zdgfut0yapa3g2c7cssw50dq
@mbmaciel
mbmaciel / start.sh
Created April 17, 2025 17:07
Script para executar plataforma deriv
#!/bin/bash
cd /home/americanbot/americanpro
/home/americanbot/.nvm/versions/node/v10.19.0/bin/node node_modules/gulp/bin/gulp.js watch