Search
peculiarTanMouse
@jamisonl
Bot for Cama discord server. To initialize new slash commands, you have to run a separate bit of code. This is for modifying their functionality
HTTP
Bot for Cama discord server. To initialize new slash commands, you have to run a separate bit of code. This is for modifying their functionality
req.headers.get("X-Signature-Ed25519"),
req.headers.get("X-Signature-Timestamp"),
// Get the user calling this slash command
const userId = await body.member?.user?.id;
if (bank[userId] === undefined) bank[userId] = starting_amount;
![stevekrouse avatar](https://images.clerk.dev/uploaded/img_2PqHa2Gsy93xQrjh2w78Xu0cChW.jpeg)
linkInBioTemplate
@stevekrouse
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import { renderToString } from "npm:react-dom/server";
export default async function(req: Request) {
return new Response(
renderToString(
valle_tmp_562580635116363837652861654341074
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP
import OpenAI from "npm:openai";
unless strictly necessary, for example use APIs that don't require a key, prefer internal function
functions where possible. Unless specified, don't add error handling,
The val should create a "export default async function main" which is the main function that gets
// The val should create a "export default async function main() {" which
// is the main function that gets executed, without any arguments. Don't return a Response object,
function write(text) {
function updateValName(valName) {
function saveVal() {
function openTab(tab) {
![joshrcook avatar](https://images.clerk.dev/oauth_github/img_2RG0YTuVHBVW5Lm3JWofvaUpHIP.png)
myApi
@joshrcook
An interactive, runnable TypeScript val by joshrcook
Script
export function myApi(name) {
return "hi " + name;
val_CQqfNR6svd
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_CQqfNR6svd(req) {
try {
// Execute the code directly and capture its result
![envl avatar](https://images.clerk.dev/uploaded/img_2Sq6WoJbBMkhx5LiLFw2mwk2z9s.jpeg)
anyjs
@envl
An interactive, runnable TypeScript val by envl
Script
export async function anyjs(req: Request) {
// const res = await @stevekrouse.eval_("8+8");
return Response.json(Array.from(req.headers.entries()));
![stevekrouse avatar](https://images.clerk.dev/uploaded/img_2PqHa2Gsy93xQrjh2w78Xu0cChW.jpeg)
dot_com
@stevekrouse
stevekrouse.com - my personal website This val hosts my personal website. The view data is stored in Val Town SQLite - @std/sqlite. It used to live on Github Pages, which is why I proxy over requests to certain blog posts over to the Github Pages site still. Todos [ ] Speed up page load by loading sqlite data later like in @healeycodes/steve_web [ ] Store more (legally storable) analytics data, and maybe make a sparkline! [ ] Add some sort of way to contact me [ ] Move over all my blog posts from Github Pages (maybe into @std/blob as a CMS?)
HTTP
const dateClass = "text-xs text-gray-400 font-mono mr-1 hidden sm:inline-block";
async function getHits() {
const [, , { rows: [[monthHits]] }, { rows: [[todayHits]] }] = await sqlite.batch([
<span className={dateClass}>2016 Jul -</span>
<Link href="https://medium.com/@stevekrouse/the-trick-to-teach-anonymous-functions-to-11-year-olds-558b697d7a53">
The Trick to Teach Anonymous Functions to 11-Year-Olds
</Link>
cerebras_coder
@ChuckYLeeVIII
This is an AI code assistant powered by Cerebras , running llama3.3-70b. Inspired by Hassan's Llama Coder . Setup Sign up for Cerebras Get a Cerebras API Key Save it in a Val Town environment variable called CEREBRAS_API_KEY Todos I'm looking for collaborators to help. Fork & send me PRs! [ ] Experiment with two prompt chain (started here )
HTTP
"stateMutability": "nonpayable",
"type": "function"
// Mainnet Addresses
description: "High risk: Significant potential for financial loss"
function FlashLoanTooltip() {
return (
</div>
function App() {
const [address, setAddress] = useState("");
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request) {
return new Response(`
![nickgehring avatar](https://images.clerk.dev/oauth_github/img_2SnPyi6Rso7FprkdFxKYT2qOTsz.jpeg)
myApi
@nickgehring
An interactive, runnable TypeScript val by nickgehring
Script
export function myApi(name) {
return "hi " + name;
val_754eiyUd9r
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_754eiyUd9r(req) {
try {
// Execute the code directly and capture its result
const result = await (async () => {
// Test 1: Precision and floating point arithmetic
function testMathPrecision() {
const result = {
infinityTest: 1 / 0,
![groundcontrol avatar](https://images.clerk.dev/oauth_github/img_2SZPp0dXF0GzWAYWzuIFCR0dCa4.jpeg)
myApi
@groundcontrol
An interactive, runnable TypeScript val by groundcontrol
Script
export function myApi(name) {
return "hi " + name;
val_YI2jnzJKfc
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_YI2jnzJKfc(req) {
try {
// Execute the code directly and capture its result
![pomdtr avatar](https://images.clerk.dev/oauth_github/img_2RCoAITJZH1QencEgtVjh4Qirj4.jpeg)
open_url
@pomdtr
An interactive, runnable TypeScript val by pomdtr
Script
import { BrowserContext } from "https://esm.town/v/pomdtr/browser";
export default async function(ctx: BrowserContext<{ url: string }>) {
return {
type: "open",