Skip to content

Instantly share code, notes, and snippets.

View Tsugami's full-sized avatar
🎯
Focusing

Yslan Ramos Tsugami

🎯
Focusing
View GitHub Profile
@Tsugami
Tsugami / kafka-oracle-vm-config.md
Created February 12, 2024 20:06 — forked from dyoung522/kafka-oracle-vm-config.md
kafka installation with systemd
  1. Install Kafka

    cd /opt
    curl -O http://www.gtlib.gatech.edu/pub/apache/kafka/0.11.0.0/kafka_2.11-0.11.0.0.tgz
    tar xvzf kafka_2.11-0.11.0.0.tgz
    ln -s kafka_2.11-0.11.0.0/ kafka
  2. Edit /usr/lib/systemd/system/kafka-zookeeper.service

version: "3.9"
services:
redis_bullmq:
image: redis:latest
container_name: redis_bullmq
restart: always
ports:
- 6379:6379
grafana:
version: '3.9'
networks:
default:
name: opentelemetry-demo
driver: bridge
services:
otel-collector:
image: otel/opentelemetry-collector-contrib
@Tsugami
Tsugami / .alacritty.yml
Created February 22, 2023 10:25
.alacritty.yml
font:
normal:
family: JetBrainsMono Nerd Font
shell:
program: /bin/zsh
window:
decorations: none
padding:
x: 20
y: 10
// Atividade 1 do livro - Pg126
// O problema consiste em elaborar um cadastro para 20 livros, contendo as seguintes informações: código, título, autor, área, ano e editora. Desenvolver um menu com as seguintes opções:
// 1. Cadastrar os livros.
// 2. Imprimir as informações dos livros.
// 3. Pesquisar livros por código.
// 4. Ordenar os livros por ano.
// 5. Sair do programa.
// No Quadro 11, temos o programa para o problema descrito. Na solução, empregamos o conceito de struct para criar a ficha do livro, vetor de struct para armazenar as informações dos 20 livros,
// o método de pesquisa sequencial para efetuar a busca de um livro por código e o método de ordenação da bolha para classificar os livros de acordo com o ano.
@Tsugami
Tsugami / bot.rs
Last active June 29, 2022 21:34
events in poise
use poise::serenity_prelude::{self as serenity};
extern crate dotenv;
use dotenv::dotenv;
struct Data {}
type Error = Box<dyn std::error::Error + Send + Sync>;
type Context<'a> = poise::Context<'a, Data, Error>;
@Tsugami
Tsugami / install.ps1
Created June 17, 2022 06:39
Powershell script to download and unzip a github repository
function Download-File {
param (
[string]$Url,
[string]$File
)
Write-Host "Downloading $Url to $File"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri $url -OutFile $File
}
function Write-Log {
param(
[Parameter()]
[ValidateNotNullOrEmpty()]
[string]$Message,
[Parameter()]
[ValidateNotNullOrEmpty()]
[ValidateSet("Info", 'Warn', 'Error', 'Success')]
[string]$Type = 'Info'
Write-Output "Teste teste" >> teste.txt