Skip to content

Instantly share code, notes, and snippets.

@acdibble
acdibble / getVersion.ts
Created January 15, 2022 22:26
get latest rust nightly with rls
const result = await fetch(
"https://raw.githubusercontent.com/rust-lang-nursery/rust-toolstate/master/history/linux.tsv",
);
const text = await result.text();
const iterator = text.trimEnd().split("\n")[Symbol.iterator]();
iterator.next();
for (const line of iterator) {
export class IPv4 {
static from(input: string) {
const [, a, b, c, d] = /(\d+)\.(\d+)\.(\d+)\.(\d+)/.exec(input)!;
const address = ((Number(a) << 24) | (Number(b) << 16) | ((Number(c) << 8) | Number(d))) >>> 0;
console.log(address.toString());
console.log(address.toString(2));
console.log(address.toString(16));
#!/usr/bin/env node
const fs = require('fs');
const { createInterface } = require('readline');
const rl = createInterface(process.stdin);
const tempFile = `${__dirname}/eslint-temp.txt`;
(async () => {
let file = '';
@acdibble
acdibble / tap+14.10.7.patch
Last active April 14, 2020 13:46
Patch file for node tap types
diff --git a/node_modules/tap/package.json b/node_modules/tap/package.json
index 0000000..2cb8e5e
--- a/node_modules/tap/package.json
+++ b/node_modules/tap/package.json
@@ -152,5 +152,6 @@
"test-ignore": "/(^|/)cli-tests-[0-9]+/",
"check-coverage": true
},
- "version": "14.10.7"
+ "version": "14.10.7",