Skip to content

Instantly share code, notes, and snippets.

@taslabs-net
taslabs-net / OVERVIEW.md
Last active July 31, 2025 15:27
A Discord bot that combines AI models (Anthropic Claude, OpenAI GPT, Meta Llama) with personal document search, built with Cloudflare Workers, R2, D1, AutoRAG, Discord, and Docker

Cloudflare-Powered Discord AI Bot with Role-Based Document Intelligence

A Discord bot that combines AI models (Anthropic Claude, OpenAI GPT, and Meta Llama via Cloudflare Workers AI) with channel-based document search, built entirely on Cloudflare's edge platform. Share knowledge within Discord channels with role-based access control - if you can see the channel, you can access its AI and documents.

Why This Matters: A Real Scenario

Imagine you're at a client meeting. They ask about specific terms in a contract you uploaded months ago. Instead of awkwardly searching through emails or saying "I'll get back to you," you simply pull out your phone, open Discord, and type:

#docs What are the termination clauses in the Acme Corp agreement?
@GavinRay97
GavinRay97 / file.ts
Created May 13, 2020 22:08
Vue 3 Composition API Typescript Component Props
import { defineComponent, computed, ref } from '@vue/composition-api'
interface User {
firstName: string
lastName: number
}
export default defineComponent({
props: {
user: {
// ====== tests
import { nextTick } from 'vue'
import { mount } from '../framework'
import { FilterPosts } from '../app/FilterPosts'
describe('FilterPosts', () => {
it('renders today posts by default', async () => {
const wrapper = mount(FilterPosts)
@ryanoglesby08
ryanoglesby08 / server.js
Last active June 21, 2024 14:11
A node.js SPA server that serves static files and an index.html file for all other routes.
/*
Incredibly simple Node.js and Express application server for serving static assets.
DON'T USE THIS IN PRODUCTION!
It is meant for learning purposes only. This server is not optimized for performance,
and is missing key features such as error pages, compression, and caching.
For production, I recommend using an application framework that supports server-side rendering,
such as Next.js. https://nextjs.org
@renancouto
renancouto / exploit-urls.md
Last active February 1, 2023 09:36
A collection of weird URLs that I think are used to exploit security vulnerabilities on web apps
  • /manager/html (Apache Tomcat)
  • http://123.249.24.233/POST_ip_port.php
  • /tmUnblock.cgi
  • /HNAP1/
  • /phpMyAdmin/scripts/setup.php (PHPMyAdmin)
  • /pma/scripts/setup.php
  • /myadmin/scripts/setup.php
  • /MyAdmin/scripts/setup.php
  • /vyvy/vyv/vy.php
  • /cgi-sys/php5
@willurd
willurd / web-servers.md
Last active August 5, 2025 00:46
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@benyarb
benyarb / vimium_colemak
Last active March 29, 2025 22:02
Vimium Colemak Keybindings
# Custom key mappings
map n scrollDown
map N previousTab
map e scrollUp
map E nextTab
map i scrollRight
map I goForward
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')