This file contains hidden or 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
| # Transposition Cipher with given key and inverse key | |
| def group_text(text, size=6, pad_char='X'): | |
| """Group text into fixed-size blocks, padding the last block if needed.""" | |
| text = text.replace(" ", "").upper() | |
| groups = [text[i:i + size] for i in range(0, len(text), size)] | |
| if len(groups[-1]) < size: | |
| groups[-1] = groups[-1].ljust(size, pad_char) | |
| return groups |
This file contains hidden or 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
| pkgname=cloudflare-warp-nox-bin | |
| pkgver=2025.6.1335 | |
| pkgrel=1 | |
| pkgdesc="Cloudflare Warp Client (for servers without graphical environment) — CLI binaries renamed to avoid conflicts" | |
| arch=('x86_64') | |
| url="https://1.1.1.1" | |
| license=('unknown') | |
| depends=('dbus' 'gcc-libs' 'glibc' 'nftables' 'nspr' 'nss') | |
| # IMPORTANT: do NOT 'provide' warp-cli/warp-svc to avoid virtual-name conflicts | |
| provides=('cloudflare-warp-nox-bin') |
This file contains hidden or 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
| #!/bin/bash | |
| readonly HASH="%C(always,yellow)%h%C(always,reset)" | |
| readonly RELATIVE_TIME="%C(always,green)%ar%C(always,reset)" | |
| readonly AUTHOR="%C(always,bold blue)%an%C(always,reset)" | |
| readonly REFS="%C(always,red)%d%C(always,reset)" | |
| readonly SUBJECT="%s" | |
| readonly FORMAT="$HASH $RELATIVE_TIME{$AUTHOR{$REFS $SUBJECT" | |
| readonly FORMAT_WITHOUT_AUTHOR="{$REFS $SUBJECT" |
This file contains hidden or 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
| #!/bin/bash | |
| GRAAL_FLAGS="-XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler -XX:+UseG1GC" | |
| MEMORY_FLAGS="-Xms4G -Xmx8G -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32m" | |
| PERFORMANCE_FLAGS="-XX:+UseStringDeduplication -XX:+OptimizeStringConcat -XX:+UseFastUnorderedTimeStamps" | |
| COMPILER_FLAGS="-XX:+TieredCompilation -XX:TieredStopAtLevel=4 -XX:CompileThreshold=1000" | |
| SYSTEM_FLAGS="-Dsun.java2d.opengl=true -Djava.awt.headless=false -Dfile.encoding=UTF-8" | |
| LATENCY_FLAGS="-XX:+UseTransparentHugePages -XX:+UseLargePages -XX:LargePageSizeInBytes=2m" | |
| JAVA_OPTS="$GRAAL_FLAGS $MEMORY_FLAGS $PERFORMANCE_FLAGS $COMPILER_FLAGS $SYSTEM_FLAGS $LATENCY_FLAGS --enable-native-access=ALL-UNNAMED" |
This file contains hidden or 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
| import { type Command, InvalidArgumentError } from "commander"; | |
| import z from "zod"; | |
| export function registerOptions<T extends z.ZodRawShape>(cmd: Command, schema: z.ZodObject<T>): void { | |
| const shape = schema.shape; | |
| const toKebab = (s: string) => | |
| s | |
| .replace(/GitHub/g, "Github") // Handle "GitHub" as a special case first | |
| .replace(/([a-z])([A-Z])/g, "$1-$2") // Insert dash between lowercase and uppercase |
This file contains hidden or 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
| `$fn` where { | |
| $fn <: `try { $body } catch($err) { $catchBody }`, | |
| register_diagnostic( | |
| span = $fn, | |
| message = "Try-catch blocks are disallowed. Consult project guidelines for the expected error handling approach." | |
| ) | |
| } |
This file contains hidden or 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
| ARG POSTGRESQL_MAJOR=17 | |
| ARG PGX_ULID_RELEASE=0.2.0 | |
| ARG TARGETARCH=amd64 | |
| FROM ghcr.io/craigpastro/pg_uuidv7:main AS base | |
| ARG POSTGRESQL_MAJOR | |
| ARG PGX_ULID_RELEASE | |
| ARG TARGETARCH | |
| RUN case "${TARGETARCH}" in amd64|arm64) : ;; *) echo "Unsupported TARGETARCH: ${TARGETARCH}" >&2; exit 1 ;; esac |
Key Takeaway: JS/TS is ALWAYS Pass-by-Value. The "value" being passed is either a primitive directly, or a reference (a pointer) to an object.
- Types:
number,string,boolean,bigint,symbol,null,undefined - What's Passed: An exact copy of the value itself.
- Behavior:
- When you pass a primitive to a function, the function gets its own, independent copy.
This file contains hidden or 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
| "use client"; | |
| import React from "react"; | |
| import { Button } from "#/components/ui/button"; | |
| import { Checkbox } from "#/components/ui/checkbox"; | |
| import { | |
| Command, | |
| CommandEmpty, | |
| CommandGroup, | |
| CommandInput, |
NewerOlder