tsconfig.json This prevents typehints for big types from showing ... N more ...
{
"compilerOptions": {
"noErrorTruncation": true,
}
}
const arr = [1, 2, 3, 4, 5, 6]; // -> [[1,2],[3,4],[5,6]] | |
arr.reduce((acc, cur, i) => { | |
const pos = ~~(i / 2); | |
acc[pos] = acc[pos] ?? []; | |
if (i % 2 === 0) acc[pos].push(cur); | |
else acc[pos].unshift(cur); | |
return acc; |
# Adjust the following variables as necessary | |
REMOTE=origin | |
BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
BATCH_SIZE=250 | |
# check if the branch exists on the remote | |
if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then | |
# if so, only push the commits that are not on the remote already | |
range=$REMOTE/$BRANCH..HEAD | |
else |
const { Connection, PublicKey } = require('@solana/web3.js'); | |
const { getMint } = require('@solana/spl-token'); | |
async function checkTokenFreezable(tokenAddress) { | |
// Connect to Solana mainnet | |
const connection = new Connection('https://api.mainnet-beta.solana.com'); | |
try { | |
// Create PublicKey from the token address | |
const mintPubkey = new PublicKey(tokenAddress); |
tsconfig.json This prevents typehints for big types from showing ... N more ...
{
"compilerOptions": {
"noErrorTruncation": true,
}
}
imagick cli
convert favicon.ico -define icon:auto-resize=64,48,32,16 compressed_favicon.ico
Portable Version KEYS: | |
P6Z3T-UYJC9-YAK3F-APN9M-6ZDSD | |
FGZPK-93CWX-Q33Y6-D5URV-YXC3X | |
9CZQX-9YAQA-PF33L-XVUQH-NSD48 | |
8RZ3L-H3Y5L-W2RY5-Z5M8N-C7Z2U | |
CCZNU-LW3LF-K9V2T-MYZFF-94667 | |
EWZM6-3W4UX-KH922-C96GK-VGBH2 | |
Standard Version KEYS: | |
4AZNW-S2YHE-LLMWM-J6EL8-7QKDL |
#!/bin/bash | |
# Removes old revisions of snaps | |
# CLOSE ALL SNAPS BEFORE RUNNING THIS | |
set -eu | |
LANG=C snap list --all | awk '/disabled/{print $1, $3}' | | |
while read snapname revision; do | |
snap remove "$snapname" --revision="$revision" | |
done |
/** | |
* Creates a read/writable property which returns a function set for write/set (assignment) | |
* and read/get access on a variable | |
* | |
* @param {Any} value initial value of the property | |
*/ | |
function createProperty(value) { | |
var _value = value; | |
/** |
/** | |
* If you have a website source bundled with webpack and are lucky to have a sourcemap nearby, | |
* then you are able to fully reconstruct original code + folders structure. | |
* Place this file at the root of project. | |
* Provide the path to sourcemap + the path to where you'd like to extract original codebase. | |
*/ | |
const fs = require('fs'); | |
const path = require('path'); | |
const sourceMap = require('source-map'); |