This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import <Cocoa/Cocoa.h> | |
#import <unistd.h> | |
BOOL copy_to_clipboard(NSString *path) | |
{ | |
// http://stackoverflow.com/questions/2681630/how-to-read-png-image-to-nsimage | |
NSImage * image; | |
if([path isEqualToString:@"-"]) | |
{ | |
// http://caiustheory.com/read-standard-input-using-objective-c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# @author weishu @2015/12/7 | |
import subprocess | |
import os | |
import re | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Proxy] | |
# 为了方便将来修改,将可用服务器写成 Proxy 形式 | |
US = protocol, us.server.com, port1, username, password | |
JP = protocol, jp.server.com, port2, username, password | |
# 要用美服,就把美服那行复制到下面,然后改叫 SSLEDGE | |
SSLEDGE = protocol, us.server.com, port1, username, password | |
# 要换日服,就把日服那行复制到下面,然后改叫 SSLEDGE | |
# 同名 Proxy,Surge 只保留最后一个 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###中文输入法下也使用英文标点2013/8/14 yxj | |
###有些用戶習慣在中文裏使用ASCII標點,那麼與其一個一個覆寫,不如 整套都換掉 。 | |
###取得這份設定檔—— Rime 別樣設定,使用西文標點(一个gist:https://gist.github.com/lotem/2334409) 在用戶資料夾保存爲 alternative.yaml ; | |
###再將輸入方案中的「導入 default 設定」通過打 patch 替換爲「導入 alternative 設定」 | |
###刚刚遇到一个问题,因为教程里面说需要这前两行,所以就直接粘贴了,但是发现模糊音失效了,找到原因是[只能有一个patch:,因为上面已经有了,所以就下面就不要了,注意缩进,两个英文空格] | |
###又加入了一行代码['key_binder/import_preset': alternative]作用是让[ ]可以翻页,如果一开始就用 [ 上翻页的会连高亮的字加[都一起上屏「比如你好[ 」就会这样了,哈哈 | |
###patch: | |
##'punctuator/import_preset': alternative | |
##'key_binder/import_preset': alternative | |
###### |