Skip to content

Instantly share code, notes, and snippets.

View yxjxx's full-sized avatar
🎯
Focusing

Jing Yang yxjxx

🎯
Focusing
View GitHub Profile
@yxjxx
yxjxx / alternative.yaml
Last active March 29, 2024 05:53 — forked from lotem/alternative.yaml
Rime中文输入状态下也使用英文标点
###中文输入法下也使用英文标点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
######
@yxjxx
yxjxx / hyper.json
Last active November 24, 2022 05:30
~/.config/karabiner/
{
"description": "Change right_command to command+control+option+shift.",
"from": {
"key_code": "right_command",
"modifiers": {
"optional": [
"any"
]
}
},
@yxjxx
yxjxx / luna_pinyin_simp.custom.yaml
Last active September 12, 2018 13:29
ibus-rime模糊音:新增文件 luna_pinyin_simp.custom.yaml
# luna_pinyin_simp.custom.yaml
#
# 【朙月拼音】模糊音定製模板
# 佛振配製 :-)
# Modify by yxjxx
#
# 位置:
# ~/.config/ibus/rime (Linux)
# ~/Library/Rime (Mac OS)
# %APPDATA%\Rime (Windows)
@yxjxx
yxjxx / surge.conf
Created October 5, 2015 02:12 — forked from netputer/surge-multi-proxy.url
Surge config for SSLedge (Sample)
[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 只保留最后一个
@yxjxx
yxjxx / ss_status.1m.py
Last active May 6, 2017 13:38
bitbar plugin: shadowsocksX status
#!/Users/yxj/env/bin/python
# -*- coding: utf-8 -*-
# @Author: yxjxx
# @Date: 2016-01-09 13:28:49
# @Last Modified by: yxjxx
# @Last Modified time: 2016-01-09 19:04:17
from biplist import *
from os.path import expanduser
import json
@yxjxx
yxjxx / impbcopy.m
Created April 28, 2017 18:58 — forked from mwender/impbcopy.m
Command line copy an image file to the clipboard in Mac OS X. See first comment for install instructions.
#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
@yxjxx
yxjxx / you-get.scpt
Created August 25, 2016 10:41
打开 iTerm 使用 you-get 下载 Chrome 当前 tab 页的视频
on alfred_script(q)
-- your script here
tell application "Google Chrome"
-- 获取当前标签页的标题
set tabname to get title of active tab of window 1
-- 获取当前标签页的超链接地址
set taburl to get URL of active tab of window 1
tell application "iTerm"
activate
set the clipboard to "cd /Users/yxj/env3;source bin/activate;you-get " & taburl & ""
@yxjxx
yxjxx / cvimrc
Last active January 21, 2016 14:12
cvim config
let completionengines = ['google', 'google-image', 'youtube']
map <C-7> lastUsedTab
let blacklists = ["http://douban.fm/*","http://qex.github.io/*","http://qianshan.co/*","https://cloud.digitalocean.com/*","http://dazi.kukuw.com/*","https://courses.edx.org/*","http://www.liaoxuefeng.com/*"]
set nochangelog
map ; :
map : ;
"let configpath = '/Users/yxj/Dropbox/dotfiles/.cvimrc'
@yxjxx
yxjxx / alfred-pinyin.py
Created January 6, 2016 00:53 — forked from tiann/alfred-pinyin.py
make alfred support pinyin search
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# @author weishu @2015/12/7
import subprocess
import os
import re
import json
@yxjxx
yxjxx / gist:7853894
Created December 8, 2013 06:07
Mint16 software source list
#hust ubuntu13.10
deb http://mirrors.hust.edu.cn/ubuntu/ saucy main restricted universe multiverse
deb http://mirrors.hust.edu.cn/ubuntu/ saucy-security main restricted universe multiverse
deb http://mirrors.hust.edu.cn/ubuntu/ saucy-updates main restricted universe multiverse
deb http://mirrors.hust.edu.cn/ubuntu/ saucy-proposed main restricted universe multiverse
deb http://mirrors.hust.edu.cn/ubuntu/ saucy-backports main restricted universe multiverse
deb-src http://mirrors.hust.edu.cn/ubuntu/ saucy main restricted universe multiverse
deb-src http://mirrors.hust.edu.cn/ubuntu/ saucy-security main restricted universe multiverse
deb-src http://mirrors.hust.edu.cn/ubuntu/ saucy-updates main restricted universe multiverse
deb-src http://mirrors.hust.edu.cn/ubuntu/ saucy-proposed main restricted universe multiverse