Get single cached response
(async (cid, rid) => {
const cacheKeys = await caches.keys();
const cacheName = cacheKeys[cid];
const cache = await caches.open(cacheName);
const keys = await cache.keys();
const key = keys[rid];
Get single cached response
(async (cid, rid) => {
const cacheKeys = await caches.keys();
const cacheName = cacheKeys[cid];
const cache = await caches.open(cacheName);
const keys = await cache.keys();
const key = keys[rid];
#!/usr/env/bash | |
rgb() | |
{ | |
# takes three values for red, green and blue ranging from | |
# 0-5 each and prints the corresponding color escape sequence | |
# (formula from http://stackoverflow.com/a/27165165) | |
local r="${1:-"0"}" | |
local g="${2:-"0"}" | |
local b="${3:-"0"}" |
#!/usr/bin/env bash | |
# Creates OpenVPN client certificates and outputs ovpn file contents | |
# Typical usage would be to redirect stdout to a *.ovpn file: | |
# ./create-ovpn-client-certs client1 > ServerName.ovpn | |
# Edit these paths to match your openvpn/easy-rsa configuration | |
EASY_RSA_PATH=/etc/openvpn/easy-rsa | |
KEY_DIR=$EASY_RSA_PATH/keys | |
CA_CERT_PATH=/etc/openvpn/ca.crt |