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 { Agent, AgentNamespace, routeAgentRequest } from 'agents'; | |
import { GoogleGenerativeAI, HarmCategory, HarmBlockThreshold } from '@google/generative-ai'; | |
// Define the environment variables and bindings required by the Worker and Agent | |
interface Env { | |
// Binding for the Agent Durable Object | |
SECURITY_AUDIT_AGENT: AgentNamespace<SecurityAuditAgent>; | |
// Secret holding the Google Gemini API Key | |
GEMINI_API_KEY: string; | |
// Optional: Secret holding a GitHub API token for higher rate limits / private repos |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Simple Cloudflare Agent Chat</title> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
max-width: 800px; |
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
{ | |
"$schema": "https://zed.dev/schema/themes/v0.1.0.json", | |
"name": "Hypersubatomic", | |
"author": "Converted from VSCode theme", | |
"themes": [ | |
{ | |
"name": "Hypersubatomic Dark", | |
"appearance": "dark", | |
"style": { | |
"background": "#0F111A", |
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 { Solicitud, Respuesta, ContextoDeEjecucion, Entorno, Prometo, URL } from "./workers.es"; | |
export default { | |
async obtener(solicitud: Solicitud, entorno: Entorno, contexto: ContextoDeEjecucion): Prometo<Respuesta> { | |
let url = new URL(solicitud.url); | |
let nombre = url.parametrosBusqueda.get("nombre") || "mundo"; | |
return Respuesta.json({ | |
mensaje: `hola ${nombre}`, | |
}); |
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 { BskyAgent } from "@atproto/api"; | |
type Env = { | |
BLUESKY_APP_PASSWORD: string; | |
POST_TOKEN: string; | |
}; | |
export default { | |
async fetch(request, env, ctx): Promise<Response> { | |
let url = new URL(request.url); |
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
https://docs.google.com/presentation/d/1GXCaoat2CEcPu9lJ9eJDjzVW_Vuqr-Yq7kJolfOpBG0/edit?usp=sharing |
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
const API_URL = "https://www.purpleair.com/json?show="; | |
// Params: lat, lng, zoom | |
const MAP_URL = "https://fire.airnow.gov/" | |
// const CACHE_FILE = "aqi_data.json" | |
// Find a nearby PurpleAir sensor ID via https://fire.airnow.gov/ | |
// Click a sensor near your location: the ID is the trailing integers | |
// https://www.purpleair.com/json has all sensors by location & ID. | |
let SENSOR_ID = args.widgetParameter || "19066" | |
const HEADER_COLOR = "#222222" |
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
version: 2.0 | |
jobs: | |
# Base test configuration for Go library tests Each distinct version should | |
# inherit this base, and override (at least) the container image used. | |
"test": &test | |
docker: | |
- image: circleci/golang:latest | |
working_directory: /go/src/github.com/gorilla/mux | |
steps: &steps |
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
language: go | |
matrix: | |
include: | |
- go: 1.7.x | |
- go: 1.8.x | |
- go: 1.9.x | |
- go: 1.10.x | |
- go: 1.11.x |
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
SELECT | |
repo_name, | |
path | |
FROM ( | |
SELECT | |
id, | |
repo_name, | |
path | |
FROM | |
`bigquery-public-data.github_repos.files` |
NewerOlder