Skip to content

Instantly share code, notes, and snippets.

View rhcarlosweb's full-sized avatar
🖖

Rhuan Carlos rhcarlosweb

🖖
View GitHub Profile
#!/bin/bash
# n8n Docker Installation Script with Traefik, Redis, PostgreSQL, and Queue Mode
# This script sets up n8n with Docker Compose including:
# - Traefik as reverse proxy with Let's Encrypt SSL
# - Redis for caching
# - PostgreSQL for database
# - n8n in queue mode with 2 workers
# Force execution with bash
{
"status": "success",
"result": {
"money": {
"total_paid": 249667.24,
"available_payment_brl": 249667.24,
"total_profit": 249667.24
},
"rocket": {
"current_level": 1,
{"IcoMoonType":"selection","icons":[{"icon":{"paths":["M1024 590.444l-512-397.426-512 397.428v-162.038l512-397.426 512 397.428zM896 576v384h-256v-256h-256v256h-256v-384l384-288z"],"tags":["home","house"],"defaultCode":59648,"grid":16,"attrs":[]},"attrs":[],"properties":{"ligatures":"home, house","name":"home","order":2,"id":1,"prevSize":32,"code":59648},"setIdx":0,"setId":1,"iconIdx":0},{"icon":{"paths":["M512 32l-512 512 96 96 96-96v416h256v-192h128v192h256v-416l96 96 96-96-512-512zM512 448c-35.346 0-64-28.654-64-64s28.654-64 64-64c35.346 0 64 28.654 64 64s-28.654 64-64 64z"],"tags":["home","house"],"defaultCode":59649,"grid":16,"attrs":[]},"attrs":[],"properties":{"ligatures":"home2, house2","name":"home2","order":3,"id":2,"prevSize":32,"code":59649},"setIdx":0,"setId":1,"iconIdx":1},{"icon":{"paths":["M1024 608l-192-192v-288h-128v160l-192-192-512 512v32h128v320h320v-192h128v192h320v-320h128z"],"tags":["home","house"],"defaultCode":59650,"grid":16,"attrs":[]},"attrs":[],"properties":{"ligatures":"home3, hou
@rhcarlosweb
rhcarlosweb / marquee.js
Created November 23, 2024 07:20
Marquee GSAP
class Marquee {
constructor(selector, options = {}) {
// Validação do seletor
if (!selector) {
throw new Error('Marquee: selector is required');
}
// Configuração padrão expandida
this.config = {
@rhcarlosweb
rhcarlosweb / acf-maps.js
Created October 12, 2024 21:46
ACF Maps JS
(function() {
/**
* initMap
*
* Renders a Google Map onto the selected element
*
* @date 22/10/19
* @since 5.8.6
*
@rhcarlosweb
rhcarlosweb / Ad Shortcode.php
Created September 29, 2024 15:18
Shortcode WordPress to show Random Adsense
// Adicione este código ao arquivo functions.php do seu tema ou em um plugin personalizado
function random_ad_shortcode($atts) {
static $ad_count = 0;
$ad_count++;
// Extrai os atributos do shortcode
$atts = shortcode_atts(array(
'ids' => '', // IDs das imagens, separados por vírgula
'link' => '', // URL do link do anúncio
@rhcarlosweb
rhcarlosweb / gradient-border.scss
Created September 16, 2024 15:59
Gradient Border Tailwindcss
@layer components {
.gradient-border {
@apply relative;
&::after {
@apply absolute inset-[-1px] pointer-events-none p-[1px] z-[1] bg-gradient-to-r from-transparent to-transparent;
content : '';
z-index : 1;
mask : linear-gradient(#fff 0 0) content-box,
linear-gradient(#fff 0 0) border-box;
-webkit-mask : linear-gradient(#fff 0 0) content-box,
@rhcarlosweb
rhcarlosweb / post-type-taxonomy-same-slug-wordpress.php
Created May 2, 2024 15:10
Post type and taxonomy with same slug
/**
* Função que altera o título da página de taxonomia 'category_photos'.
*
* @param string $title O título atual da página.
* @return string O novo título da página.
*/
add_filter('pre_get_document_title', 'change_title_taxonomy_page', 10, 1);
function change_title_taxonomy_page($title) {
if (is_tax('category_photos')) {
@rhcarlosweb
rhcarlosweb / rh_get_crop_image.php
Created February 29, 2024 15:37
Crop image wordpress
<?php function rh_image_size($attachment_id, $width = null, $height = null, $crop = true, $force_crop = false) {
$path = get_attached_file($attachment_id);
if (!file_exists($path)) {
return false;
}
$upload = wp_upload_dir();
$path_info = pathinfo($path);
$base_url = $upload['baseurl'] . str_replace($upload['basedir'], '', $path_info['dirname']);
@rhcarlosweb
rhcarlosweb / symlink-create.py
Last active October 12, 2024 21:10
UI para crirar symlink em python | Symlink creator with UI