This file contains hidden or 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 { pack, unpack, maxPackableSum } from "./pack"; | |
| /** Run with: npx tsx pack.test.ts */ | |
| let failures = 0; | |
| function check(label: string, condition: boolean): void { | |
| if (!condition) { | |
| failures++; | |
| console.error("FAIL:", label); | |
| } else { | |
| console.log("ok :", label); |
This file contains hidden or 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
| name: 'local-ai' | |
| services: | |
| openwebui: | |
| image: 'ghcr.io/open-webui/open-webui' | |
| deploy: | |
| restart_policy: | |
| condition: on-failure | |
| delay: 5s |
This file contains hidden or 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
| name: 'local-ai' | |
| services: | |
| openwebui: | |
| image: 'ghcr.io/open-webui/open-webui:v0.6.6-cuda@sha256:bc307f2847d28c215270f67a8e88389c1339d210e452ad1854f60b0c6bb1100f' | |
| deploy: | |
| resources: | |
| reservations: | |
| devices: | |
| - driver: nvidia | |
| count: 1 |
This file contains hidden or 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
| export default { | |
| /** | |
| * @param {Request} request | |
| */ | |
| async fetch(request) { | |
| const corsHeaders = { | |
| "Access-Control-Allow-Origin": "*", | |
| "Access-Control-Allow-Methods": "GET,HEAD,POST,OPTIONS", | |
| "Access-Control-Max-Age": "86400", | |
| }; |
This file contains hidden or 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
| javascript:(() => { let speed = 2; let indicator; let indicatorTimeout; function createIndicator() { indicator = document.createElement("div"); indicator.setAttribute(`style`, ` position: fixed; left: 15px; top: 15px; background-color: black; color: white; font-size: 20px; padding: 10px; display: none; z-index: 99999999999999; `); document.body.appendChild(indicator); }; function show(text) { if (!indicator) createIndicator(); indicator.innerText = text; indicator.style.display = "block"; indicatorTimeout && clearTimeout(indicatorTimeout); indicatorTimeout = setTimeout(() => { indicator.style.display = "none"; }, 5000); } function round(value, precision) { const scalar = 10 ** precision; return Math.round(value * scalar) / scalar; }; function conformSpeed(value) { return Math.min(Math.max(value, 1 / 16), 16); }; function syncSpeed() { document.querySelectorAll("video").forEach(video => { video.playbackRate = speed; }); }; function changeSpeed(value) { speed = conformSpeed(value); show(round(speed, 2).t |
ipfs://bafybeia7cu2axyyxsarmaemvlpdpofa4q23lzpltbl4jbrnfixdn573h4y
If you don't yet have an IPFS enabled browser then you can use one of the following instead (not recommended): https://bafybeia7cu2axyyxsarmaemvlpdpofa4q23lzpltbl4jbrnfixdn573h4y.ipfs.tornadocash.is https://bafybeia7cu2axyyxsarmaemvlpdpofa4q23lzpltbl4jbrnfixdn573h4y.ipfs.cf-ipfs.com
This file contains hidden or 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
| (function () { | |
| var request = async ({method, params}) => { | |
| if (method === 'eth_requestAccounts') { | |
| return ['0xd8da6bf26964af9d7eed9e03e53415d37aa96045'] | |
| } | |
| else { | |
| const response = await fetch('https://cloudflare-eth.com/v1/mainnet', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({jsonrpc:'2.0',id:1,method,params})}) | |
| if (!response.ok) throw new Error(`${response.status}: ${response.statusText}\n${await response.text()}`) | |
| const json = await response.json() | |
| if ('error' in json) throw new Error(json.error) |
This file contains hidden or 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
| (function () { const chatBox = document.querySelector('#wc-container-right > div.participants-section-container > div.chat-container > div > textarea'); chatBox.onblur = chatBox.focus })() |
NewerOlder