Skip to content

Instantly share code, notes, and snippets.

View KurtGokhan's full-sized avatar
🏠
Working from home

Gökhan Kurt KurtGokhan

🏠
Working from home
View GitHub Profile
@KurtGokhan
KurtGokhan / squash_branch.sh
Last active December 20, 2023 04:38
Squash a git branch without rebasing
#!/bin/sh
squash_branch() {
# Usage: squash_branch [branch_name]
# This is an implementation of Option 1 here: https://blog.oddbit.com/post/2019-06-17-avoid-rebase-hell-squashing-wi/
# WARNING: This function will delete the target branch and replace it with a squashed version of itself
BASE_BRANCH="master"
if [ -z "$1" ]; then
@KurtGokhan
KurtGokhan / use-combined-refs-new.ts
Last active December 16, 2024 08:25
useCombinedRefs - Old and new
/**
* A combined ref implementation using the callback ref cleanups feature.
* This will work in React 19.
*/
import { Ref, useCallback } from 'react';
type OptionalRef<T> = Ref<T> | undefined;
type Cleanup = (() => void) | undefined | void;
@KurtGokhan
KurtGokhan / ReactUnityTestBadge.svg
Last active December 21, 2024 20:06
ReactUnity Test Badge
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
🗣 Commented on #115 in ReactUnity/core
🗣 Commented on #114 in ReactUnity/core
❗️ Closed issue #114 in ReactUnity/core
🗣 Commented on #111 in ReactUnity/core
🗣 Commented on #111 in ReactUnity/core