Skip to content

Instantly share code, notes, and snippets.

View neiesc's full-sized avatar
💚

Edinei Cavalcanti neiesc

💚
View GitHub Profile
@neiesc
neiesc / moment.sh
Created October 21, 2025 16:12
moment.sh
#!/bin/bash
#https://github.com/moment/moment/pull/4391
moment=./build/umd/moment.js
for tz in Asia/Kathmandu America/Sao_Paulo Europe/London; do
echo $tz;
TZ=$tz node -e "$(cat << EOF
var moment = require('${moment}');
var m = moment();

Tuning Jellyfin for Large Libraries

Jellyfin, at least in its current state hasn't been great for media server

Database

It is no secret that Jellyfin's database has its shortcomings, espeically when trying to search large media collections. To remedy this, we'll be manually setting some PRAGMA values in the sqlite database.

While it is important to note that these optimizations may cause issues should sudden powerloss occur, it should be pretty safe to run them in an environment like a datacenter, which is where most of my gear resides.

@neiesc
neiesc / gist:f2605ebf627344b24b2fd680359f88e3
Created September 10, 2025 12:10 — forked from torvalds/gist:6faadce34c56d53b2d5352da0c3cd093
Not involved with any fishy crypto fishy business
I'm told that there are people claiming to "tokenize" my git repositories with my approval.
I just want to clarify that that is not the case. I do not believe in monetizing my repositories.
If you believe crypto-currencies are anything but a scam, I have a bridge to sell you.
But I'm not selling source code.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@neiesc
neiesc / main.rs
Created January 31, 2025 18:20
FizzBuzz in rust 🦀
use clap::Parser;
use std::error::Error;
#[derive(Debug, Parser)]
struct Cli {
#[structopt(short = 'n')]
num: usize
}
fn main() -> Result<(), Box<dyn Error>> {
@neiesc
neiesc / ConfigurationApp.cs
Created May 3, 2024 12:22
Backend AzureAD
using Microsoft.EntityFrameworkCore;
using System.Text.Json.Serialization;
using Microsoft.AspNetCore.RateLimiting;
using System.Threading.RateLimiting;
using Microsoft.OpenApi.Models;
using Microsoft.AspNetCore.Authentication.JwtBearer;
namespace Infrastructure;
public static class ConfigurationApp

Download Audio from YouTube

-i - ignore errors

-c - continue

--extract-audio - extract audio track

--audio-format mp3 - convert to mp3

@neiesc
neiesc / 1_criar_tuplas.cs
Last active June 19, 2021 13:54
dotnet Hands-On: Como criar tuplas e usar desconstrutor, descartes e operadores nelas em C#
using System;
using System.Collections.Generic;
using System.Linq;
public class Program
{
public static void Main()
{
(string, int) populacao = ("Rio Preto", 500_000);
Console.WriteLine($"{populacao.Item1}: {populacao.Item2}");
/**
* Implementação do algorítimo SoundEx em Javascript.
* @author João Batista Neto
*
* SoundEX é um algorítimo fonético para indexação de nomes pelo som segundo
* sua pronúncia. O algorítimo foi desenvolvido por Robert C. Russell e
* Margaret K. Odell e patenteado em 1918 e 1922.
* {@link http://en.wikipedia.org/wiki/Soundex}
*
* @return {String}
@neiesc
neiesc / FizzBuzz.py
Last active December 20, 2015 07:39
FizzBuzz
#!/usr/bin/env python
#-*- coding: utf-8 -*-
"""
FizzBuzz
"""
def fizzbuzz(num):
retorno = ''
if num <= 0 :