anthropicProxymain.tsx1 match
1import Anthropic from "npm:@anthropic-ai/sdk@0.24.3";
23export default async function(req: Request): Promise<Response> {
4if (req.method === "OPTIONS") {
5return new Response(null, {
password_authmain.tsx5 matches
11};
1213async function createSessionTable(tableName: string) {
14await sqlite.execute(`CREATE TABLE ${tableName} (
15id TEXT NOT NULL PRIMARY KEY,
19}
2021async function createSession(tableName: string, valSlug: string): Promise<Session> {
22try {
23const expires_at = new Date();
39}
4041async function getSession(tableName: string, sessionID: string, valSlug: string): Promise<Session> {
42try {
43const { rows, columns } = await sqlite.execute({
80</html>`;
8182export function redirect(location: string): Response {
83return new Response(null, {
84headers: {
98const cookieName = "auth_session";
99100export function passwordAuth(next, options?: PasswordAuthOptions) {
101const sessionTable = options?.sessionTable || "password_auth_session";
102return async (req: Request) => {
resumeDetailsmain.tsx2 matches
1export default async function handler(req: Request): Promise<Response> {
2const resumeDetails = {
3"basics": {
129"highlights": [
130"Developed a straightforward request lifecycle, handling both static and dynamic content efficiently",
131"Implemented a flexible plugin system, enhancing extensibility and allowing for custom functionality in generated websites",
132"Implemented efficient caching techniques, including in-memory content caching and static file path caching, to boost performance",
133"Designed a flexible content source system, allowing for intuitive content organization based on directory structure",
sqliteExplorerAppREADME.md1 match
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable
35- [x] add export to CSV, and JSON (CSV and JSON helper functions written in [this val](https://www.val.town/v/nbbaier/sqliteExportHelpers). Thanks to @pomdtr for merging the initial version!)
36- [x] add listener for cmd+enter to submit query
resumeHandlermain.tsx1 match
4import { resumeConfig } from "https://esm.town/v/siygle/resumeConfig";
56export default async function resumeHandler(req: Request): Promise<Response> {
7if (req.method === "GET") {
8try {
48```
4950You can allow anyone to signup by returning a boolean from the verifyEmail function:
5152```ts
4import { deleteCookie, getCookies, setCookie } from "jsr:@std/http/cookie";
56async function createSession(email: string, hostname: string) {
7const sessionID = crypto.randomUUID();
8const expiresAt = new Date();
24}
2526async function getSession(sessionID: string, hostname: string) {
27try {
28const res = await sqlite.execute({
50}
5152async function deleteSession(sessionID: string) {
53await sqlite.execute({
54sql: `DELETE FROM lastlogin_session WHERE sessionID=?`,
65};
6667export function lastlogin(
68handler: (req: Request) => Response | Promise<Response>,
69options: LastLoginOptions,
marineMoccasinLizardmain.tsx10 matches
28"Have the ability to murder anyone without any consequences",
29"Have a tight knit and loyal friend group",
30"Have another set of eyes in the back of your head (they are fully functional)",
31"Have a very physically attractive romantic partner",
32"Be able to spawn pizzas by snapping your fingers (max 2 per 12 hours)",
36];
3738function App() {
39const [user, setUser] = useState<User | null>(null);
40const [answers, setAnswers] = useState<Answer[]>([]);
106}
107108function SplashScreen({ onGetStarted }: { onGetStarted: () => void }) {
109return (
110<div className="splash-screen">
132}
133134function TabBar() {
135const location = useLocation();
136const tabs = [
163}
164165function Game({ user, saveAnswer }: { user: User | null; saveAnswer: (answer: Answer, losingAnswer: string) => void }) {
166const getRandomQuestion = useCallback((): Question => {
167const availableOptions = [...ANSWER_OPTIONS];
198}
199200function Answers(
201{ user, answers, rankings, clearAnswers }: {
202user: User | null;
237}
238239function Profile({ user, setUser }: { user: User | null; setUser: (user: User | null) => void }) {
240const [username, setUsername] = useState("");
241277}
278279function client() {
280createRoot(document.getElementById("root")!).render(<App />);
281}
285}
286287async function server(request: Request): Promise<Response> {
288const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
289const KEY = "marineMoccasinLizard";
369}
370371async function updateEloRankings(sqlite: any, KEY: string, winningAnswer: string, losingAnswer: string) {
372const K = 32; // This is the maximum score change per match
373
RefiComparisonmain.tsx3 matches
20}
2122function App() {
23const [offers, setOffers] = useState<Offer[]>([]);
24const [newOffer, setNewOffer] = useState<Omit<Offer, 'id' | 'monthlyPayment' | 'totalInterest'>>({
354}
355356function client() {
357createRoot(document.getElementById("root")).render(<App />);
358}
362}
363364async function server(request: Request): Promise<Response> {
365const { blob } = await import("https://esm.town/v/std/blob");
366const KEY = "RefiComparison";
extractTextmain.tsx1 match
1import { fetch } from "https://esm.town/v/std/fetch";
23export async function extractText(data, name) {
4const fileUrl =
5"https://www.gcmgrosvenor.com/wp-content/uploads/Private-Credit-Co-investing-GCM-Grosvenor.pdf";