Skip to content

Instantly share code, notes, and snippets.

View qcam's full-sized avatar

Cẩm Huỳnh qcam

View GitHub Profile
@qcam
qcam / data.md
Last active April 25, 2026 23:10
Iris channel performance — 2026-04-25

Iris Channel Performance — 2026-04-25 (full day)

Both nodes (a1 + b1), full day data (4693 log lines).


Channel Joins (1840 total)

Channel n avg p50 p95 p99 max
ChatChannel 1297 49ms 37ms 140ms 191ms 316ms
@qcam
qcam / iris-knowledge-pipeline-review.md
Created April 22, 2026 10:53
Iris knowledge storage pipeline — review and improvement proposals

Iris Knowledge Pipeline — Review & Improvement Proposals

Current Architecture (as-is)

Data model

  • persona_knowledges — knowledge metadata: name, instructions (text[]), context/operator scope
  • persona_knowledge_chunks — individual chunks: content (text), embedding (pgvector 384/1024), position
  • personas_knowledge_graphs — extracted entity/relationship graph per persona (single JSONB blob)
@qcam
qcam / time-extension-msgpack.rb
Created May 20, 2019 09:03
MessagePack Time extension unpacker in Ruby
require "msgpack"
class DateTimeExtension
def self.unpack(data)
case data.size
when 4
seconds = data.unpack("N")[0]
Time.at(seconds).utc
when 8
defmodule GCounter.Node do
use GenServer
def start_link(node_name) do
GenServer.start_link(__MODULE__, node_name, [name: node_name])
end
@impl true
def init(node_name) do
init_counter = %{node_name => 0}
[
{
"source": "quan-cam.com",
"url": "https://quan-cam.com/rss",
"category": "personal"
},
{
"source": "medium.com/@hqc",
"url": "https://medium.com/feed/@hqc",
"category": "personal"
@qcam
qcam / rfc822.ex
Last active January 4, 2024 10:37
nimble_parsec example with RFC822 datetime parser (https://www.ietf.org/rfc/rfc822.txt)
defmodule RFC822 do
import NimbleParsec
day =
choice([
string("Mon"),
string("Tue"),
string("Wed"),
string("Thu"),
string("Fri"),
{"data":{"build-a-blog-in-elixir-with-nabo-and-phoenix":[{"content":"# g","created_at":"2019-01-14T08:18:53.347875Z","user":{"avatar_url":"https://avatars2.githubusercontent.com/u/26930297?v=4","name":"Kalipts","provider":"github","provider_user_url":"https://github.com/Kalipts"}}],"chet-server-lam-gi-day":[{"content":"s","created_at":"2019-06-24T13:33:26.312600Z","user":{"avatar_url":"https://avatars2.githubusercontent.com/u/35627119?v=4","name":"Juniorsz","provider":"github","provider_user_url":"https://github.com/Juniorsz"}}],"chuyen-an-cap":[{"content":"Vậy nếu vi phạm Creative Commons License thì sẽ bị 'xử lý' như thế nào vậy anh?","created_at":"2018-04-22T14:40:23.413143Z","user":{"avatar_url":"https://avatars3.githubusercontent.com/u/15165794?v=4","name":"j1nz","provider":"github","provider_user_url":"https://github.com/j1nz"}},{"content":"[@j1nz](https://github.com/j1nz) Mình cũng chả muốn \"xử lý\" làm gì cả ☹️. Mình là developer, mình không phải luật sư. Mình chúc họ cắn rứt lương tâm vậy.","created
@qcam
qcam / sample.xml
Last active March 20, 2018 06:42
Benchmarking XML parser in Erlang/Elixir
<?xml version="1.0" encoding="UTF-8"?>
<breakfast_menu>
<food>
<name>Belgian Waffles</name>
<price>$5.95</price>
<description>Two of our famous Belgian Waffles with plenty of real maple syrup</description>
<calories>650</calories>
</food>
<food>
<name>Strawberry Belgian Waffles</name>

Keybase proof

I hereby claim:

  • I am qcam on github.
  • I am qcam (https://keybase.io/qcam) on keybase.
  • I have a public key whose fingerprint is 7EAD EE10 DB51 9180 986A 30B4 1BE7 CEA2 28E5 28A9

To claim this, I am signing this object:

@qcam
qcam / hub
Last active January 25, 2017 16:01
Sample config file for hub
# Place your file in ~/.config/hub
github.com:
- user: huynhquancam
oauth_token: XXX # personal token can be obtained from your Github > Settings > Security > Personal Token