NOTE: I want disclaimer that this work is not complete mine. Most of the work here is comming from: https://dhwaneetbhatt.com/blog/run-docker-without-docker-desktop-on-macos
$ brew doctor
$ brew update| /** | |
| * Worker Name: WPCSPC - Device based Cache | |
| * Description: This worker is responsible for caching the requests based on the device type | |
| * Based on Default Worker Version: 2.8.0 | |
| * Version: 2.1.0 | |
| * @link: https://wordpress.org/plugins/wp-cloudflare-page-cache/ | |
| * @link: https://wordpress.org/support/topic/mobile-page-theme-and-cloudflare-caching-plugin-integration/ | |
| * @author: Saumya Majumder | |
| */ | |
| // Default cookie prefixes for cache bypassing |
| # by default minikube alloca 2 cpus and 2 gb memory | |
| minikube start | |
| # delete existing minikube instance and allocate more memory/cpu on start up | |
| minikube stop | |
| minikube delete | |
| minikube start --memory 8192 --cpus 4 | |
| >> 🔥 Creating hyperkit VM (CPUs=4, Memory=8192MB, Disk=20000MB) | |
| # keep existing minikube instance and allocate more memory/cpu |
| # the default docker0 bridge inside minikube | |
| minikube ssh | |
| ifconfig | |
| >> output | |
| docker0 Link encap:Ethernet HWaddr 02:42:E1:6D:15:33 | |
| inet addr:172.17.0.1 Bcast:172.17.255.255 Mask:255.255.0.0 | |
| UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 | |
| RX packets:311191 errors:0 dropped:0 overruns:0 frame:0 | |
| TX packets:307842 errors:0 dropped:0 overruns:0 carrier:0 |
NOTE: I want disclaimer that this work is not complete mine. Most of the work here is comming from: https://dhwaneetbhatt.com/blog/run-docker-without-docker-desktop-on-macos
$ brew doctor
$ brew update| import { decode } from "blurhash" | |
| export function blurHashToDataURL(hash: string | undefined): string | undefined { | |
| if (!hash) return undefined | |
| const pixels = decode(hash, 32, 32) | |
| const dataURL = parsePixels(pixels, 32, 32) | |
| return dataURL | |
| } |
| import { useSignal, signal, effect } from '@preact/signals'; | |
| import { useLayoutEffect, useMemo, useRef } from 'preact/hooks'; | |
| /** @template T @typedef {T extends (infer U)[] ? U : never} Items */ | |
| /** @param {{ v, k?, f }} props */ | |
| const Item = ({ v, k, f }) => f(v, k); | |
| /** | |
| * Like signal.value.map(fn), but doesn't re-render. |
| import { options } from "preact"; | |
| import { Signal } from "@preact/signals"; | |
| // Add `bind:value` to JSX types | |
| declare global { | |
| namespace preact.createElement.JSX { | |
| interface HTMLAttributes { | |
| "bind:value"?: Signal<string | string[] | number | undefined>; | |
| } | |
| } |
| import { parse } from 'cache-control-parser'; | |
| export default { | |
| async fetch(request: Request, env: {}, ctx: ExecutionContext): Promise<Response> { | |
| try { | |
| const cache = await caches.default; | |
| const cachedResponse = await cache.match(request); | |
| if (cachedResponse) { | |
| console.log('Cache: HIT'); | |
| if (shouldRevalidate(cachedResponse)) { |
| import { getSession, session } from "remix-hono/session"; | |
| import { pathToRegexp } from "path-to-regexp"; | |
| /** | |
| * Add protected routes middleware | |
| * | |
| */ | |
| app.use( | |
| protect({ |
| { | |
| "diffEditor.renderSideBySide": true, | |
| "editor.fontSize": 14, | |
| "editor.lineHeight": 22, | |
| "editor.tabSize": 2, | |
| "editor.matchBrackets": "never", | |
| "editor.cursorBlinking": "solid", | |
| "editor.selectionHighlight": false, | |
| "editor.occurrencesHighlight": "off", | |
| "editor.scrollbar.horizontal": "hidden", |