Skip to content

Instantly share code, notes, and snippets.

View onevcat's full-sized avatar
🐭

Wei Wang onevcat

🐭
View GitHub Profile
@onevcat
onevcat / argue_result.txt
Created April 11, 2026 01:12
A real run case of argue
➜ argue git:(master) npx argue run --task "研究这个 issue 的解法:https://github.com/onevcat/argue/issues/22" --action "根据讨论结 果,实际解决这个issue,开PR" --verbose
[argue] run started
config: /Users/onevcat/.config/argue/config.json
requestId: argue_1775868590900
task: 研究这个 issue 的解法:https://github.com/onevcat/argue/issues/22
agents: claude-agent, codex-agent
rounds: 2..3 | composer: representative
events: /Users/onevcat/.argue/output/argue_1775868590900/events.jsonl
[argue] initial#0 dispatched -> claude-agent, codex-agent
[argue] initial#0 codex-agent responded (claims+6, judgements=0, votes=0)
{"label":"Coverage","message":"61.4%","schemaVersion":1,"color":"yellow"}
@onevcat
onevcat / ATS.plist
Last active July 4, 2025 07:17
Fuck off ATS
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
@onevcat
onevcat / MonoSingleton.cs
Created July 18, 2013 00:37
Mono singleton Class. Extend this class to make singleton component.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Mono singleton Class. Extend this class to make singleton component.
/// Example:
/// <code>
/// public class Foo : MonoSingleton<Foo>
/// </code>. To get the instance of Foo class, use <code>Foo.instance</code>
@onevcat
onevcat / Default.swift
Created November 10, 2020 03:56
Sample code of using Default to decode a property to the default value
import UIKit
protocol DefaultValue {
associatedtype Value: Decodable
static var defaultValue: Value { get }
}
@propertyWrapper
struct Default<T: DefaultValue> {
var wrappedValue: T.Value
@onevcat
onevcat / Jitouch-Restarter
Created February 15, 2016 04:14
This gist kill Jitouch and then restart it. It solves problems when using Jitouch with Magic Trackpad 2
pkill -f "Jitouch"
sleep 5
nohup ~/Library/PreferencePanes/Jitouch.prefPane/Contents/Resources/Jitouch.app/Contents/MacOS/Jitouch > /dev/null 2>&1 &
//Solution goes in Sources
public struct Card: CustomStringConvertible {
enum Suit: String {
case spade = "♤", heart = "♡", club = "♧", diamond = "♢"
// It is not the standard Texas poker rule. All suits are considered equal.
// However, there is a test case to "brake tide by suit", in which "heart" is the largest.
var value: Int {
switch self {
@onevcat
onevcat / opencv-for-ios-build-script.sh
Created March 29, 2012 14:03
opencv for ios script
#!/bin/bash
################################################################################
# This script will create universal binaries for OpenCV library for
# iOS-based devices (iPhone, iPad, iPod, etc).
# As output you obtain debug/release static libraries and include headers.
#
# This script was written by Eugene Khvedchenya
# And distributed under GPL license
# Support site: http://computer-vision-talks.com
################################################################################</p>
import UIKit
import WebKit
// Disableing `WKWebView` user zooming by returning `nil` in `UIScrollViewDelegate`'s
// `viewForZooming` delegate method.
// On iOS 12, the delegate method only called when set the web view itself as the
// scroll view delegate.
class WebView: WKWebView {}
@onevcat
onevcat / PostBuildLog.cs
Created December 5, 2012 05:15 — forked from darktable/PostBuildLog.cs
Unity3D: Post-process script that includes a build.log file containing the build summary in the output directory. Based on a method in BuildManager.
/* **************************************************************************
Copyright 2012 Calvin Rien
(http://the.darktable.com)
Derived from a method in BuildManager, part of
VoxelBoy's Unite 2012 Advanced Editor Scripting Talk.
(http://bit.ly/EditorScripting)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.