- No staging area: Changes automatically tracked in working-copy commit
- Bookmarks vs Branches: Bookmarks are just pointers, not states you're "on"
- Change IDs: Stable identifiers that persist across rewrites (unlike commit hashes)
- Working-copy commit: Actual commit that gets automatically amended after each command
- Snapshot-based: Each commit records entire repository state
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
| #!/usr/bin/env bun | |
| import { $, sleep } from "bun"; | |
| // ── Configuration ────────────────────────────────────────────────── | |
| interface Step { | |
| cmd: string; | |
| pause?: number; // seconds to wait after command finishes (default: 1.5) | |
| } | |
| interface DemoConfig { |
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
| FROM debian:bookworm-slim | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| unzip \ | |
| git \ | |
| ca-certificates \ | |
| nodejs \ | |
| npm \ | |
| && rm -rf /var/lib/apt/lists/* |
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
| export SSL_VERIFY_SERVER=NO | |
| q){"x"$x} each 2 cut "abcdef" | |
| q).Q.hg`$":https://www.kx.com" | |
| q)(-26!)[] | |
| q).Q.hg`:https://gmail.com | |
| q).color.red: "\033[0;31m" | |
| q).color.green: "\033[0;32m" | |
| q).color.yellow: "\033[0;33m" | |
| q).color.blue: "\033[0;34m" |
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 Data.List (sort, group, find, uncons) | |
| import Data.Maybe (fromMaybe) | |
| main :: IO () | |
| main = do | |
| input <- readFile "aoc1.txt" | |
| let | |
| (left, right) = unzip $ map (\s -> case words s of [l, r] -> (read l :: Int, read r :: Int)) $ lines input | |
| repeating = map (\(x:xs) -> (x, length (x:xs))) . group . sort $ sort right | |
| distance1 = sum $ zipWith (\ l r -> abs $ l - r) (sort left) (sort right) |
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
| du -h -d 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
| object Solution { | |
| def moveZeroes(nums: Array[Int]): Unit = { | |
| var lastUpdated = 0 | |
| nums.zipWithIndex.foreach { case (e, i) => { | |
| if (i != lastUpdated) { | |
| nums.update(lastUpdated, e) | |
| nums.update(i, 0) | |
| } | |
| if (e != 0) { | |
| lastUpdated += 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
| package lc | |
| import scala.collection.mutable | |
| def twoSum (nums: Array[Int], target: Int): Option[Array[Int]] = { | |
| val map = mutable.HashMap[Int, Int]() | |
| nums.zipWithIndex.foreach((e, i) => { | |
| map.get(target - i) match { | |
| case None => map.put(i, e) | |
| case Some(v) => return Some(Array(i, v)) |
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
| module TwoSum where | |
| import Data.Array (head, tail) | |
| import Data.HashMap | |
| import Data.Maybe | |
| import Effect | |
| import Prelude | |
| import Data.Foldable (for_) | |
| import Effect.Console (log) |
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
| module TwoSum exposing (twoSum) | |
| import Dict exposing (Dict) | |
| twoSum : List Int -> Int -> Maybe (List Int) | |
| twoSum nums target = | |
| twoSumInternal nums target 0 Dict.empty | |
| twoSumInternal : List Int -> Int -> Int -> Dict Int Int -> Maybe (List Int) | |
| twoSumInternal nums target i dict = |
NewerOlder