Skip to content

Instantly share code, notes, and snippets.

@lmtapia
lmtapia / HaskellCabalNotes.md
Created April 21, 2024 21:35
Haskell Cabal Notes

Personal notes about cabal usage

Author: lmtapia

  • Use a local store (RECOMMNDED PRACTICE replacing deprecated sandboxes)
cabal --store-dir=$(pwd) <COMMAND>

@lmtapia
lmtapia / !GitUnity.md
Last active September 5, 2023 18:47
Git for Unity

Git for Unity

Initial configuration for Unity projects in order to save space using git and a repository server like github (recomemneded) or gitlab, it takes in consideration big files, avoids duplication, uses Meld and UnityYAMLMerge for merging YAML files.

Migration recomendations for projects that didn't started this way are included bellow in Migrate to Git LFS and are also recomemnded for any project to include every new big file not listed before.

If history is to be rewritten, it must be done with caution. Consider Rewriting history steps.

1. Configuration files

@lmtapia
lmtapia / java-update-alternatives.bat
Last active June 22, 2023 07:59
Windows Java update-altenatives
@echo off
REM Script for change java version like update-altenative in linux
REM Author: Luis Tapia (https://github.com/lmtapia)
REM NOTE: This only modifies enviroment variable JAVA_HOME and does not store anything more
setlocal EnableDelayedExpansion
if "%JAVA_HOME%" neq "" echo Existing enviroment path JAVA_HOME= %JAVA_HOME%
echo Listing reachable sources:
set i=1
@lmtapia
lmtapia / .bash_aliases
Last active April 2, 2023 05:29
Bash with git-prompt extra settings
# TapiaX
# .bash_aliases
# my aliases
alias json='python3 -m json.tool'
alias hg='history | grep'
alias inst='sudo apt install'
alias instf='sudo apt-get install'
alias ev2lines="paste -d ' ' - - "
alias sortlast="awk '{print $NF,$0}' | sort -nr | cut -f2- -d' '"
@lmtapia
lmtapia / SceneLoader.cs
Last active August 15, 2023 02:45 — forked from tomlarkworthy/MySceneBehaviour.cs
Parametric scene loader and history of scenes. Real use of the Stateless Scene pattern (see https://corepox.net/devlog/unity-pattern:-stateless-scenes). Created in reply to this question (https://forum.unity.com/threads/how-to-program-the-back-button-of-android-phone-through-unity.82311/) based on the code provided by JoeriVDE (https://forum.uni…
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using System.Collections.Generic;
public class SceneLoader: MonoBehaviour {
private static SceneParams loadSceneRegister = null;
public SceneParams sceneParams;