dood-redirectmain.tsx1 match
16});
1718export default app.fetch;
mastodon-pogodanew-file-2457.tsx4 matches
1const mastodonToken = Deno.env.get("MASTODON_ACCESS_TOKEN");
23import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=6";
4import { load } from "npm:cheerio";
56async function mastodonWeatherMap() {
7const html = await fetchText("https://www.bankier.pl//gielda/notowania/indeksy-gpw"); // Przykład linku do strony z ETF-ami
8const $ = load(html);
936const status = await mastodonWeatherMap();
3738const html = await fetchText(
39"https://www.bankier.pl//gielda/notowania/indeksy-gpw",
40);
47console.log("lol");
4849await fetch(`https://mastodon.social/api/v1/statuses`, {
50method: "POST",
51headers: {
hn-remote-ts-genai-jobsindex.ts7 matches
4* This script:
5* 1. Finds the latest "Who's Hiring" thread on Hacker News
6* 2. Fetches all comments from that thread
7* 3. Filters for remote jobs requiring TypeScript and GenAI skills
8* 4. Formats and outputs the results
14import {
15findLatestWhoIsHiringThread,
16fetchComments,
17getFallbackThreadId
18} from "./hackerNewsApi.ts";
2627/**
28* Main function to fetch and process job listings
29*/
30export async function findRemoteTSGenAIJobs(): Promise<{
46}
47
48console.log("📥 Fetching comments...");
49const comments = await fetchComments(threadId);
50console.log(`✅ Fetched ${comments.length} comments`);
51
52console.log("🔎 Filtering for remote TS+GenAI jobs...");
99return await blob.getJSON(`${STORAGE_KEY}-latest`);
100} catch (error) {
101console.error("Error fetching latest results:", error);
102return null;
103}
hn-remote-ts-genai-jobshackerNewsApi.ts13 matches
2425/**
26* Fetches a Hacker News item by its ID
27* @param id The Hacker News item ID
28* @returns The item data or null if not found
29*/
30export async function fetchItem(id: number): Promise<HNItem | null> {
31try {
32const response = await fetch(`https://hacker-news.firebaseio.com/v0/item/${id}.json`);
33if (!response.ok) {
34throw new Error(`Failed to fetch item ${id}: ${response.status}`);
35}
36return await response.json();
37} catch (error) {
38console.error(`Error fetching item ${id}:`, error);
39return null;
40}
4243/**
44* Fetches all comments from a Hacker News thread
45* @param storyId The parent story/thread ID
46* @returns An array of comment items
47*/
48export async function fetchComments(storyId: number): Promise<HNItem[]> {
49const story = await fetchItem(storyId);
50if (!story || !story.kids || story.kids.length === 0) {
51return [];
52}
5354// Fetch all comments in parallel
55const commentPromises = story.kids.map(kid => fetchItem(kid));
56const comments = await Promise.all(commentPromises);
57
72try {
73// First get the user information for "whoishiring" account
74const whoishiringUserInfo = await fetch('https://hacker-news.firebaseio.com/v0/user/whoishiring.json');
75const userInfo = await whoishiringUserInfo.json();
76
82const recentSubmissions = userInfo.submitted.slice(0, 10);
83
84// Fetch details for each submission
85const submissionPromises = recentSubmissions.map(id => fetchItem(id));
86const submissions = await Promise.all(submissionPromises);
87
hn-remote-ts-genai-jobsREADME.md2 matches
1# Hacker News Remote TypeScript & GenAI Jobs Filter
23This Val Town project fetches the latest "Who's Hiring" thread from Hacker News and filters the comments to find remote job opportunities that require TypeScript and GenAI (Generative AI) skills.
45## How It Works
671. Fetches the latest "Who's Hiring" thread ID from Hacker News
82. Retrieves all comments from that thread
93. Filters comments to find remote job postings that mention TypeScript and GenAI
telegramBotStarterbotFunctions.js4 matches
183*/
184async function getActiveUsers() {
185// Fetch raw user data from the blob storage
186const rawUserKeys = await storage.list({ prefix: "userInfo:" });
187337const botToken = process.env.TELEGRAM_BOT_TOKEN;
338339const response = await fetch(`https://api.telegram.org/bot${botToken}/sendMessage`, {
340method: "POST",
341headers: { "Content-Type": "application/json" },
367const botToken = process.env.TELEGRAM_BOT_TOKEN;
368369const response = await fetch(`https://api.telegram.org/bot${botToken}/setWebhook`, {
370method: "POST",
371headers: { "Content-Type": "application/json" },
391const botToken = process.env.TELEGRAM_BOT_TOKEN;
392393const response = await fetch(`https://api.telegram.org/bot${botToken}/getWebhookInfo`);
394const result = await response.json();
395return result;
my-first-val02_http.tsx2 matches
1011// Look up the user's location from their IP
12const geoResponse = await fetch(`http://ip-api.com/json/${ip}`);
13const geoData = await geoResponse.json();
1461});
6263export default app.fetch;
glastonewsindex.ts7 matches
1import cheerio from "node:cheerio"; // Use cheerio for HTML parsing
2import fetch from "node:node-fetch"; // Ensure this is installed if not already
3import process from "node:process";
4import { BskyAgent } from "npm:@atproto/api";
9});
1011async function fetchNews() {
12const url = "https://glastonburyfestivals.co.uk/news/";
13try {
14const response = await fetch(url);
15if (!response.ok) {
16throw new Error(`Failed to fetch news: ${response.statusText}`);
17}
18const html = await response.text();
31return news;
32} catch (error) {
33console.error("Error fetching news:", error);
34throw error;
35}
40await agent.login({ identifier: process.env.BLUESKY_USERNAME, password: process.env.BLUESKY_PASSWORD });
4142// Fetch the latest news
43const newsItems = await fetchNews();
4445// Post each news item to Bluesky
6566// Register the commands
67const response = await fetch(`https://discord.com/api/v10/${endpoint}`, {
68method: "PUT",
69headers: {
TownieuseProject.tsx5 matches
11const [error, setError] = useState(null);
1213const fetchData = async () => {
14try {
15const projectEndpoint = new URL(PROJECT_ENDPOINT, window.location.origin);
23};
2425const { project } = await fetch(projectEndpoint, { headers })
26.then(res => res.json());
27const { files } = await fetch(filesEndpoint, { headers })
28.then(res => res.json());
2940useEffect(() => {
41if (!projectId) return;
42fetchData();
43}, [projectId, branchId]);
4445return { data, loading, error, refetch: fetchData };
46}
47