Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
branch=$(git rev-parse --abbrev-ref HEAD)
# echo "Enter the first commit hash:"
# read commit1
# echo "Enter the second commit hash:"
# read commit2
@icai
icai / CuSwitch.kt
Last active May 22, 2024 15:16
CuSwitch.kt
@Composable
private fun CuSwitch(
modifier: Modifier = Modifier,
checked: MutableState<Boolean> = remember { mutableStateOf(false) },
onCheckedChange: (Boolean) -> Unit = {}
) {
val width = 34.dp
val height = 19.dp
val gapBetweenThumbAndTrackEdge = 2.dp
@icai
icai / gist:6e97609099c0d4aef38b82b79d9357d3
Created December 17, 2024 12:17
mysql9 mysql_native_password fix without backup
mysql9 mysql_native_password fix
code /usr/local/etc/my.cnf
```ini
[mysqld]
skip-grant-tables
```
@icai
icai / codeview.vue
Created January 26, 2025 03:06
simple code editor, only for view
<template>
<div class="code-editor" :style="{ width, height }">
<div class="line-numbers" ref="lineNumbersRef">
<span v-for="line in lineCount" :key="line">{{ line }}</span>
</div>
<pre
ref="editableCodeRef"
contenteditable="true"
@input="handleInput"
@scroll="syncScroll"