turnitdownmain.tsx1 match
82});
8384export default async function server(req: Request): Promise<Response> {
85return app.fetch(req);
86}
turnitdownREADME.md1 match
141. The application uses the Hono framework to create a simple web server.
152. HTMX is used for handling AJAX requests without writing JavaScript.
163. Alpine.js provides reactivity for the clipboard functionality.
174. The Turndown library is used to convert HTML to Markdown.
18
1/**
2* This val creates an email storage system using SQLite.
3* It stores each email sent through the 'newsly' function into a SQLite database.
4* The email address of the sender is used as the key.
5* We'll use the sqlite module for database operations and the email module for sending emails.
91011export async function newsly2(e: {
12from: string;
13to: string[];
excessPlumCapybaramain.tsx2 matches
8};
910export async function sendSMS(phoneNumber: string, message: string, carrier: string): Promise<void> {
11const carrierDomain = carriers[carrier.toLowerCase()];
12if (!carrierDomain) {
22text: message,
23});
24console.log('Email function returned:', result);
25console.log('SMS sent successfully');
26} catch (error) {
24});
2526async function sendMessage(chatId, text) {
27try {
28const url = `${TELEGRAM_API_URL}/sendMessage`;
iconExplorermain.tsx3 matches
12const ITEMS_PER_PAGE = 30;
1314function App() {
15const [searchTerm, setSearchTerm] = useState("");
16const [packages, setPackages] = useState([]);
89}
9091function client() {
92createRoot(document.getElementById("root")).render(<App />);
93}
95if (typeof document !== "undefined") { client(); }
9697async function server(request: Request): Promise<Response> {
98const url = new URL(request.url);
99
15*/
1617export default async function(req: Request): Promise<Response> {
18// HANDLE GET REQUEST FOR 'VERIFICATION REQUESTS'
19if (req.method === "GET") {
todaystatsmain.tsx12 matches
1112// Ensure the table exists
13async function ensureTableExists() {
14await sqlite.execute(`
15CREATE TABLE IF NOT EXISTS ${KEY}_world_state (
21}
2223// Utility function for fetching JSON data
24async function fetchJSON(url: string) {
25try {
26const response = await fetch(url);
3637// Convert Celsius to Fahrenheit
38function celsiusToFahrenheit(celsius: number): number {
39return (celsius * 9) / 5 + 32;
40}
4142// Utility function for fetching Wolfram Alpha data
43async function fetchWolframData(query: string) {
44const appId = 'K8UTGR-8Y5G3A3VTP';
45const url = `http://api.wolframalpha.com/v1/result?appid=${appId}&i=${encodeURIComponent(query)}`;
56}
5758// Utility function for fetching Alpha Vantage stock data
59async function fetchStockData(symbol: string) {
60const apiKey = 'TD7I78XY3N2AGKWP';
61const url = `https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=${symbol}&interval=5min&apikey=${apiKey}`;
62try {
63const data = await fetchJSON(url);
75}
7677async function getWorldState(): Promise<object> {
78// Ensure the table exists
79await ensureTableExists();
267</div>
268<script>
269async function fetchData() {
270try {
271const response = await fetch(window.location.href);
283`;
284285export default async function server(request: Request): Promise<Response> {
286if (request.method === 'GET' && request.headers.get('accept')?.includes('text/html')) {
287return new Response(html, {
10const NASA_API_KEY = 'vYg1cCNLVbcgNemMWuLEjoJsGOGbBXZjZjmwVwuV';
1112async function fetchNASAData() {
13const today = new Date().toISOString().split('T')[0];
14103}
104105export default async function server(request: Request): Promise<Response> {
106try {
107const nasaData = await fetchNASAData();
eclipsetodaymain.tsx1 match
5*/
67export default async function server(request: Request): Promise<Response> {
8try {
9// Hardcoded list of eclipses for 2024-2026