Skip to content

Instantly share code, notes, and snippets.

View tiye's full-sized avatar
💭
Make Cirru great again!

题叶 tiye

💭
Make Cirru great again!
View GitHub Profile
@tiye
tiye / edit.md
Last active July 21, 2025 03:54
Trick to override baseUrl for Gemini CLI

find in node_modules/

  • in @google/gemini-cli-core/dist/src/core/contentGenerator.js edit createContentGenerator, add baseUrl in httpOptions.
  • in @google/gemini-cli-core/dist/src/core/geminiChat.js edit contentGenerator.generateContent, add httpOptions as well
@tiye
tiye / Try.metal
Last active July 12, 2025 07:13
用于 https://github.com/Triadica/CompositorDemo 计算粒子轨迹的脚本
/*
This file provides a compute function that can be dyanamically loaded
*/
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
typedef struct {
1
00:00:00,833 --> 00:00:05,433
[音乐]
2
00:00:07,733 --> 00:00:12,100
[音乐]
3
00:00:12,733 --> 00:00:18,166
@tiye
tiye / spatial-events.swift
Created March 30, 2025 15:36
spatial-events.swift
```
LampsRenderer received spatial event: SpatialEventCollection(events: [
SwiftUI.SpatialEventCollection.Event.ID(value: 1): SwiftUI.SpatialEventCollection.Event(
id: SwiftUI.SpatialEventCollection.Event.ID(value: 1),
timestamp: 66374.834269625,
kind: SwiftUI.SpatialEventCollection.Event.Kind.indirectPinch,
location: (0.0, 0.0),
phase: SwiftUI.SpatialEventCollection.Event.Phase.active,
modifierKeys: SwiftUI.EventModifiers(rawValue: 0),
_inputDevicePose: Optional(SwiftUI.SpatialEventCollection.Event.InputDevicePose(
const inner_width: f32 = {%inner_width%};
const inner_height: f32 = {%inner_height%};
const PI: f32 = 3.1415926535897932384626433832795;
@fragment
fn fragment_main(vs_out: VertexOut) -> @location(0) vec4<f32> {
// provide (x,y) in pixels, center is (0,0)
let pos = vs_out.pos;
let x = pos.x * inner_width * 0.5;
@tiye
tiye / config.toml
Created March 5, 2025 12:33
Custom config toml
# Use different pre-set defaults than the global defaults.
#
# See `src/bootstrap/defaults` for more information.
# Note that this has no default value (x.py uses the defaults in `config.example.toml`).
profile = 'dist'
[llvm]
download-ci-llvm = false
[build]
@tiye
tiye / rust-compile.log
Created March 5, 2025 07:14
some logs compiling Rust locally
Building bootstrap
Finished `dev` profile [unoptimized] target(s) in 0.98s
WARNING: The `change-id` is missing in the `config.toml`. This means that you will not be able to track the major changes made to the bootstrap configurations.
NOTE: to silence this warning, add `change-id = 127866` at the top of `config.toml`
Building stage0 library artifacts (aarch64-apple-darwin)
Compiling cc v1.0.99
Compiling core v0.0.0 (/Users/jon.chen/work/container/rust/library/core)
Compiling libc v0.2.155
Compiling memchr v2.5.0
Compiling std v0.0.0 (/Users/jon.chen/work/container/rust/library/std)
@tiye
tiye / AttractorView.swift
Last active February 6, 2025 10:14
outdated demo of attractor rendering in visionOS
import Metal
import RealityKit
import SwiftUI
struct AttractorView: View {
let rootEntity: Entity = Entity()
let allSize: Int = 200000
var vertexCapacity: Int {
return allSize * 4
}
@tiye
tiye / cp.sh
Created January 17, 2025 17:59
Calcit command for copy oneliner
caps download calcit-lang/calcit-clipboard@main
cr eval --dep calcit-clipboard/ 'thread-first (range 100) (map inc) (.join-str "|,") clipboard.core/copy!'
@tiye
tiye / ga4-multiply.txt
Last active December 1, 2024 05:00
expanding 4D geometric algebra multiplication
/// struct holding 4D geometric algebra(contains faults....)
struct GometricAlgebra4D {
s: f32;
x: f32;
y: f32;
z: f32;
w: f32;
xy: f32;
yz: f32;