violetKoalamain.tsx3 matches
1async function fetchWeather() {
2const API_KEY = "439d4b804bc8187953eb36d2a8c26a02"; // Example key, replace with your own
3const LAT = 51.5074; // London latitude
22}
2324function generateHTML(weather, url) {
25if (!weather || !weather.current) {
26console.error("Weather data not available");
61}
6263export default async function main(req) {
64const weather = await fetchWeather();
65const url = `http://api.openweathermap.org/data/2.5/forecast/daily?q=London&appid=439d4b804bc8187953eb36d2a8c26a02`;
23const pairPattern = /([a-zA-Z0-9_-]+)([=!<>]=?|[<>])(.+)/;
2425export function superchargedQueryParams(url: URL): ParsedQuery {
26return decodeURIComponent(url.search)
27.slice(1)
15let hueBase
1617export function setup() {
18canvasSize = 800
19numberOfSquares = Math.floor(random(4, 10))
34}
3536export function draw() {
37background(0)
3849}
5051function drawSquare(x, y) {
52let inset = gridSize * 0.06
53let size = gridSize - inset
97}
9899export function keyPressed() {
100if (key == "i") {
101saveCanvas("p5js-" + new Date().getTime(), "png")
105}
106}
107// export function touchEnded() {
108// saveCanvas("p5js-" + new Date().getTime(), "png");
109// }
dateme_homemain.tsx1 match
4import Layout from "https://esm.town/v/stevekrouse/dateme_layout";
56export default function Home(c) {
7const AutocompleteInput = () => {
8const [inputValue, setInputValue] = useState('');
thomasResumeHandlermain.tsx1 match
4import { resumeConfig } from 'https://esm.town/v/iamseeley/thomasResumeConfig';
56export default async function resumeHandler(req: Request): Promise<Response> {
7if (req.method === 'GET') {
8try {
linkInBioTemplatemain.tsx1 match
2import { renderToString } from "npm:react-dom/server";
34export default async function(req: Request) {
5return new Response(
6renderToString(
dailyStandupBotmain.tsx1 match
1import { discordWebhook } from "https://esm.town/v/stevekrouse/discordWebhook";
23export default async function() {
4discordWebhook({
5url: Deno.env.get("engDiscord"),
12}
1314export default async function main(req: Request): Promise<Response> {
15if (req.method === "GET") {
16// Retrieve and return all comments
sqliteExplorerAppREADME.md1 match
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable
35- [x] add export to CSV, and JSON (CSV and JSON helper functions written in [this val](https://www.val.town/v/nbbaier/sqliteExportHelpers). Thanks to @pomdtr for merging the initial version!)
36- [x] add listener for cmd+enter to submit query
dateme_browse_reactmain.tsx7 matches
5import { nominatimSearch } from "https://esm.town/v/stevekrouse/nominatimSearch";
67function absoluteURL(url) {
8if (url.startsWith("http://") || url.startsWith("https://"))
9return url;
25let linkClass = "text-sky-600 hover:text-sky-500";
2627function httpsIfy(url: string) {
28if (!url.startsWith("http://") && !url.startsWith("https://")) {
29return `https://${url}`;
3334// TODO - refactor this into a Cell React component
35function renderCell(header, row) {
36let data = row[header];
37if (header === "Name") {
47}
4849function convertParams(url) {
50const params = new URL(url).searchParams;
51const search = {
62const metersInMile = 1609.34;
6364function withinRadius(
65profileLocation: string[],
66searchLocation: { lat: number; lon: number },
75}
7677export async function loader({ request }) {
78"use server"; // this is not a real feature; just me reminding myself I'm on the server
79const { zip } = await import("npm:lodash-es");
117}
118119export function Browse() {
120const search = convertParams(window.location.href);
121const { profiles } = useLoaderData() as any; // TODO - get good typing