Skip to content

Instantly share code, notes, and snippets.

View luisparravicini's full-sized avatar

Luis Parravicini luisparravicini

View GitHub Profile
#!/usr/bin/env ruby -W
require 'yaml'
require 'fileutils'
#
# Copies a physics shape from a sprite (reading it's .meta file)
# and aplies the same shape to other sprites.
# Tested only with .meta files created with Unity 2019.1.0f2 and MY
@luisparravicini
luisparravicini / anim.sh
Last active April 12, 2020 14:32
ffmpeg options added to make twitter accept the video
#!/bin/bash
#
# Takes a directory of macOS screemshots, label each file with
# a timestamp and creates a video with them.
#
dir=$1
@luisparravicini
luisparravicini / build_all.sh
Last active July 17, 2021 14:41
script for automated Unity project builds
#!/bin/bash
#
# This script creates builds for several platforms for a Unity project.
# It assumes this directory hierarchy:
# base_dir/
# UnityProjectName/
# dist/
# dist/files/
#
@luisparravicini
luisparravicini / itchio_config
Last active July 17, 2021 17:05
script to upload all the binaries for an itchio project
# The itch.io username
user=REPLACE_WITH_USERNAME
# The project name used for uploading
itchio_project=REPLACE_WITH_PROJECT_NAME
@luisparravicini
luisparravicini / GizmosExtensions.cs
Created August 1, 2020 11:23
Method to draw an arc with Unity's Gizmos
using UnityEngine;
public class GizmosExtensions
{
private GizmosExtensions() { }
/// <summary>
/// Draws a wire arc.
/// </summary>
/// <param name="position"></param>
@luisparravicini
luisparravicini / colors.rb
Last active December 11, 2020 17:01
small Ruby helper for colorizing output
module Colors
def self.fg_green(io=$stdout)
io.print "\x1b[0;32m"
end
def self.fg_white(io=$stdout)
io.print "\x1b[1;37m"
end
def self.fg_gray(io=$stdout)
@luisparravicini
luisparravicini / wordle_solver.js
Last active January 14, 2022 10:26
Simple wordle solver
'use strict';
//
// This script is a simple "assistant" to play wordle.
// It gives you an initial word to enter and then calling a function after each word it will filter the word list
// using the information given by wordle on absent/present/correct letters to narrow down the list.
//
// It doesn't try to help you find the word in the least amount of tries nor anything else. It just filter the possible
// words with the guesses information available at the moment, it just works.
//