Skip to content

Instantly share code, notes, and snippets.

@croath
croath / 中转站-ai-router-api-import-ccswitch.md
Last active June 22, 2026 04:49
中转站 API 导入到 CC Switch

中转站 API 导入到 CC Switch

CC Switch 是一个跨平台的 AI CLI 配置管理工具,可用于集中管理 Claude Code、Codex、Gemini CLI、OpenCode 等工具的模型提供商(Provider)配置。它把 Base URL、API Key、模型名称等信息统一保存,让你在多个 CLI 工具或多套 Provider 之间一键切换,避免反复修改环境变量或配置文件。

下载安装

CC Switch 是开源项目,源码托管在 GitHub:farion1231/cc-switch

  1. 打开 Releases 页面
  2. 在最新版本的资源列表中,根据自己的操作系统选择对应的安装包:
@croath
croath / emoji.md
Last active October 9, 2016 08:05
iOS 10 Emojis

iOS 10 Emojis

  • SMILEYS & PEOPLE

    😀😬😁😂😃😄😅😆😇😉😊🙂🙃☺️😋😌😍😘😗😙😚😜😝😛🤑🤓😎🤗😏😶😐😑😒🙄🤔😳😞😟😠😡😔😕🙁☹️😣😖😫😩😤😮😱😨😰😯😦😧😢😥😪😓😭😵😲🤐😷🤒🤕😴💤💩😈👿👹👺👻💀☠️👽👾🤖😺😸😹😻😼😽🙀😿😾🙌👏👍👎👊✊👋👈👉👆👇👌☝️✌️✋🖐👐💪🙏🖖🤘🖕✍️💅👄👅👂👃👁👀🗣👤👥👶👦👧👨👩👱‍♀️👱👴👵👲👳‍♀️👳👮‍♀️👮👷‍♀️👷💂‍♀️💂🕵️‍♀️🕵🎅👸👰👰👼👼🙇‍♀️🙇💁💁‍♂️🙅🙅‍♂️🙆🙆‍♂️🙋🙋‍♂️🙎🙎‍♂️🙍🙍‍♂️💇💇‍♂️💆💆‍♂️💃👯👯‍♂️🚶‍♀️🚶🏃‍♀️🏃👫👭👬💑👩‍❤️‍👩👨‍❤️‍👨💏👩‍❤️‍💋‍👩👨‍❤️‍💋‍👨👪👨‍👩‍👧👨‍👩‍👧‍👦👨‍👩‍👦‍👦👨‍👩‍👧‍👧👩‍👩‍👦👩‍👩‍👧👩‍👩‍👧‍👦👩‍👩‍👦‍👦👩‍👩‍👧‍👧👨‍👨‍👦👨‍👨‍👧👨‍👨‍👧‍👦👨‍👨‍👦‍👦👨‍👨‍👧‍👧👩‍👦👩‍👧👩‍👧‍👦👩‍👦‍👦👩‍👧‍👧👨‍👦👨‍👧👨‍👧‍👦👨‍👦‍👦👨‍👧‍👧👚👕👖👔👗👙👘💄💋👣👠👡👢👞👟👒🎩🎓👑⛑🎒👝👛👜💼👓🕶💍🌂

  • ANIMALS & NATURE

    🐶🐱🐭🐹🐰🐻🐼🐨🐯🦁🐮🐷🐽🐸🐙🐵🙈🙉🙊🐒🐔🐧🐦🐤🐣🐥🐺🐗🐴🦄🐝🐛🐌🐞🐜🕷🦂🦀🐍🐢🐠🐟🐡🐬🐳🐋🐊🐆🐅🐃🐂🐄🐪🐫🐘🐐🐏🐑🐎🐖🐀🐁🐓🦃🕊🐕🐩🐈🐇🐿🐾🐉🐲🌵🎄🌲🌳🌴🌱🌿☘️🍀🎍🎋🍃🍂🍁🌾🌺🌻🌹🌷🌼🌸💐🍄🌰🎃🐚🕸🌎🌍🌏🌕🌖🌗🌘🌑🌒🌓🌔🌚🌝🌛🌜🌞🌙⭐️🌟💫✨☄️☀️🌤⛅️🌥🌦☁️🌧⛈🌩⚡️🔥💥❄️🌨☃️⛄️🌬💨🌪🌫☂️☔️💧💦🌊

@croath
croath / NSObject+Cool.h
Created July 18, 2016 08:06
Availability
//
// NSObject+Cool.h
// PatriciaTest
//
// Created by croath on 7/18/16.
// Copyright © 2016 Croath. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <Availability.h>
@croath
croath / Apple Mobile Product Names
Created March 23, 2016 08:31
Apple Mobile Product Names
@"i386" on 32-bit Simulator
@"x86_64" on 64-bit Simulator
@"iPod1,1" on iPod Touch
@"iPod2,1" on iPod Touch Second Generation
@"iPod3,1" on iPod Touch Third Generation
@"iPod4,1" on iPod Touch Fourth Generation
@"iPod7,1" on iPod Touch 6th Generation
@"iPhone1,1" on iPhone
@"iPhone1,2" on iPhone 3G
@"iPhone2,1" on iPhone 3GS
NSURL *rtfPath = [[NSBundle mainBundle] URLForResource: @"description_ar" withExtension:@"rtf"];
NSAttributedString *attributedStringWithRtf = [[NSAttributedString alloc] initWithFileURL:rtfPath options:@{NSDocumentTypeDocumentAttribute:NSRTFTextDocumentType} documentAttributes:nil error:nil];
self.textView.attributedText=attributedStringWithRtf;
@croath
croath / pearson.rb
Created August 14, 2014 09:38
pearson
def ruby_pearson(x,y)
n=x.length
sumx=x.inject(0) {|r,i| r + i}
sumy=y.inject(0) {|r,i| r + i}
sumxSq=x.inject(0) {|r,i| r + i**2}
sumySq=y.inject(0) {|r,i| r + i**2}
prods=[]; x.each_with_index{|this_x,i| prods << this_x*y[i]}
var mc:CUnsignedInt = 0
var mlist:UnsafePointer<Method> = class_copyMethodList(UIImageView.classForCoder(), &mc);
println("\(mc) methods")
for var i:CUnsignedInt = 0; i < mc; i++ {
println("Method #\(i): \(sel_getName(method_getName(mlist.memory)))")
mlist = mlist.succ()
}
- (NSArray*)findAllLabelsOfView:(UIView*)view{
NSMutableArray *array = [NSMutableArray array];
NSArray *subViews = view.subviews;
if ([view isKindOfClass:[UILabel class]]) {
[array addObject:view];
}
if (subViews.count) {
[subViews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
[array addObjectsFromArray:[self findAllLabelsOfView:obj]];
}];
@croath
croath / rmapp.rb
Created April 23, 2014 06:52
Remove specific apps installed in iPhone simulator.
require 'fileutils'
class String
def numeric?
return true if self =~ /^\d+$/
true if Float(self) rescue false
end
end
def remove_app (app_name)
@croath
croath / commands.sh
Created April 18, 2014 19:03
show command using rate
history | awk '{CMD[$2]++;count++;}END { for (a in CMD)\
print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" \
| column -c3 -s " " -t | sort -nr | nl | head -n10