Skip to content

Instantly share code, notes, and snippets.

View abeldantas's full-sized avatar
🔮
Yes!

Abel Dantas abeldantas

🔮
Yes!
View GitHub Profile
\begin{figure}[H]
\centering
% 2027 Timeline
\begin{tikzpicture}[scale=0.8]
\draw[thick, ->] (0,0) -- (16,0) node[right] {\small 2027};
\foreach \x/\m in {0/Jan, 2/Feb, 4/Mar, 6/Apr, 8/May, 10/Jun, 12/Jul, 14/Sep} {
\draw[thick] (\x,-0.1) -- (\x,0.1) node[above] {\small \m};
}
@abeldantas
abeldantas / .gitignore
Created March 14, 2025 20:53
Blazor gitignore
# Visual Studio files
.vs/
.vscode/
*.suo
*.user
*.userosscache
*.sln.docstates
*.userprefs
# Build results
@abeldantas
abeldantas / SplashInitializer.cs
Last active January 8, 2024 17:33
Unity Splash Optimization with Priority-based and Thread-Aware Initialization
/// <summary>
/// This is the dependency or subsystem that needs to be initialized before the first scene
/// </summary>
public interface IInitializable
{
bool IsInitialized { get; }
bool CanInitializeAsynchronously { get; }
void Initialize();
event Action OnInitialized;
}
@abeldantas
abeldantas / GitCommands.md
Last active January 8, 2024 15:37
Common Git Commands

See history between A and B

history | nl | sed -n '265,275p'

@abeldantas
abeldantas / tif_to_png.py
Created January 1, 2024 14:57
TIF to PNG Converter
from PIL import Image
import os
import sys
def convert_tif_to_png(src_path, dest_path):
if not os.path.exists(dest_path):
os.makedirs(dest_path)
for root, dirs, files in os.walk(src_path):
for file in files:
@abeldantas
abeldantas / nested_extension_copier.py
Last active January 1, 2024 14:38
Copy files with extensions nested in path
"""
Nested Extension Copier: A Python script to recursively copy files with specified extensions
from a source directory to a destination directory. It accepts multiple extensions as command-line
arguments, allowing for flexible and targeted file copying. Ideal for organizing files or selective backups.
"""
import os
import shutil
import sys
@abeldantas
abeldantas / extension_finder.py
Created January 1, 2024 14:25
File extension finder in path
import os
import sys
def find_unique_extensions(path):
"""
Recursively finds and returns a set of unique file extensions in the given directory.
:param path: Path of the directory to search in.
:return: Set of unique file extensions.
"""
@abeldantas
abeldantas / SetupSonarqube.md
Last active March 27, 2024 15:23
How to Setup Sonarqube

How to Install SonarQube Community Edition on Linux

1. Install Java & PostgreSQL

sudo apt update
sudo apt install openjdk-17-jre postgresql postgresql-contrib

2. Download SonarQube Community Edition

@abeldantas
abeldantas / UniTaskExample.cs
Last active November 14, 2023 16:04
No Fire and Forget Tasks in Unity
using System;
using System.Collections;
using System.Threading;
using Cysharp.Threading.Tasks;
using UnityEngine;
using Awaiter = Cysharp.Threading.Tasks.UniTask.Awaiter;
/// <summary>
/// Coroutines are great, and if we can fulfill all requirements using them, then good, no need to mess with Tasks!
///
@abeldantas
abeldantas / inspect-aab.sh
Created October 26, 2023 15:22
AAB Processing Script for Android Development
#!/bin/bash
# Usage: ./script.sh [file1.aab file2.aab ...]
# If no arguments are provided, the script will find and process all .aab files in the current directory.
# The script performs the following steps for each .aab file:
# 1. Builds an .apks file using bundletool.
# 2. Deletes the original .aab file.
# 3. Renames the .apks to .zip.
# 4. Decompresses the .zip into a new directory.
# 5. Deletes the .zip file.