Skip to content

Instantly share code, notes, and snippets.

View shm-tar's full-sized avatar
🪲
Debugging

Taras Shmilyk shm-tar

🪲
Debugging
View GitHub Profile
@shm-tar
shm-tar / create-patch-diff.sh
Created July 11, 2023 10:31
Create patch from diff (Sourcetree)
#!/bin/bash
cd $1
CURRENTDATE=`date +"%d-%m-%Y_%H:%M"`
FILENAME="${CURRENTDATE}.patch"
/Applications/SourceTree.app/Contents/Resources/git_local/bin/git diff --cached --binary > "$FILENAME"
@shm-tar
shm-tar / ignore-local-changes.sh
Last active July 11, 2023 10:34
Ignore local changes (--skip-worktree) (Sourcetree)
# $REPO $FILE
#!/bin/bash
/Applications/SourceTree.app/Contents/Resources/git_local/bin/git update-index --skip-worktree "$1/$2"
@shm-tar
shm-tar / unignore-local-changes.sh
Created July 11, 2023 10:35
Unignore local changes (--no-skip-worktree) (Sourcetree)
# $REPO $FILE
#!/bin/bash
/Applications/SourceTree.app/Contents/Resources/git_local/bin/git update-index --no-skip-worktree "$1/$2"
@shm-tar
shm-tar / list-local-ignored-files.sh
Created July 11, 2023 10:37
List all locally ignored files (--skip-worktree) (Sourcetree)
# $REPO
#!/bin/bash
cd $1
/Applications/SourceTree.app/Contents/Resources/git_local/bin/git ls-files -v . | grep ^S
@shm-tar
shm-tar / UIRectCollider.cs
Last active February 23, 2025 14:33
UI Collider support for UI Particle System package (mob-sakai ParticleEffectForUGUI)
using System.Collections;
using Coffee.UIExtensions;
using UnityEngine;
public class UIRectCollider : MonoBehaviour
{
[SerializeField]
private UIParticle uiParticleSystem;
[SerializeField]
private RectTransform rectTransform;
@shm-tar
shm-tar / MaterialGradientAnimator.cs
Created March 14, 2025 20:20
Unity UI Image (HLSL shader) gradient transition animator
using DG.Tweening;
using UnityEngine;
using UnityEngine.UI;
public class MaterialGradientAnimator : MonoBehaviour
{
[SerializeField]
private Gradient previewGradient;
[SerializeField]
private Gradient targetGradient;
@shm-tar
shm-tar / CaretReset.cs
Created April 5, 2025 14:29
TextMeshPro InputField caret offset reset (after long input string)
[SerializeField]
private TMP_InputField phraseInputField; // reference to your TextMeshPro InputField
private RectTransform phraseInputFieldRect;
private TMP_SelectionCaret selectionCaret;
private void Start()
{
phraseInputFieldRect = phraseInputField.textComponent.GetComponent<RectTransform>();
selectionCaret = phraseInputField.GetComponentInChildren<TMP_SelectionCaret>();
}
@shm-tar
shm-tar / FloppyDrives.cpp
Created September 29, 2025 17:58
Moppy2 IDE Boot Up Floppy Seek startup sound (Arduino)
/*
* FloppyDrives.cpp
*
* Output for controlling floppy drives. The _original_ Moppy instrument!
*/
#include "MoppyInstrument.h"
#include "FloppyDrives.h"
namespace instruments {