Skip to content

Instantly share code, notes, and snippets.

View didavid61202's full-sized avatar

David Tai didavid61202

View GitHub Profile
@danielroe
danielroe / settings.json
Last active July 15, 2024 12:07
VScode settings for a minimal UI
{
// Disable telemetry
"telemetry.telemetryLevel": "off",
// Zen mode
"zenMode.fullScreen": false,
"zenMode.hideTabs": true,
"zenMode.centerLayout": false,
// Theming
"workbench.iconTheme": "city-lights-icons-vsc",
"editor.fontFamily": "Dank Mono",
@lukeocodes
lukeocodes / Breadcrumbs.vue
Last active April 2, 2024 14:01
A breadcrumbs component for Nuxt3
<script lang="ts" setup>
const route = useRoute();
const router = useRouter();
const getBreadcrumbs = () => {
const fullPath = route.path;
const requestPath = fullPath.startsWith("/")
? fullPath.substring(1)
: fullPath;
const crumbs = requestPath.split("/");
@rain-1
rain-1 / LLM.md
Last active July 18, 2024 22:37
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@Atinux
Atinux / sse.ts
Last active July 16, 2024 13:45
SSE endpoint example with Nuxt 3
// ~/server/api/sse.ts
export default defineEventHandler(async (event) => {
if (!process.dev) return { disabled: true }
// Enable SSE endpoint
setHeader(event, 'cache-control', 'no-cache')
setHeader(event, 'connection', 'keep-alive')
setHeader(event, 'content-type', 'text/event-stream')
setResponseStatus(event, 200)