Skip to content

Instantly share code, notes, and snippets.

@jimytc
jimytc / outline.md
Created April 16, 2026 17:01 — forked from coodoo/outline.md
「第二屆 AI 取暖會」講義文字稿

/* 前言 -------------------------------------------------- */

簡介

這是 Jeremy 於 2026-03-07 於第二屆「 AI 取暖會」中分享過去十八個月來與 AI/Agent 搏鬥的實戰心得。

影片

https://www.youtube.com/watch?v=9kb7oCamafE

@jimytc
jimytc / llm-wiki.md
Created April 7, 2026 15:15 — forked from karpathy/llm-wiki.md
llm-wiki

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@jimytc
jimytc / Dockerfile
Created February 10, 2022 10:21 — forked from tobi/Dockerfile
# Rails production setup via SQLite3 made durable by https://litestream.io/
# Copy this to Dockerfile on a fresh rails app. Deploy to fly.io or any other container engine.
#
# try locally: docker build . -t rails && docker run -p3000:3000 -it rails
#
# in production you might want to map /data to somewhere on the host,
# but you don't have to!
#
FROM ruby:3.0.2
# frozen_string_literal: true
source 'https://rubygems.org'
gem 'activesupport'
gem 'minitest'
gem 'minitest-reporters', '>= 0.5.0'
gem 'rr'
gem 'rubocop'
@jimytc
jimytc / rbenv_migrate_gems.sh
Created October 24, 2018 14:13 — forked from arashm/rbenv_migrate_gems.sh
migrate GEMs from rbenv cache to the newer version of ruby (without internet) Thanks to Austin Ziegler - http://stackoverflow.com/questions/13649241/copying-gems-from-previous-version-of-ruby-in-rbenv
#!/bin/sh
# if you're using ZSH, change the shebang above to "#!/bin/zsh -i"
if [ ${#} -ne 2 ]; then
echo >&2 Usage: $(basename ${0}) old-version new-version
exit 1
fi
home_path=$(cd ~; pwd -P)
old_version=${1}
class Pen
include Comparable
attr :serialNumber, :length
def initialize(serialNumber, length)
@serialNumber = serialNumber
@length = length
end
def to_s
import java.util.ArrayList;
import java.util.Collections;
public class Pen implements Comparable<Pen> {
private String serialNumber;
private int length;
public Pen(String serialNumber, int length) {
this.serialNumber = serialNumber;
@jimytc
jimytc / comparing_enumerator_and_lazy.rb
Created September 23, 2018 07:58
Compare Enumerator and Enumerator::Lazy
# Regular way
(1..1_000_000_000).select(&:even?)
.map { |i| i**2 }
.first(10)
# Lazy way
(1..1_000_000_000).lazy
.select(&:even?)
.map { |i| i**2 }
.first(10)
ActiveRecord::Schema.define do
create_table :posts do |table|
table.string :title
table.string :content
end
end
class Post < ActiveRecord::Base
end
irb(main):023:0> uri = URI('http://www.google.com')
=> #<URI::HTTP http://www.google.com>
irb(main):059:0> Net::HTTP.get(uri)
D, [2018-08-13T22:33:30.030400 #19738] DEBUG -- : [httplog] Connecting: www.google.com:80
D, [2018-08-13T22:33:30.055285 #19738] DEBUG -- : [httplog] Sending: GET http://www.google.com:80/
D, [2018-08-13T22:33:30.055377 #19738] DEBUG -- : [httplog] Header: accept-encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
D, [2018-08-13T22:33:30.055412 #19738] DEBUG -- : [httplog] Header: accept: */*
D, [2018-08-13T22:33:30.055579 #19738] DEBUG -- : [httplog] Header: user-agent: Ruby
D, [2018-08-13T22:33:30.055605 #19738] DEBUG -- : [httplog] Header: host: www.google.com
D, [2018-08-13T22:33:30.055646 #19738] DEBUG -- : [httplog] Data: