Avatar

maxm

🕳️
Joined January 12, 2023
Public vals
83
maxm avatar
vscode
@maxm
HTTP
Manage your blobs using VS Code ! Just fork this val to install it, and use an api token to authenticate.
maxm avatar
router
@maxm
Script
@jsxImportSource npm:hono/jsx
maxm avatar
example_test
@maxm
Script
An interactive, runnable TypeScript val by maxm
maxm avatar
test_explorer_router
@maxm
Script
@jsxImportSource npm:hono/jsx
maxm avatar
test_explorer
@maxm
HTTP
Test Explorer Click on the play button next to list items to run them. Usage Fork this val Create new tests in any of vals (and export them) (see @pomdtr/example_test) import { assertEquals } from "https://deno.land/std@0.216.0/assert/mod.ts"; import { Test } from "https://esm.town/v/<account>/test_explorer"; export const exampleTestSuccess = new Test(() => { assertEquals(1 + 1, 2); }); export const exampleTestFailure = new Test(() => { assertEquals(1 + 1, 3); }); Go to https://<account>-test_explorer.web.val.run to run your test click on the val name to go to the val the tests are originating from click on the test name to run it ℹ️ You probably want to protect your test explorer behind an authentication middleware like @pomdtr/basicAuth Discovery mechanism In order to define a test, the user need to import the Test class from https://val.town/v/<account>/Test . So we can use the api to search for vals containing the https://val.town/v/<account>/Test string to locate the vals containing tests. Next, we need to extract the tests from the val exports. We use exported instanceof Test to filter them (at some point we will probably use static analysis for this). TODO [x] persist test results in sqlite [x] Improve styling (help welcome ❤️) [ ] View logs in a modal [ ] Batch http requests
maxm avatar
mootex
@maxm
HTTP
maxm avatar
imageMagickWasmExample
@maxm
Script
Val Town implementation of the magick-wasm demo: https://github.com/dlemstra/magick-wasm/blob/main/demo/demo.ts Outputs: ImageMagick 7.1.1-30 Q8 x86_64 dd459b01f:20240407 https://imagemagick.org Delegates: freetype heic jng jp2 jpeg jxl lcms lqr openexr png raw tiff webp xml zlib Features: Cipher Quantum: 8 GIF 100x75 8-bit sRGB 2679
maxm avatar
openAIStreamingExample
@maxm
HTTP
An interactive, runnable TypeScript val by maxm
maxm avatar
reportBodySize
@maxm
HTTP
An interactive, runnable TypeScript val by maxm
maxm avatar
jamesWebbImageProxy
@maxm
HTTP
An interactive, runnable TypeScript val by maxm
maxm avatar
amaranthSquirrel
@maxm
HTTP
ASCII NYC Traffic Cameras All of NYC's traffic cameras available as streaming ASCII images: https://maxm-asciinyccameras.web.val.run/ NYC has a bunch of traffic cameras and makes them available through static images like this one . If you refresh the page you'll see the image update every 2 seconds or so. I thought it might be fun to make these cameras viewable as ASCII images. I made a small library that takes most of its logic from this repo . You can see a basic example of how to convert any image to ASCII here . I pull in NYC GeoJSON from here and then hook up a Server-Sent Events endpoint to stream the ASCII updates to the browser. (Polling would work just as well, I've just been on a bit of a SSE kick lately.) Hilariously (and expectedly) The ASCII representation is about 4x the size of the the source jpeg and harder to see, but it has a retro-nostalgia look to it that is cool to me :)
maxm avatar
asciiNycCameras
@maxm
HTTP
ASCII NYC Traffic Cameras All of NYC's traffic cameras available as streaming ASCII images: https://maxm-asciinyccameras.web.val.run/ NYC has a bunch of traffic cameras and makes them available through static images like this one . If you refresh the page you'll see the image update every 2 seconds or so. I thought it might be fun to make these cameras viewable as an ASCII art video feed. I made a small library that takes most of its logic from this repo . You can see a basic example of how to convert any image to ASCII here . I pull in NYC GeoJSON from here and then hook up a Server-Sent Events endpoint to stream the ASCII updates to the browser. (Polling would work just as well, I've just been on a bit of a SSE kick lately.) Hilariously (and expectedly) The ASCII representation is about 4x the size of the the source jpeg and harder to see, but it has a retro-nostalgia look to it that is cool to me :)
maxm avatar
asciiImageExample
@maxm
HTTP
An interactive, runnable TypeScript val by maxm
maxm avatar
imageToAscii
@maxm
Script
Copyright (c) 2018 Victor Ribeiro - victorqribeiro@gmail.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. https://github.com/victorqribeiro/imgToAscii
maxm avatar
endlessMazeStream
@maxm
HTTP
maxm avatar
multiplayerCircles
@maxm
HTTP
Multiplayer Circles Move circles around. State is synced with the server. Open a window in another tab and watch the circles update as you move them .