Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/?q=image&page=585&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=image

Returns an array of strings in format "username" or "username/projectName"

Found 6021 results for "image"(742ms)

pixelmain.tsx1 match

@stevekrouse•Updated 1 year ago
40 pixelData.push(data);
41 res.set("Cache-Control", "no-cache, no-store, must-revalidate, max-age=0");
42 await randomGenerator(req, res); // res.set("Content-Type", "image/svg+xml");
43 // res.redirect("http://delian.io/transparent_pixel.png");
44 // return data;

keepCloudClassifierWarmV4main.tsx1 match

@cathy•Updated 1 year ago
3export const keepCloudClassifierWarmV4 = async () => {
4 const imgDataUrl =
5 "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
6 const response = await fetch(
7 "https://kaicathy-cloudid.hf.space/run/predict",

socialImageUsagemain.tsx12 matches

@tylergaw•Updated 1 year ago
1import { socialImageUsageCSS } from "https://esm.town/v/tylergaw/socialImageUsageCSS";
2
3export const socialImageUsage = () => {
4 const img =
5 "https://tylergaw-socialimage.web.val.run/?bg=%23a2fa00&text=Building%20an%20Image%20Generator%20with%20Val%20Town";
6 const html = `
7<html>
8 <meta property="og:image" content="${img}">
9 <meta name="twitter:image" content="${img}">
10 <meta name="twitter:card" content="summary_large_image">
11 <title>Val Town: Image generator example usage</title>
12 <style>${socialImageUsageCSS}</style>
13 <body>
14 <h1>Image generator Example</h1>
15 <p>See <a href="https://www.val.town/v/tylergaw.socialImage">https://www.val.town/v/tylergaw.socialImage</a></p>
16
17 <ul>
18 <li><img src="https://tylergaw-socialimage.web.val.run/?bg=%23fa2500&text=Smol&color=white&w=500&h=300"></li>
19 <li><img src="https://tylergaw-socialimage.web.val.run/?bg=%23f6fa00&text=square&w=600&h=600"></li>
20 </ul>
21 </body>

socialImagemain.tsx2 matches

@tylergaw•Updated 1 year ago
1export const socialImage = async (req: Request) => {
2 const params = new URL(req.url).searchParams;
3 // Look for values form query params, set defaults
21 return new Response(canvas.toBuffer(), {
22 headers: {
23 "Content-Type": "image/png",
24 },
25 });

variablePowermain.tsx2 matches

@jedahan•Updated 1 year ago
30 const isNewCard = ({ name }) => names.size + 1 == names.add(name).size;
31 const sortByName = (a, b) => (a.name < b.name ? -1 : 1);
32 const renderCard = ({ name, imageUrl, set, number }) =>
33 `<li><a href="https://scryfall.com/card/${set.toLowerCase()}/${number}">${name} <img src=${imageUrl} /></a>`;
34 const cardlist = cards.sort(sortByName).filter(isNewCard).map(renderCard);
35 const ul = (children) => `<ul>${children.join("\n")}</ul>`;

generateFeedHTMLmain.tsx2 matches

@iakovos•Updated 1 year ago
4 <tr>
5 <td style="padding: 0; vertical-align:top;">
6 <div class="image-container">
7 ${
8 feed.image ? `<img src="${feed.image}" alt="Feed Image">` : ""
9 }
10 </div>

sparklineEx2main.tsx1 match

@stevekrouse•Updated 1 year ago
2
3export let sparklineEx2 = function (req, res) {
4 res.set("content-type", "image/svg+xml");
5 res.end(sparklineSVG({
6 strokeWidth: 4,

getActivityAndGiphymain.tsx1 match

@simply_say_m•Updated 1 year ago
7 const fetchGiphy = await fetchGiphy2(activity);
8 const { url } =
9 fetchGiphy[Math.floor(Math.random() * 10)].images.downsized_large;
10 return res.send(
11 `<div style='min-height:100vh; width: 100vw; margin:0; background: radial-gradient(circle, rgba(251,159,63,1) 54%, rgba(255,186,253,1) 100%);'>

basicsWithBabishRssmain.tsx2 matches

@diit•Updated 1 year ago
25 const rawLink = element.querySelector(".summary-thumbnail-container")
26 ?.getAttribute("href");
27 const img = element.querySelector(".summary-thumbnail-image")
28 ?.getAttribute("src");
29 const title = rawTitle;
33 title,
34 link,
35 image: img,
36 });
37 });

art_appmain.tsx1 match

@char_lie•Updated 1 year ago
8${art_info.idea}
9========================
10![image info](${art_info.art.src})
11
12*Verdict*: ${art_info.criticism}

brainrot_image_gen1 file match

@dcm31•Updated 6 days ago
Generate images for Italian Brainrot characters using FAL AI

modifyImage2 file matches

@stevekrouse•Updated 6 days ago
Atiq
"Focal Lens with Atig Wazir" "Welcome to my photography journey! I'm Atiq Wazir, a passionate photographer capturing life's beauty one frame at a time. Explore my gallery for stunning images, behind-the-scenes stories, and tips & tricks to enhance your own