2import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=5";
34export async function aqi(interval: Interval) {
5const location = "abbotsford, british columbia"; // <-- change to place, city, or zip code
6const data = await easyAQI({ location });
pollRSSFeedsmain.tsx1 match
3import { rssFeeds } from "https://esm.town/v/stevekrouse/rssFeeds";
45export async function pollRSSFeeds({ lastRunAt }: Interval) {
6return Promise.all(
7Object.entries(rssFeeds).map(async ([name, url]) => {
stuckIvoryParakeetREADME.md1 match
1Bot for Cama discord server. To initialize new slash commands, you have to run a separate bit of code. This is for modifying their functionality
16`);
1718function createErrorPage(title: string, message: string): string {
19return `
20<html>
108};
109110function injectNotificationIndicator(html: string): string {
111const notificationCount = 21; // Hardcoded for now
112const notificationIndicator = `
125}
126127export default async function(req: Request): Promise<Response> {
128const url = new URL(req.url);
129let userCookie: string | undefined;
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
12* The email address(es) to send the email to. Only available to Val Town Pro subscribers.
13* Can be a single string, IAddress object, or an array of strings/IAddress objects.
14* @default the email of the logged user calling this function.
15*/
16to?: (IAddress | string)[] | IAddress | string;
reluctantCoffeeGayalmain.tsx10 matches
28"Have the ability to murder anyone without any consequences",
29"Have a tight knit and loyal friend group",
30"Have another set of eyes in the back of your head (they are fully functional)",
31"Have a very physically attractive romantic partner",
32"Be able to spawn pizzas by snapping your fingers (max 2 per 12 hours)",
36];
3738function App() {
39const [user, setUser] = useState<User | null>(null);
40const [answers, setAnswers] = useState<Answer[]>([]);
106}
107108function SplashScreen({ onGetStarted }: { onGetStarted: () => void }) {
109return (
110<div className="splash-screen">
132}
133134function TabBar() {
135const location = useLocation();
136const tabs = [
163}
164165function Game({ user, saveAnswer }: { user: User | null; saveAnswer: (answer: Answer, losingAnswer: string) => void }) {
166const getRandomQuestion = useCallback((): Question => {
167const availableOptions = [...ANSWER_OPTIONS];
198}
199200function Answers(
201{ user, answers, rankings, clearAnswers }: {
202user: User | null;
237}
238239function Profile({ user, setUser }: { user: User | null; setUser: (user: User | null) => void }) {
240const [username, setUsername] = useState("");
241277}
278279function client() {
280createRoot(document.getElementById("root")!).render(<App />);
281}
285}
286287async function server(request: Request): Promise<Response> {
288const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
289const KEY = "reluctantCoffeeGayal";
369}
370371async function updateEloRankings(sqlite: any, KEY: string, winningAnswer: string, losingAnswer: string) {
372const K = 32; // This is the maximum score change per match
373
fancyPlumSquirrelmain.tsx3 matches
9import { createRoot } from "https://esm.sh/react-dom/client";
1011function App() {
12const [panelMembers, setPanelMembers] = useState([]);
13const [newMember, setNewMember] = useState({ name: "", expertise: "" });
116}
117118function client() {
119createRoot(document.getElementById("root")).render(<App />);
120}
124}
125126async function server(request: Request): Promise<Response> {
127const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
128const KEY = "fancyPlumSquirrel";
10import { createRoot } from "https://esm.sh/react-dom/client";
1112function App() {
13const [layoutType, setLayoutType] = useState('flexbox');
14const [flexDirection, setFlexDirection] = useState('row');
126}
127128function client() {
129createRoot(document.getElementById("root")).render(<App />);
130}
134}
135136export default async function server(request: Request): Promise<Response> {
137return new Response(
138`
litepickbetmain.tsx5 matches
296/* events */
297298/* run function on win */
299onWin(func) {
300this.winHandlers.push(func);
301}
302303/* run function on loss */
304onLoss(func) {
305this.lossHandlers.push(func);
306}
307308/* run function on every bet */
309onBet(func) {
310this.betHandlers.push(func);
323/* main app */
324325async function loop() {
326var url = "https://cyrilos-litepickbet.web.val.run";
327await axios({
332333/* bet session */
334async function playDice() {
335const PLATFORM = "litepick.io";
336const cookies = await blob.getJSON("cookies");