Skip to content

Instantly share code, notes, and snippets.

View THeK3nger's full-sized avatar
🍕
I need a pizza. As usual.

Davide Aversa THeK3nger

🍕
I need a pizza. As usual.
View GitHub Profile
@THeK3nger
THeK3nger / find-old-binaries.rb
Last active May 6, 2020 13:31
Find old binary blobs in Git repository. Usage example `ruby find-old-binaries.rb master 0.5 true`
#!/usr/bin/env ruby -w
head, treshold, only_orphans = ARGV
only_orphans ||= false
head ||= 'HEAD'
Megabyte = 1000 ** 2
treshold = (treshold || 0.1).to_f * Megabyte
# Usage:
# ruby find-old-binaries.rb <branch> <size limit in MB> <show only orphans?>
#
@THeK3nger
THeK3nger / signal.ts
Last active July 3, 2022 11:02
Example TypeScript Event System
/**
MIT License
Copyright (c) 2022 Davide Aversa
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@THeK3nger
THeK3nger / ElevenVoices.cs
Last active January 2, 2025 23:37
Unity script for using ElevenLabs TTS service
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
using Newtonsoft.Json;
/**
* Optional utility class to fetch all the available Voices in the ElevenLabs account.
* This may be useful if you want to allow the player to customize the voice at runtime.