This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function ask_gpt() { | |
PROMPT=$(gum input --width 80 --placeholder "prompt") | |
if [[ -z "$PROMPT" ]]; then | |
exit 0 | |
fi | |
gum style --foreground 212 "> $PROMPT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by "git commit" with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, rename this file to "pre-commit". | |
ASSETS_DIR="$(git config --get unity3d.assets-dir || echo "Assets")" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ASSETS_DIR="$(git config --get unity3d.assets-dir || echo "Assets")" | |
# Remove empty assets directory | |
find "$ASSETS_DIR" -depth -type d -empty -delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ASSETS_DIR="$(git config --get unity3d.assets-dir || echo "Assets")" | |
# Remove empty assets directory | |
find "$ASSETS_DIR" -depth -type d -empty -delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public static class Category { | |
public static T Identity<T>(T obj) { | |
return obj; | |
} | |
public static Func<T1, TFinal> Compose<T1, TResult, TFinal>(Func<TResult, TFinal> f, Func<T1, TResult> g) { | |
return (T1 t) => { | |
return f(g(t)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public class ApplicationException : Exception { | |
public ApplicationException(string message) : base(message) { } | |
} | |
public static class GameDebug { | |
public static void Assert(bool condition) { | |
if (!condition) | |
throw new ApplicationException("GAME ASSERT FAILED"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
/// <summary> | |
/// This class allows us to start Coroutines from non-Monobehaviour scripts | |
/// Create a GameObject it will use to launch the coroutine on | |
/// </summary> | |
public class CoroutineHandler : MonoBehaviour | |
{ | |
static protected CoroutineHandler m_Instance; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [<tag>] (If applied, this commit will...) <subject> (Max 72 char) | |
# |<---- Preferably using up to 50 chars --->|<------------------->| | |
# Example: | |
# [feat] Implement automated commit messages | |
# | |
# (Optional) Explain why this change is being made | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# | |
# (Optional) Provide links or keys to any relevant tickets, articles or other resources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
temp_file_that_contain_commit_message=$1 | |
commit_message=$(cat "$temp_file_that_contain_commit_message") | |
echo "$commit_message" | commitlint | |
commitlint_status=$? | |
if [ $commitlint_status -ne 0 ] ; then | |
echo "commit message should be in angular format" |