Skip to content

Instantly share code, notes, and snippets.

@BenQoder
BenQoder / PostsScreen.js
Last active April 25, 2023 14:57
Implementing Infinite Scroll With Redux Toolkit Query
import { View, FlatList } from "react-native";
import React, { useEffect, useRef } from "react";
import postsApi, {
postsAdapters,
postsSelectors,
useLazyFetchPostsQuery
} from "../../state/apis/postsApi";
export default function PostsScreen() {
const currentPage = useRef(1);
@Neurognostic
Neurognostic / create-uefi-unified-image.sh
Last active February 24, 2026 04:06
Dracut UEFI Unified Kernel Image with Secure Boot Signing
esp=/efi
distro=archlinux
mkdir -p $esp/EFI/$distro
# Generate UEFI Unified Image
dracut --force --verbose --kver $(uname -r) $esp/EFI/$distro/linux+initramfs.efi.signed
# Create UEFI boot manager entry
efibootmgr --quiet --create --disk /dev/disk/by-label/EFI --label 'Arch Linux' --loader /EFI/$distro/linux+initramfs.efi.signed
@cellularmitosis
cellularmitosis / README.md
Last active July 20, 2025 10:25
Matching a string literal using regex

Blog 2019/9/1

<- previous | index | next ->

Matching a string literal using regex

updated 2025/4/9 to add a Python demo

@tuxPT
tuxPT / sway-config
Last active January 3, 2026 14:03
sway config
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
exec wal -R
#notifications
exec mako
exec mailnag
@fnky
fnky / ANSI.md
Last active May 13, 2026 20:44
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@sebfisch
sebfisch / gist:2235780
Created March 29, 2012 10:47
Laymans explanation of delimited continuations with examples of using them for exception handling and nondeterministic programming.

Delimited Continuations

Delimited continuations manipulate the control flow of programs. Similar to control structures like conditionals or loops they allow to deviate from a sequential flow of control.

We use exception handling as another example for control flow manipulation and later show how to implement it using delimited continuations. Finally, we show that nondeterminism can also be expressed using delimited continuations.

Exception Handling