Skip to content

Instantly share code, notes, and snippets.

View zoyo23's full-sized avatar
🤖

Lucas Queiroz - Zoyo zoyo23

🤖
View GitHub Profile
@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];