Skip to content

Instantly share code, notes, and snippets.

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

Renan Costa Alencar renanalencar

🏠
Working from home
View GitHub Profile
@renanalencar
renanalencar / kotlin-detekt.yml
Created July 8, 2025 14:31
YAML file to configure Detekt plugin for Kotlin projects
style:
MagicNumber:
active: true
ignoreNumbers: [-1, 0, 1, 2, 100, 120]
ignoreHashCodeFunction: true
MaxLineLength:
active: true
maxLineLength: 120
excludePackageStatements: true
@renanalencar
renanalencar / .kotlin-editorconfig
Last active July 8, 2025 14:32
.editorconfig for Kotlin projects using ktlint
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 120
@renanalencar
renanalencar / sample_etl.cpp
Created December 20, 2023 11:18
Como escrever logs ETW (Event Trace for Windows) em arquivo ETL (Event Trace Log) em C++.
#include <windows.h>
#include <evntprov.h>
#include <stdio.h>
// Define o GUID para o provedor de eventos customizado
DEFINE_GUID(MyProviderId,
0x12345678, 0x1234, 0x5678, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF);
// Manipulador para a sessão de rastreamento
TRACEHANDLE g_hSession;
function ClickConnect(){
console.log("Working");
document.querySelector("colab-toolbar-button#connect").click()
}
setInterval(ClickConnect,60000);
function ClickConnect() {
console.log("Working");
document.querySelector("colab-connect-button").shadowRoot.getElementById('connect').click();
}
setInterval(ClickConnect,60000);