This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Hono } from 'hono' | |
import { jsxRenderer } from 'hono/jsx-renderer' | |
import { Suspense } from 'hono/jsx/streaming' | |
const app = new Hono() | |
const Component = async () => { | |
const res = await fetch('https://ramen-api.dev/shops/yoshimuraya') | |
const data = await res.json<{ shop: { name: string } }>() | |
return <div>{data.shop.name} 🍜</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const axios = require('axios'); // axios must be installed via npm i axios | |
const webhookURL = "https://outlook.office.com/webhook/1234567890"; // Replace with a valid webhool URL obtained by adding an "Incomming Webhook" connector to your teams channel | |
if (process.argv.length === 4) { | |
const title = process.argv[2]; | |
const message = process.argv[3]; | |
console.log(`${title}, ${message}`); | |
postMessageToTeams(title, message); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a Promise that resolves after ms time | |
var timer = function(ms) { | |
return new Promise(resolve => { | |
setTimeout(resolve, ms); | |
}); | |
}; | |
// Repeatedly generate a number starting | |
// from 0 after a random amount of time | |
var source = async function*() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>AudioPlayground</title> | |
<style>* {box-sizing: border-box;}</style> | |
</head> | |
<body> | |
<h3>AudioPlayground</h3> | |
<p>If you're happy and you know it, clap your hands!</p> | |
<script> | |
var Recording = function(cb){ |