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
## 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 |
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
{ | |
"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 <[email protected]>", | |
"email": "", | |
"url": "https://nimiq.com" |
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
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. |
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
interface ProcessByBatchesOptions { | |
/** | |
* The number of items to process in parallel. | |
* @default 10 | |
*/ | |
batchSize?: number | |
} | |
async function processByBatches<ItemType, ResultType>( | |
items: ItemType[], |
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 data from "./YOUR_JSON.json" assert { type: "json" }; | |
const apiEndpoint = 'https://{SUPABASE_REF}.supabase.co/rest/v1/rpc/upsert_location_with_gmaps_api'; | |
const apiKey = 'API_KEY'; | |
const authorizationBearer = 'YOU AUTH'; | |
const makeRequest = async (data: any[]) => { | |
const headers = new Headers(); | |
headers.append('Content-Type', 'application/json'); | |
headers.append('apikey', apiKey); | |
headers.append('Authorization', `Bearer ${authorizationBearer}`); |
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
CREATE OR REPLACE FUNCTION public.get_establishment_by_uuid(uuid UUID) | |
RETURNS JSONB AS | |
$$ | |
DECLARE | |
result JSONB; | |
BEGIN | |
SELECT | |
json_build_object( | |
'uuid', e.uuid, | |
'name', e.name, |
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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity ^0.8.0; | |
import "@uniswap/swap-router-contracts/contracts/interfaces/IV3SwapRouter.sol"; | |
import "./interfaces/IERC20Meta.sol"; | |
import "./interfaces/IWrappedChainToken.sol"; | |
import "./BaseCombinedGsnHandler.sol"; | |
abstract contract BaseERC20MetaHandler is BaseCombinedGsnHandler { |
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 { defineConfig, toEscapedSelector: e } from 'unocss' | |
// See it in action: | |
// https://unocss.antfu.me/?html=DwVwNgBAdgLgFgWgEwC4YFMAeMECMwjrTwIDMKuA5ngUZQE4CWAJhAywgMYD2YAzmQgAHMAENO6BIwwBbARNjp6ERH07106KACgIetqKEJMCACwA%2BXRGBhG5gJKyIARmAB6W5b027j9DIgkd08rHwcnUmC7bXdwcyA&config=JYWwDg9gTgLgBAbzgEwKYDNgDtUGEJaYDmANHDBAKIDOAxgIZirIDKqANqrRVAFxyo4AXzjooEEHADkAVywRa1alIBQK1AA9IsFBnoz28NJhz5CwIgAoEKuHCgHU1fgG1bduC4D0APSwwACwAdAFpLIOQAagBKIN5LADoAKmiAEi8yemoATyxaOEsXMmQyKABdMgQoegB3Nk5uaDJaAmoYB25cFhYyIlQcap4haLgAXgA%2BRDh3DzgWrDb7RzG4WvpgeEs%2BgfoeBLB6KGpUABUIAGt%2Byyho6JmPKFQYGSgsOAADVIRUa9r6rh40REkySvH8ARCtACwHYyEsX2QwymXwcnBcAAYyi4AExlERCd73IQVdxlFTDIA&options=N4IgzgLgTglgxhEAuaBXApgXyA | |
export default defineConfig({ | |
rules: [ | |
[/^nth\-(\d+)\:(.*)$/, async ([, d, r], {rawSelector, constructCSS, generator}) => { | |
const rule = await (generator.parseToken(r)) | |
return `${e(rawSelector)} > *:nth-child(${d}) { ${rule[0][2]} }` |
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
// https://stackoverflow.com/a/15030117/8312883 | |
function flatten(arr) { | |
return arr.reduce(function (flat, toFlatten) { | |
return flat.concat(Array.isArray(toFlatten) ? flatten(toFlatten) : toFlatten); | |
}, []); | |
} |
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
<!-- See https://play.tailwindcss.com/PGizn94M2s --> | |
<div class="min-h-screen bg-gray-50 py-6 flex flex-col justify-center relative overflow-hidden sm:py-12"> | |
<div class="absolute inset-0 bg-[url(/img/grid.svg)] bg-center [mask-image:linear-gradient(180deg,white,rgba(255,255,255,0))]"></div> | |
<div class="relative px-6 pt-10 pb-8 bg-white shadow-xl ring-1 ring-gray-900/5 sm:max-w-5xl sm:mx-auto sm:rounded-lg sm:px-10"> | |
<div class="max-w-4xl mx-auto"> | |
<div class="divide-y divide-gray-300/50"> | |
<div class="py-8 text-base leading-7 text-gray-600"> | |
<p> | |
An amazing Tooltip | |
<span class="group hover:underline cursor-pointer inline-block relative"> |
NewerOlder