Skip to content

Instantly share code, notes, and snippets.

View zoyo23's full-sized avatar
🤖

Lucas Queiroz - Zoyo zoyo23

🤖
View GitHub Profile
@zoyo23
zoyo23 / index.ts
Created April 4, 2025 11:57
[K6] Executa de forma estruturada organizando os arquivos de saída de acordo com a data de execução.
import { textSummary } from "https://jslib.k6.io/k6-summary/0.0.1/index.js";
import { htmlReport } from "https://raw.githubusercontent.com/benc-uk/k6-reporter/main/dist/bundle.js";
import http from 'k6/http';
import { sleep } from 'k6';
export const options = {
stages: [
{ duration: '5s', target: 10 },
{ duration: '10s', target: 100 },
{ duration: '10s', target: 500 },
var successCounter = 0;
var notSuccessCounter = 0;
var intervalInSeconds = 10
// START PROCESS
var myTimer = window.setInterval(function () {
var dateTime = new Date();
var btn = document.querySelectorAll("button[aria-label='Resgatar Bônus']")[0];
if (btn) {
@zoyo23
zoyo23 / publish_single_exe.sh
Created September 16, 2022 12:41
Generate a single file output service self contained for .net projects
dotnet publish -r win-x64 -p:PublishSingleFile=true --self-contained true -o "outup_path"
@zoyo23
zoyo23 / Consumer.cs
Last active October 26, 2023 17:59
Dynamic Inject dependency by Key
public class Consumer
{
private readonly IService _aService;
public Consumer(ServiceResolver serviceAccessor)
{
_aService = serviceAccessor("A");
}
public void UseServiceA()
@zoyo23
zoyo23 / ObterDuracaoPlayListYoutube.js
Last active May 25, 2024 15:38
Calcula o tempo total de uma playlist no Youtube. É só colar no console na página da playlist.
(function() {
var timeSeconds = 0;
var timestampList = document.querySelectorAll("div#content div#container ytd-thumbnail#thumbnail a#thumbnail div#overlays.style-scope.ytd-thumbnail.style-scope ytd-thumbnail-overlay-time-status-renderer span");
for(var i = 0; i < timestampList.length; i++) {
var timestampDiv = timestampList[i];