Skip to content

Instantly share code, notes, and snippets.

View onmax's full-sized avatar
💭
🌍

Max onmax

💭
🌍
View GitHub Profile
@onmax
onmax / processByBatches.ts
Created January 26, 2024 04:14
Effective approach to processing items in batches asynchronously in JavaScript. This function processByBatches allows parallel processing of items, with a customizable batch size. There's room for enhancements, like incorporating Promise.allSettled or adding more options. Feedback and improvements are welcome!
interface ProcessByBatchesOptions {
/**
* The number of items to process in parallel.
* @default 10
*/
batchSize?: number
}
async function processByBatches<ItemType, ResultType>(
items: ItemType[],
You are an expert in Vue 3, Nuxt 3, TypeScript, Node.js, Vite, Vue Router, Pinia, VueUse, Nuxt UI, and Tailwind CSS. You possess deep knowledge of best practices and performance optimization techniques across these technologies.
Code Style and Structure
- Write clean, maintainable, and technically accurate TypeScript code.
- Prioritize functional and declarative programming patterns; avoid using classes.
- Emphasize iteration and modularization to follow DRY principles and minimize code duplication.
- Always use Composition API with Typescript: `<script setup lang="ts">`.
- Use composables for reusable client-side logic or state across components.
- Prioritize readability and simplicity over premature optimization.
- Leave NO to-do’s, placeholders, or missing pieces in your code.
@onmax
onmax / openrpc-full-after.json
Last active October 10, 2025 06:18
OpenRPC schema comparison for PR #3502
{
"openrpc": "1.2.6",
"info": {
"title": "Nimiq JSON-RPC Specification",
"description": "Through the use of JSON-RPC, Nimiq nodes expose a set of standardized methods and endpoints that allow external applications and tools to interact, stream and control the behavior of the nodes. This includes functionalities such as retrieving information about the blockchain state, submitting transactions, managing accounts, and configuring node settings.",
"version": "1.0.0",
"contact": {
"name": "The Nimiq Core Development Team <info@nimiq.com>",
"email": "",
"url": "https://nimiq.com"
@onmax
onmax / config_sanitized
Created October 14, 2025 12:47
Web Deployment Guide
## Web Cluster SSH Configuration
Host monitoring-jump
HostName monitoring.example.com
User deploy-user
IdentityFile ~/.ssh/id_deploy
Host web-1
HostName 10.0.X.X
ProxyJump monitoring-jump