14 results: OctopusPrice[];
15};
16export async function octopusAgilePricing(location: string): Promise<OctopusPrice> {
17 const locationMap = {
18 "London": "C",
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function postHogAPICapture({ key, event, properties, distinct_id }: {
4 key: string;
5 event: string;
1export default async function handler(request: Request) {
2 if (request.method === "GET") {
3 return new Response(
9 <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.0.3/dist/tailwind.min.css" rel="stylesheet">
10 <script>
11 function handleSubmit(event) {
12 event.preventDefault();
13 var dreamInput = document.getElementById('dreamInput');
15const dateClass = "text-xs text-gray-400 font-mono mr-1 hidden sm:inline-block";
16
17async function getHits() {
18 const [, , { rows: [[allHits]] }, { rows: [[todayHits]] }] = await sqlite.batch([
19 "CREATE TABLE IF NOT EXISTS stevekrouse_com_hits (timestamp DATETIME DEFAULT CURRENT_TIMESTAMP)",
192 <li className="pb-2 sm:pb-1">
193 <span className={dateClass}>2016 Jul -</span>
194 <Link href="https://medium.com/@stevekrouse/the-trick-to-teach-anonymous-functions-to-11-year-olds-558b697d7a53">
195 The Trick to Teach Anonymous Functions to 11-Year-Olds
196 </Link>
197 </li>
1export default async function(interval) {
2 // Sample phrases and words that are likely to appear in dream descriptions
3 const introPhrases = [
6const app = new Hono();
7
8async function renderImage(s: string, color: string) {
9 const fontArrayBuf = await fetch(
10 "https://cdn.jsdelivr.net/npm/roboto-font@0.1.0/fonts/Roboto/roboto-regular-webfont.ttf",
3import { email } from "https://esm.town/v/std/email?v=11";
4
5export async function handleSavePageForm(req: Request) {
6 const formData = await req.formData();
7 const text = formData.get("text");
2import { sqlite } from "https://esm.town/v/std/sqlite";
3
4export async function getLatestPageEntryDb() {
5 let latestVersion = await sqlite.execute(`select * from pages where id = (select max(id) from pages);`);
6 return sqliteRowsAsObject(latestVersion)[0];
7}
8
9export async function getAllPageEntriesDb() {
10 let allVersions = await sqlite.execute(`select * from pages order by id desc`);
11 return sqliteRowsAsObject(allVersions);
12}
13
14export async function savePageEntryDb(textValue) {
15 const insertResult = await sqlite.execute({
16 sql: `insert into pages (value) values (:value)`,
4import { escape } from "npm:html-sloppy-escaper";
5
6export default modifyFetchHandler(async function(req: Request) {
7 const pathname = new URL(req.url).searchParams.get("url");
8 const html = await fetchText(pathname ?? "example.com"); // .then(prettifyHtml);
1export async function getFieldValue(req) {
2 const url = new URL(req.url);
3 let symbol = url.searchParams.get("symbol") || "";
A helper function to build a file's email
Simple functional CSS library for Val Town
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",