Skip to content

Instantly share code, notes, and snippets.

View frozax's full-sized avatar

Francois Guibert frozax

View GitHub Profile
@frozax
frozax / DrawBounds.cs
Last active February 8, 2023 13:37
Unity component to show object bounds (in editor and in-game)
using UnityEngine;
public static class RendererArrayExtension
{
public static Bounds ComputeBounds(this Renderer[] renderers)
{
Bounds bounds = new Bounds();
for (int ir = 0; ir < renderers.Length; ir++)
{
Renderer renderer = renderers[ir];
@frozax
frozax / apk-naming.gradle
Created June 28, 2016 20:03
Gradle script to include git version in APK name
android.applicationVariants.all { variant ->
def appName
if (project.hasProperty("applicationName")) {
appName = applicationName
} else {
appName = parent.name
}
def gitSha = 'git rev-parse --short HEAD'.execute().text.trim()
def gitCommitCount = 'git rev-list HEAD --count'.execute().text.trim()
@frozax
frozax / logcat.py
Last active July 27, 2016 22:48
Helper script to run logcat from an apk (to install) or package (to (re-)start, eventually remove data)
import subprocess
import sys
import argparse
import re
# change this for you
ADB_PATH = "D:\\gamedev\\android-sdk\\platform-tools\\adb.exe"
AAPT_PATH = "d:\\gamedev\\android-sdk\\build-tools\\23.0.3\\aapt.exe"
parser = argparse.ArgumentParser(description='Clever logcat')
@frozax
frozax / out.csv
Last active October 31, 2019 09:11
name value date_int date_string lastValue rank
Battleships Solitaire 453 42 2013-01-21 0 3
Battleships Solitaire 5447 43 2013-01-28 453 3
Battleships Solitaire 10211 44 2013-02-04 5447 2
Battleships Solitaire 13823 45 2013-02-11 10211 2
Battleships Solitaire 17044 46 2013-02-18 13823 1
Battleships Solitaire 19418 47 2013-02-25 17044 1
Battleships Solitaire 21608 48 2013-03-04 19418 1
Battleships Solitaire 24118 49 2013-03-11 21608 1
Battleships Solitaire 27674 50 2013-03-18 24118 1