yige.ch
yige.ch
Saturday 24 July 2021

Using Jitouch on macOS Big Sur

After upgrading to macOS Big Sur, the most essential utility for me, Jitouch, stops working reliably. The process is often dead after the computer wakes up from sleep.

Here's how to keep Jitouch running using launchd.

  1. Create a file ~/Library/LaunchAgents/jitouch.restart.plist with following content:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>Label</key>
        <string>jitouch.restart.local</string>
        <key>ProgramArguments</key>
        <array>
            <string>sh</string>
            <string>-c</string>
            <string>/Users/yi/Library/PreferencePanes/Jitouch.prefPane/Contents/Resources/Jitouch.app/Contents/MacOS/Jitouch</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>KeepAlive</key>
        <true/>
    </dict>
    </plist>
    
  2. Remember to replace the Jitouch install location in the file with your own

  3. Enable launchd service from the file:

    $ launchctl load -w ~/Library/LaunchAgents/jitouch.restart.plist
    
  4. Done

For some reason, the sh -c part is necessary. The service crashed when I tried launching Jitouch binary directly.


Tuesday 30 April 2019

videocr

https://github.com/apm1467/videocr

我写的一个 Python 库,用图像识别技术提取视频中的硬字幕(画面内嵌字幕),并输出成带时间轴的 SRT 文本字幕。使用了开源的 Tesseract 神经网络 OCR 引擎,支持识别几乎任何语言文字,包括英文、中文和日文。

在我自己的测试中准确度不错,就是比较吃 CPU 资源。虽然不知道对谁有用,说不定字幕组能用上?

欢迎试用反馈。


Friday 22 February 2019

Art of Dressing

ABC of Men's Fashion by Hardy Amies:

An established trick in theatre design is to make a costume in a series of tones of the same colour. This is often more effective than two or more contrasting colours which can split up the effect instead of giving one big punch.

But to achieve the nonchalance which is absolutely necessary for a man, one article at least must not match. For instance, you can wear a dark blue suit and tie with a pale blue shirt and navy blue socks, but you must then have a patterned silk handkerchief say in dark red or a paisley design of green and brown; or you could stick to a blue handkerchief and have dark red socks.

Hardy Amies 对待男装很有意思的态度,男人在打扮中必须透出一定程度的漫不经心,切不可对衣服太过在乎。原文很简洁,但难译,我只能译得如下般啰嗦:

舞台设计中有一个惯用技巧,是把整套服装都做成同一种颜色,不同部分只有色调的区别。通常这样做比使用两三种强烈对比色更有效;对比色会使整体效果分散,无法汇聚成视觉冲击。

但男人对待着装绝不该太过认真,因此身上必须有至少一件服饰不匹配。比如说,你可以穿深蓝色西装和领带,配淡蓝色衬衫和藏青色袜子,但然后你就应该戴一条有暗红色花纹,或者棕绿相间佩斯利纹样的口袋巾;或者你可以戴蓝色口袋巾,但是配暗红色袜子。


Wednesday 15 August 2018

Apple Store 中国十岁生日,我采访了离开的那些人

https://mp.weixin.qq.com/s/3CCHk7AjQ8swJ7KesyFJWA

为了十周年,我特意采访了几位从苹果离职的朋友,他们曾在苹果担任不同角色,有一线 SP,有 Genius,有经理甚至店长,从他们的角度去看苹果零售店在中国的十年。

值得一读。开始的调调也是熟悉的「苹果变了」,但结尾说到苹果顶住压力寻求改变,是亲历者才有的视角。


Wednesday 04 July 2018

知乎想法桌面端

https://github.com/apm1467/zhihu-heartbeat

我自娱自乐制作的知乎想法桌面端,支持 Mac 和 Windows,免费并开放源代码,欢迎试用。