- GitHub Staff
- @[email protected]
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
console.log('3-4 bit:') | |
const lows = [] | |
for (let c = 30;c<=37;c++) { | |
lows.push(`\x1b[${c}m${c}\x1b[0m`) | |
} | |
console.log(lows.join(' ')) | |
console.log('256 color:') | |
let mediums = [] | |
for (let c = 0;c<=231;c++) { | |
if (!(c % 16)) { // new row |
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
#!/usr/bin/env node | |
const https = require('node:https') | |
const es = require('event-stream') | |
const JSONStream = require('JSONStream') | |
const main = async () => { | |
const r = [] | |
for (let i = 0; i < 10; i++) { | |
r.push(new Promise((resolve, reject) => { | |
if (process.argv[2] === 'stream') { |
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
const breads = [ | |
['toast','pieces of toast'], | |
['muffin','muffins'], | |
['teacake','teacakes'], | |
['bun','buns'], | |
['bap','baps'], | |
['baguette','baguettes'], | |
['bagel','bagels'], | |
['croissant','croissants'], | |
['crumpet','crumpets'], |
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
.radix 16 | |
org 100 | |
clockoff equ 000000xb | |
pad_init equ 001001xb | |
pad_clockon equ 010010xb | |
pad_power equ 100100xb | |
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
> pick = require('npm-pick-manifest') | |
[Function (anonymous)] | |
> packument | |
{ | |
name: 'some-package', | |
'dist-tags': { foo: '1.0.1' }, | |
versions: { | |
'1.0.0': { version: '1.0.0' }, | |
'1.0.1': { version: '1.0.1' }, | |
'1.0.2': { version: '1.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
console.log(require('./package.json')) |
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
#!/usr/bin/env node | |
const pkg = require('./package.json') | |
console.log(`Hi there! I am ${pkg.name} version ${pkg.version}`) |
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 strict' | |
const pacote = require('pacote') | |
const fetch = require('npm-registry-fetch') | |
const semver = require('semver') | |
const perRequest = 10 | |
async function main() { | |
const manifest = await pacote.manifest(process.argv[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
query { | |
search (query: "org:npm topic:npm-cli", type: REPOSITORY, first:100) { | |
nodes { | |
... on Repository { | |
nameWithOwner | |
pullRequests (labels: ["autorelease: pending"], first:100, states: [OPEN]) { | |
nodes { | |
number | |
url | |
title |
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://docs.github.com/en/graphql/overview/explorer |
NewerOlder