Skip to content

Instantly share code, notes, and snippets.

View taminhtienhai's full-sized avatar
🐟

Harris Tạ taminhtienhai

🐟
View GitHub Profile
@hortonew
hortonew / setup-bevy-0.15-project-for-android.sh
Last active September 2, 2025 13:53
setup-bevy-0.15-project-for-android.sh
#!/bin/zsh
# Grab PROJECT from Cargo.toml project.name
PROJECT=$(grep "name" Cargo.toml | cut -d '"' -f 2 | head -n 1)
PROJECT_ORG="bevyengine"
PROJECT_ORG_STRUCTURE="org.${PROJECT_ORG}.${PROJECT}"
BEVY_RELEASE="refs/heads/release-0.15.2"
echo "Creating new Bevy project: ${PROJECT} with organization structure: ${PROJECT_ORG_STRUCTURE}"
@tsjensen
tsjensen / gradle-jacoco-aggregated-report.md
Last active November 18, 2024 09:03
Gradle: Create a JaCoCo Report aggregating all subprojects

Create an Aggregated JaCoCo Report

The JaCoCo results from all subprojects shall be combined.

Requirements

  • Don't make any assumptions about where files are located in the build folders.
  • Refer to the sources of truth for getting at needed information.
  • Don't make any assumptions about which source sets are being tested. It might be main, but it might not.
  • Handle subprojects that don't JaCoCo.
@daquinoaldo
daquinoaldo / PDF-doclet.md
Last active December 10, 2025 07:42
PDF doclet: export JavaDoc in PDF

PDF doclet: export JavaDoc in PDF

  1. Download PDFDoclet from SourceForge.
  2. Edit pdfdoclet.sh setting correctly
  • PATH: the Java bin path
  • DOCLET_PATH: the path to the downloaded PDFDoclet JAR
  • SRC: the path to your source code containing the JavaDoc
  • PACKAGES: the list of all the packages in your source code
  • OUTPUT_NAME: optionally, the output name of the generated pdf (the directory must exists).
  1. Edit pdfdoclet.config changing api.title (the title of the first page of the JavaDoc) and api.author (your name)
@bgauduch
bgauduch / multiple-repository-and-identities-git-configuration.md
Last active December 3, 2025 12:06
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@KodrAus
KodrAus / Profile Rust on Linux.md
Last active November 25, 2025 10:05
Profiling Rust Applications

Profiling performance

Using perf:

$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg

NOTE: See @GabrielMajeri's comments below about the -g option.