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 March 13, 2024 10:03
useCombinedRefs - Old and new
/**
* A combined ref implementation using the callback ref cleanups feature.
* Note that this won't work yet as callback ref cleanups feature isn't released yet and thought to be released in React 19
*/
import { ForwardedRef, useCallback } from 'react';
type OptionalRef<T> = ForwardedRef<T> | undefined;
type Cleanup = (() => void) | undefined | void;
@KurtGokhan
KurtGokhan / ReactUnityTestBadge.svg
Last active April 9, 2024 21:14
ReactUnity Test Badge
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
🗣 Commented on #19972 in apache/echarts
🗣 Commented on #19972 in apache/echarts
💪 Opened PR #19973 in apache/echarts
❗️ Opened issue #19972 in apache/echarts
🗣 Commented on #2 in KurtGokhan/tsschema
@KurtGokhan
KurtGokhan / README.md
Last active August 26, 2021 21:17
ekşisözlük entry silme script'i

ekşisözlük entry silme script'i

kullanım

  • profil sayfana git (https://eksisozluk.com/biri/...)
  • chrome konsolunu aç (f12)
  • script.js içindeki kodu konsolda çalıştırınca entrylerin silinmeye başlayacaktır
  • entry sayına göre bu işlem saatler sürebilir (dakikada 2 entry silinebiliyor sanırım)
  • sayfayı kapatırsan silme işlemi durur
  • program takılırsa sayfayı yenileyip işlemleri tekrarla