Navigates? | declarative? | Makes GET, triggers loader | Makes POST, triggers action | No requests |
---|---|---|---|---|
navigates | declarative | <Link to=""> <Form method="get"> |
<Form method="post"> |
<Link to="#..."> |
navigates | imperative | navigate() setSearchParams() |
submit() |
navigate("#") |
stays | declarative | <fetcher.Form method="get"> |
<fetcher.Form method="post"> |
(doesn't make sense) |
s |
This file contains 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/awk -f | |
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff | |
# My copy here is written in awk instead of C, has no compelling benefit. | |
# Public domain. @thingskatedid | |
# Run as awk -v x=xyz ... or env variables for stuff? | |
# Assumptions: the data is evenly spaced along the x-axis | |
# TODO: moving average |
This file contains 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
" set the runtime path to include vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
" Specify a directory for plugins | |
" - For Neovim: stdpath('data') . '/plugged' | |
" - Avoid using standard Vim directory names like 'plugin' | |
call plug#begin('~/.vim/plugged') | |
" Colors | |
Plug 'flazz/vim-colorschemes' | |
" Autocomplete |
console.log(Joi.validate('2015-02-21T00:52:43.822Z', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00:52:43.822', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00:52:43Z', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00:52:43', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00:52Z', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00:52', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00Z', Joi.date().iso())); // "value" must be a valid ISO 8601 date
This file contains 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 | |
path = require("path"), | |
fs = require("fs"); | |
/** | |
* List all files in a directory recursively in a synchronous fashion | |
* | |
* @param {String} dir |
This file contains 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
// for multiple requests | |
let isRefreshing = false; | |
let failedQueue = []; | |
const processQueue = (error, token = null) => { | |
failedQueue.forEach(prom => { | |
if (error) { | |
prom.reject(error); | |
} else { | |
prom.resolve(token); |
This file contains 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
import { curry, apply } from 'ramda'; | |
/** | |
* Debounce | |
* | |
* @param {Boolean} immediate If true run `fn` at the start of the timeout | |
* @param timeMs {Number} Debounce timeout | |
* @param fn {Function} Function to debounce | |
* | |
* @return {Number} timeout |
Localstack comes with a docker-compose file that won't quite work when you're running the (linux) container in docker for Windows.
Two changes need to be made:
We can just comment that line out:
NewerOlder