load up some urls into urls.txt
http://google.com/api/endpoint/1
http://google.com/api/other-endpoint/2
Run shell command:
import { v4 as uuid } from 'uuid'; | |
export function generateId() { | |
return uuid(); | |
} | |
const v4 = new RegExp(/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i); | |
console.log(generateId().match(v4)); | |
//console.log(generateId().length) |
require('dotenv').config() | |
const http = require('http') | |
const express = require('express') | |
const app = express() | |
// Routes | |
app.get('/', function (req, res, next) { | |
console.log('got request') | |
setTimeout(function timeoutDone () { |
#! /usr/bin/env node | |
const http = require('http') | |
process.stdin.setRawMode(true) | |
process.stdin.resume() | |
process.stdin.setEncoding('utf8') | |
const server = http.createServer((req, res) => { | |
res.statusCode = 200 | |
res.setHeader('Content-Type', 'text/html') | |
res.write('<html>') |
tailscale status --self=false | tr -s ' ' '\t' | cut -f1-2 |
#!/usr/local/bin/bash | |
# convert should be from ImageMagick 7+ | |
# e.g. $ cat input.jpg | ./opentx-model-image-convert.sh > output.bmp | |
convert - \ | |
-resize 64x32 \ | |
-gravity center \ | |
-extent 64x32 \ | |
-colorspace gray \ |
Tips for using PCD: https://github.com/kvannotten/pcd
... I also wanted [range downloads], but then I first used the seq and parallel programs. It's a very unix-y solution, but it turns out ids being integers is great. You may need to install and play with seq and parallel a bit, but this works for me:
episode downloads (echo must be removed for real downloading):
$ seq 4 10 |parallel echo pcd download mypodcast {}
pcd download mypodcast 4
pcd download mypodcast 5
pcd download mypodcast 6
unlet! skip_defaults_vim | |
if (filereadable($VIMRUNTIME .'/defaults.vim')) | |
source $VIMRUNTIME/defaults.vim | |
elseif (filereadable($VIMRUNTIME .'/vimrc_example.vim')) | |
source $VIMRUNTIME/vimrc_example.vim | |
endif | |
set noswapfile nobackup nojoinspaces gdefault ignorecase wildignorecase showcmd | |
set tabstop=4 expandtab softtabstop=2 shiftwidth=2 | |
set undodir=~/.vim/undo clipboard=unnamed |
# | |
# dump | |
# version | |
# Betaflight / STM32F7X2 (S7X2) 4.1.0 Aug 9 2019 / 11:41:22 (41a0b5938) MSP API: 1.42 | |
# start the command batch | |
batch start |