US Congress Stock Trading API examples & templates
Use these vals as a playground to view and fork US Congress Stock Trading API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
![pomdtr avatar](https://images.clerk.dev/oauth_github/img_2RCoAITJZH1QencEgtVjh4Qirj4.jpeg)
pomdtr
email_auth
Script
Email Auth for Val Town β οΈ Require a pro account (needed to send email to users) Usage Create an http server, and wrap it in the emailAuth middleware. import { emailAuth } from "https://esm.town/v/pomdtr/email_auth"
import { verifyUserEmail } from "https://esm.town/v/pomdtr/verifyUserEmail"
export default emailAuth((req) => {
return new Response(`your mail is ${req.headers.get("X-User-Email")}`);
}, {
verifyEmail: verifyUserEmail
}); π‘ If you do not want to put your email in clear text, just move it to an env var (ex: Deno.env.get("email") ) If you want to allow anyone to access your val, just use: import { emailAuth } from "https://esm.town/v/pomdtr/email_auth"
export default emailAuth((req) => {
return new Response(`your mail is ${req.headers.get("X-User-Email")}`);
}, {
verifyEmail: (_email) => true
}); Each time someone tries to access your val but is not allowed, you will get an email with: the email of the user trying to log in the name of the val the he want to access You can then just add the user to your whitelist to allow him in (and the user will not need to confirm his email again) ! TODO [ ] Add expiration for verification codes and session tokens [ ] use links instead of code for verification [ ] improve errors pages
6
dthyresson
ideas
Script
Ideas Movie Mashup with AI - done! Bedtime Story genertator - done! Drum machine pattern from PDF maker Movie emoji plots: "Sure, here's a summarized plot of "Pretty in Pink" using only emoji, along with their explanations, including iconic scenes:" Sure, here's a summarized plot of "Pretty in Pink" using only emoji, along with their explanations, including iconic scenes:
π©βπ€π«πππ¦π¨βπ§ππ ππΈβ€οΈπ©πΈππ¨π«
1. **π©βπ€ (Girl with Punk Hair)** - Andie, the main character, who has a unique and alternative style.
2. **π« (School)** - The high school setting where the story takes place.
3. **π (Dress)** - The pink prom dress that Andie makes for herself, representing her individuality.
4. **π (Broken Heart)** - The heartbreaks and romantic tensions throughout the movie.
5. **π¦ (Boy)** - Blane, the rich boy Andie falls for.
6. **π¨βπ§ (Father and Daughter)** - Andie's relationship with her supportive, but struggling father.
7. **π (Books)** - The academic environment and high school dynamics.
8. **π (High-Heeled Shoe)** - The social divide between the rich "preppies" and the less affluent students.
9. **π (Dancer)** - The iconic prom scene.
10. **πΈ (Guitar)** - The music and band scenes, especially featuring Duckie.
11. **β€οΈ (Heart)** - The romantic plot and relationships.
12. **π© (Top Hat)** - Duckie's unique style and his memorable entrance at the prom.
13. **π (Car)** - Andie's car, which she often uses to get around.
14. **π¨ (Palette)** - Andie's creative and artistic side, including her job at the record store.
15. **π« (Couple)** - The final pairing and resolution of romantic relationships.
0
g
vtdb
Script
Val Town Database This val exports vtdb , a correctly typed Kysely instance
to query the @sqlite.db database containing public vals. Example usage: import { vtdb } from 'https://esm.town/v/g/vtdb';
const vals = await vtdb.selectFrom('vals')
.selectAll()
.orderBy('created_at desc')
.limit(5)
.execute();
console.log(vals.map((val) => val.name));
1