How it works:
- On app deploy, autoincrement Cloudflare KV value
- Cloudflare Worker adds a "version" cookie to every Response with the content from the KV
- Client checks cookies periodically to see if the "version" cookie has changed. If so, reload page
| const addrs = require('email-addresses') | |
| const RFC2821 = require('address-rfc2821') | |
| const formBody = require('body/form') | |
| const multiparty = require('multiparty') | |
| const pify = require('pify') | |
| const send = require('@polka/send-type') | |
| /* global apiKey domain read send_email */ | |
| const mailgun = require('mailgun-js')({ |
How it works:
| export async function api(method, path = '', { body = {}, headers = {} } = {}) { | |
| /* global ORIGIN */ | |
| let opts = { method, headers } | |
| if(method == 'POST') { | |
| opts.body = JSON.stringify(body) | |
| } | |
| let res = await fetch((process.browser ? '' : ORIGIN) + '/api/'+path, opts) | |
| res.text = await res.text() | |
| try { | |
| res.json = JSON.parse(res.text) |
| <# | |
| The command to run, built from the raw link of this gist | |
| Win+R | |
| iexplore http://boxstarter.org/package/url?<RAW GIST LINK> | |
| OR (if you don't like the way the web launcher force re-installs everything) |
| # place in ~/.config/htop/htoprc | |
| # Beware! This file is rewritten by htop when settings are changed in the interface. | |
| # The parser is also very primitive, and not human-friendly. | |
| fields=0 48 17 18 38 39 40 2 46 47 49 1 | |
| sort_key=46 | |
| sort_direction=1 | |
| hide_threads=0 | |
| hide_kernel_threads=0 | |
| hide_userland_threads=0 | |
| shadow_other_users=0 |
| javascript:%22use%20strict%22;(function(){function%20e(e){var%20t=document.createElement(%22textarea%22);return%20t.innerHTML=e,t.value}var%20t=document.body.innerText.match(/%3Citem%3E[\s\S]*%3F%3C\/item%3E/g).reverse().reduce(function(t,c,n){var%20l=(%2200%22+(n+1)).slice(-3),a=e(c.match(/%3Ctitle%3E(%3F:[^%3C]+)%3F%3C\/title%3E/g).pop().slice(7,-8)),o=c.match(/%3Cenclosure%20url=%22([^%22]+)%22/).pop().replace(%22%26amp;%22,%22%26%22),i=new%20Date(c.match(/%3CpubDate%3E([^%3C]+)%3C\/pubDate%3E/g).pop().slice(9,-10)).toISOString().split(%22T%22)[0],r=l+%22_%22+i+%22_%22+a;return%20t+='%3Cdiv%3E%3Cinput%20type=%22checkbox%22%20checked%3E%26nbsp;%26nbsp;%3Ca%20href=%22'+o+'%22%20download=%22'+r+'.mp3%22%3E'+r+%22%3C/a%3E%3C/div%3E%22},%22%22),c=document.createElement(%22script%22);c.innerHTML='function%20setAll(bool)%20{Array.prototype.slice.call(document.getElementsByTagName(%22input%22)).forEach(e%20=%3E%20{e.checked%20=%20bool})}function%20clickAll()%20{Array.prototype.slice.call(document.getElementsByTagN |
| const { run } = require('runjs') | |
| /* DATA */ | |
| function build_twine_data_to_decisions_html() { | |
| run("node twine-parser/output-decisions-html-object.js") | |
| } | |
| function build_wordpress_data_to_svelte() { | |
| run("node wordpress-parser/xml-to-svelte.js") |