QR_Generatormain.tsx3 matches
3import { createRoot } from "https://esm.sh/react-dom/client";
45function App() {
6const [text, setText] = useState("");
7const [qrCode, setQrCode] = useState("");
34}
3536function client() {
37createRoot(document.getElementById("root")).render(<App />);
38}
42}
4344export default async function server(request: Request): Promise<Response> {
45return new Response(
46`
1This val default exports a function returning ValInfo.
23The val information comes from the Deno stack trace induced by `throw new Error()`.
16import thisval from "https://esm.town/v/begoon/thisval";
17const val = thisval();
18export default async function(req: Request): Promise<Response> {
19return Response.json(val);
20}
oddTanRoundwormmain.tsx1 match
1import { OpenAI } from "https://esm.town/v/std/openai";
23export default async function(req: Request): Promise<Response> {
4if (req.method === "OPTIONS") {
5return new Response(null, {
1314// handle incoming requests
15export default async function(req) {
16const PLATFORM = "tonpick.game";
17// const cookies = await blob.getJSON("platforms");
httpHelloWorldmain.tsx6 matches
42];
4344function MenuItem({ item }) {
45const [isOpen, setIsOpen] = React.useState(false);
46const [isHovered, setIsHovered] = React.useState(false);
68}
6970function Menu() {
71return (
72<div style={{ width: "250px", borderRight: "1px solid #ccc", height: "100vh", overflowY: "auto" }}>
76}
7778function Content() {
79return (
80<div style={{ padding: "20px", flexGrow: 1 }}>
97}
9899function App() {
100return (
101<BrowserRouter>
108}
109110function client() {
111ReactDOM.createRoot(document.getElementById("root")).render(<App />);
112}
114if (typeof document !== "undefined") { client(); }
115116async function server(request: Request): Promise<Response> {
117return new Response(
118`
tryingciceroagainmain.tsx5 matches
220`;
221222function AnimatedHeadline() {
223const [animationStarted, setAnimationStarted] = useState(false);
224const [contentVisible, setContentVisible] = useState(false);
271`;
272273function SubheadlineAnimation() {
274const [animationStarted, setAnimationStarted] = useState(false);
275const contentRef = useRef(null);
398`;
399400function App() {
401const [isNavOpen, setIsNavOpen] = React.useState(false);
402const toggleNav = () => {
458}
459460function client() {
461createRoot(document.getElementById("root")).render(<App />);
462}
464if (typeof document !== "undefined") { client(); }
465466export default async function server(request: Request): Promise<Response> {
467return new Response(
468`
scrapeCraigslistAPImain.tsx1 match
1import * as cheerio from "https://esm.sh/cheerio@1.0.0-rc.12";
23export default async function server(request: Request): Promise<Response> {
4const url = new URL(request.url).searchParams.get("url");
5
2// lalitpur up https://thejeshgn-imd_distrcitwise_warnings.web.val.run/?lat=24.6936599&lon=78.412621
3// vishisha MP https://thejeshgn-imd_distrcitwise_warnings.web.val.run/?lat=23.5210259&lon=77.809569
4export default async function(req: Request): Promise<Response> {
5const url = new URL(req.url);
6const lat = parseFloat(url.searchParams.get("lat") || "12.9796");
slackScoutmain.tsx10 matches
15}
1617export default async function(interval: Interval): Promise<void> {
18try {
19await createTable();
3839// Create an SQLite table
40async function createTable(): Promise<void> {
41await sqlite.execute(`
42CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
5051// Fetch Hacker news, Twitter, and Reddit results
52async function fetchHackerNewsResults(topic: string): Promise<Website[]> {
53return hackerNewsSearch({
54query: topic,
58}
5960async function fetchTwitterResults(topic: string): Promise<Website[]> {
61return twitterSearch({
62query: topic,
67}
6869async function fetchRedditResults(topic: string): Promise<Website[]> {
70return redditSearch({ query: topic });
71}
7273function formatSlackMessage(website: Website): string {
74const displayTitle = website.title || website.url;
75return `*<${website.url}|${displayTitle}>*
78}
7980async function sendSlackMessage(message: string): Promise<Response> {
81const slackWebhookUrl = Deno.env.get("SLACK_WEBHOOK_URL");
82if (!slackWebhookUrl) {
104}
105106async function isURLInTable(url: string): Promise<boolean> {
107const result = await sqlite.execute({
108sql: `SELECT 1 FROM ${TABLE_NAME} WHERE url = :url LIMIT 1`,
112}
113114async function addWebsiteToTable(website: Website): Promise<void> {
115await sqlite.execute({
116sql: `INSERT INTO ${TABLE_NAME} (source, url, title, date_published)
120}
121122async function processResults(results: Website[]): Promise<void> {
123for (const website of results) {
124if (!(await isURLInTable(website.url))) {