Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Search Gists
Sign in Sign up

Instantly share code, notes, and snippets.

Discover gists

@t3dotgg
t3dotgg /try-catch.ts
Last activeMarch 23, 2025 11:17
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
typeSuccess<T>={
data:T;
error:null;
};
typeFailure<E>={
data:null;
error:E;
};
@Fanman03
Fanman03 /UAP-Guide.md
Last activeMarch 23, 2025 11:16
UniFi AP Buyers Guide

(updated March 2025)

The APs in this list are ordered from highest to lowest performance. However, unless you have an insane amount of devices you likely do NOT need to buy the most expensive, highest performance AP. You can also check Ebay for deals, especially on older equipment. In terms of best price-to-performance, the U6 Pro/Mesh/InWall series is the sweet spot in my opinion and is the best choice for most deployments.

All APs in this list support both wired backhaul and mesh modes. However, wired connections are strongly recommended for better performance and reliability.

Number of spatial streams are listed in order of 2.4GHz, 5GHz, 6GHz.

Good Choices:

@rvrsh3ll
rvrsh3ll /windows-keys.md
CreatedFebruary 18, 2024 22:44
Windows Product Keys

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@endrsmar
endrsmar /index.ts
CreatedJanuary 9, 2024 12:11
Raydium new pool listener
import{LiquidityPoolKeysV4,MARKET_STATE_LAYOUT_V3,Market,TOKEN_PROGRAM_ID}from"@raydium-io/raydium-sdk";
import{Connection,Logs,ParsedInnerInstruction,ParsedInstruction,ParsedTransactionWithMeta,PartiallyDecodedInstruction,PublicKey}from"@solana/web3.js";
constRPC_ENDPOINT='https://api.mainnet-beta.solana.com';
constRAYDIUM_POOL_V4_PROGRAM_ID='675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8';
constSERUM_OPENBOOK_PROGRAM_ID='srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX';
constSOL_MINT='So11111111111111111111111111111111111111112';
constSOL_DECIMALS=9;
constconnection=newConnection(RPC_ENDPOINT);
@jakub-g
jakub-g /async-defer-module.md
Last activeMarch 23, 2025 11:13
async scripts, defer scripts, module scripts: explainer, comparison, and gotchas

With the addition of ES modules, there's now no fewer than 24 ways to load your JS code: (inline|not inline) x (defer|no defer) x (async|no async) x (type=text/javascript | type=module | nomodule) -- and each of them is subtly different.

This document is a comparison of various ways the<script> tags in HTML are processed depending on the attributes set.

If you ever wondered when to use inline<script async type="module"> and when<script nomodule defer src="...">, you're in the good place!

Note that this article is about<script>s inserted in the HTML; the behavior of<script>s inserted at runtime is slightly different - seeDeep dive into the murky waters of script loading by Jake Archibald (2013)

@CMCDragonkai
CMCDragonkai /makeWrapper_and_wrapProgram.md
CreatedAugust 24, 2018 07:50
makeWrapper and wrapProgram #nix

Nix generally assumes run-time dependencies is a subset of the build-time dependencies.

This means many Nix builder functions try to automatically scan the output for runtime dependencies and "rewrite" them for runtime usage.

However shell scripts which are often exported by packages do not get this automatic scanning treatment.

This means you have to use themakeWrapper package and use either themakeWrapper orwrapProgram utility functions.

@fbradyirl
fbradyirl /sigen_modbus_card.yaml
Last activeMarch 23, 2025 11:06
Recreate Sigenergy UI (using modbus sensors) as Home Assistant Card
type:custom:button-card
show_state:true
tap_action:none
custom_fields:
home_image:
card:
type:picture
image:local/Sigenergy/home_has_solar_has_car.png
card_mod:
style:|
@nd3w
nd3w /install-lapp-ubuntu-20.04.md
Last activeMarch 23, 2025 11:03
Install Apache2, PostgreSQL and PHP-FPM on Ubuntu 20.04

Install Apache

sudo apt install apache2sudo ufw app listsudo ufw allow in "Apache"
NewerOlder

[8]ページ先頭

©2009-2025 Movatter.jp