This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const MAX_CONCURRENCY = 2; | |
const useTaskQueue = () => { | |
const triggers = useRef<Function[]>([]); | |
const runningTasksRef = useRef(new Set<Function>()); | |
const dispatchTriggers = useCallback(() => { | |
const runningTaskSize = runningTasksRef.current.size; | |
if (runningTaskSize >= MAX_CONCURRENCY) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initialize `mise` with zplug example script | |
# https://mise.jdx.dev/ | |
if ! type "mise" > /dev/null; then | |
echo "mise is not installed. Installing mise..." | |
curl https://mise.run | sh | |
fi | |
eval "$(~/.local/bin/mise activate zsh)" | |
if ! mise which usage > /dev/null 2>&1; then | |
echo "mise usage is not installed. Installing usage with mise..." |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
ARGS='a b c d e' # replace this with your test file paths | |
GROUP_SIZE=2 | |
NTH_OF_GROUPS=2 | |
# outputs "c d" | |
echo "${ARGS}" | xargs -n "${GROUP_SIZE}" echo | sed -n "${NTH_OF_GROUPS}p" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* To get this shader working, Run picom like the following | |
picom --glx-fshader-win "$(cat ~/.config/picom/gs.glsl)" | |
NOTE: You need to set the backend to "glx" to get this working. | |
*/ | |
uniform float opacity; | |
uniform bool invert_color; | |
uniform sampler2D tex; | |
void main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#%PAM-1.0 | |
auth required pam_faillock.so preauth | |
# Optionally use requisite above if you do not want to prompt for the password | |
# on locked accounts. | |
# The following 2 lines enables you to login with both Yubikey and password | |
# Thanks: https://cromwell-intl.com/cybersecurity/yubikey/pam_u2f.html | |
auth sufficient pam_unix.so try_first_pass nullok | |
auth sufficient pam_u2f.so cue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ref: https://zenn.dev/kumamidori/articles/b6f79df64753bb | |
export CFLAGS="-Wno-error=implicit-function-declaration -DU_DEFINE_FALSE_AND_TRUE=1" | |
export CXXFLAGS="-Wno-error=implicit-function-declaration -DU_DEFINE_FALSE_AND_TRUE=1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# custom IntelliJ IDEA properties | |
# NOTE: specify the following property to use windows keys as meta keys. see https://youtrack.jetbrains.com/issue/IDEA-144702 | |
keymap.windows.as.meta=true |
NewerOlder