Skip to content

Instantly share code, notes, and snippets.

2 1
3 2
4 4
5 6
6 8
7 14
8 18
9 27
10 36
11 52
//note: requires minimist (npm i minimist)
'use strict';
const {accessSync, mkdirSync, unlinkSync, readFileSync, writeFileSync, F_OK} = require('fs'),
name = 'hpm',
{join} = require('path'),
homeDir = require('os').homedir(),
dir = join(homeDir, '.' + name),
path = join(homeDir, '.hyper.js'),
#!/usr/bin/python3
import http.server
N=25001
numbers = ["()" * i for i in range(N)]
def tryi(n, s):
if n < N and len(numbers[n]) > len(s):
numbers[n] = s
Enter numeric array: [1,2,[],[3,4,5]]
Array
├1
├2
├Array
└Array
├3
├4
└5
@somebody1234
somebody1234 / encodeInput.js
Last active October 24, 2016 08:07
TIO modified snippet
function encodeInput(encoding) {
var input = document.getElementById("input");
return input ? "&input=" + encoding(input.value) : "";
}
@somebody1234
somebody1234 / code.js
Last active August 28, 2016 01:33
TNB missing XKCDs
a=[];i=1;handle=setInterval(_=>{$.get(`/search?q=xkcd.com&Room=240&page=${i++}&pagesize=100&sort=newest`,data=>data.match(/xkcd.com\/\d+/g).map(s=>a.push(+/\d+$/.exec(s)[0])));if(i===12){clearInterval(handle);b=[];for(j=1;j<1726;j++)if(!a.includes(j))b.push(j);}},3000)