Skip to content

Instantly share code, notes, and snippets.

View Theby's full-sized avatar

Esteban Gaete Flores Theby

View GitHub Profile
@Theby
Theby / .zshrc
Last active September 23, 2025 19:36
zshrc aliases for git and tig
MAIN_BRANCH="main"
alias restart="exec zsh -l"
alias ts="tig status"
alias gs="git status"
alias gpom="git push origin $MAIN_BRANCH"
alias gcm="git checkout $MAIN_BRANCH"
alias m="git checkout $MAIN_BRANCH"
alias gf="git fetch --all -P"
alias grom="git rebase origin/$MAIN_BRANCH"
alias groq="git rebase origin/qa"
@Theby
Theby / TaskAsyncExtensions.cs
Created December 21, 2025 20:17
Handy extension class to use TaskCompletionSource on demand
public static class TaskAsyncExtensions
{
public static Task<T> MakeAsync<T>(Action<Action<T>> syncAction)
{
var taskCompletion = new TaskCompletionSource<T>(TaskCreationOptions.RunContinuationsAsynchronously);
syncAction.Invoke(taskCompletion.SetResult);
return taskCompletion.Task;
}