https://www.npmjs.com/package/next-themes
This file contains hidden or 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 { Effect, Schema, Console } from "effect"; | |
| import { | |
| FetchHttpClient, | |
| HttpClient, | |
| HttpClientRequest, | |
| HttpClientResponse, | |
| } from "@effect/platform"; | |
| // ============================================================================ | |
| // Custom Errors (Effect best practice - use tagged errors) |
This file contains hidden or 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
| // Zed settings | |
| // | |
| // For information on how to configure Zed, see the Zed | |
| // documentation: https://zed.dev/docs/configuring-zed | |
| // | |
| // To see all of Zed's default settings without changing your | |
| // custom settings, run `zed: open default settings` from the | |
| // command palette (cmd-shift-p / ctrl-shift-p) | |
| { | |
| "buffer_font_family": "Monaspace Krypton", |
This file contains hidden or 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
| #include <iostream> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <set> | |
| using namespace std; | |
| // Function to calculate factorial | |
| long long factorial(int n) { | |
| if (n <= 1) return 1; | |
| long long result = 1; |
This file contains hidden or 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 { Config, Console, Effect, Layer, Schema } from "effect"; | |
| import { Prompt } from "@effect/cli"; | |
| import { AiChat, AiTool, AiToolkit } from "@effect/ai"; | |
| import { AnthropicClient, AnthropicLanguageModel } from "@effect/ai-anthropic"; | |
| import { BunContext, BunRuntime } from "@effect/platform-bun"; | |
| import * as FetchHttpClient from "@effect/platform/FetchHttpClient"; | |
| import {OpenAiClient, OpenAiLanguageModel} from "@effect/ai-openai" | |
This file contains hidden or 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 { Effect ,Data} from "effect"; | |
| import { Schema } from "@effect/schema"; | |
| interface Todo{ | |
| id: number; | |
| title: string; | |
| } | |
| const TodosSchema = Schema.Array( | |
| Schema.Struct({ |
This file contains hidden or 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
| "use client"; | |
| import React, { useRef, useState, useMemo } from "react"; | |
| import { Canvas, useFrame } from "@react-three/fiber"; | |
| import { XR, VRButton, useXR, createXRStore } from "@react-three/xr"; | |
| import { OrbitControls, Text } from "@react-three/drei"; | |
| import { Mesh } from "three"; | |
| // Animated cube component | |
| function AnimatedCube({ position, color = "orange" }: { position: [number, number, number]; color: string }) { | |
| const meshRef = useRef<Mesh>(null); |
This file contains hidden or 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
| // --- Day 9: Disk Fragmenter --- | |
| // Another push of the button leaves you in the familiar hallways of some friendly amphipods! Good thing you each somehow got your own personal mini submarine. The Historians jet away in search of the Chief, mostly by driving directly into walls. | |
| // While The Historians quickly figure out how to pilot these things, you notice an amphipod in the corner struggling with his computer. He's trying to make more contiguous free space by compacting all of the files, but his program isn't working; you offer to help. | |
| // He shows you the disk map (your puzzle input) he's already generated. For example: | |
| // 2333133121414131402 | |
| // The disk map uses a dense format to represent the layout of files and free space on the disk. The digits alternate between indicating the length of a file and the length of free space. |
This file contains hidden or 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 Raw = `....h.....Q..............Y........................ | |
| ...............................Y........C......... | |
| ...............m..........x................B...... | |
| ........................Y..............qB......... | |
| ......g4.........................h..Y.....q...c... | |
| ................n.....R........................... | |
| .......................................w........5. |
This file contains hidden or 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
| // --- Day 7: Bridge Repair --- | |
| // The Historians take you to a familiar rope bridge over a river in the middle of a jungle. The Chief isn't on this side of the bridge, though; maybe he's on the other side? | |
| // When you go to cross the bridge, you notice a group of engineers trying to repair it. (Apparently, it breaks pretty frequently.) You won't be able to cross until it's fixed. | |
| // You ask how long it'll take; the engineers tell you that it only needs final calibrations, but some young elephants were playing nearby and stole all the operators from their calibration equations! They could finish the calibrations if only someone could determine which test values could possibly be produced by placing any combination of operators into their calibration equations (your puzzle input). | |
| // For example: |
NewerOlder