Skip to content

Instantly share code, notes, and snippets.

View dismory's full-sized avatar

dismory dismory

View GitHub Profile
@dismory
dismory / main.m
Last active December 28, 2015 15:49
A full and runnable code example for the question on Stack Overflow: http://stackoverflow.com/q/19862609/492790
#import <Foundation/Foundation.h>
#import <ReactiveCocoa/ReactiveCocoa.h>
int main(int argc, const char * argv[])
{
@autoreleasepool {
RACSubject *input = [RACSubject subject];
RACSignal *output = [[[[input
map:^(NSString *combo) {
NSArray *components = [combo componentsSeparatedByString:@","];
@dismory
dismory / save_github_starred_repos_to_pinboard.rb
Last active December 27, 2015 22:09
Save your GitHub starred repos to Pinboard.
require "octokit"
require "pinboard"
# After running this script, you can use [this IFTTT recipe](https://ifttt.com/recipes/71035)
# for future sync **automatically**.
pinboard = Pinboard::Client.new(:token => 'TOKEN') # get the token here: https://pinboard.in/settings/password
github = Octokit::Client.new(:login => 'USERNAME', :password => 'PASSWORD')
total_starred = 9999 # get the count here: https://github.com/stars
@dismory
dismory / luna_pinyin.custom.yaml
Created April 15, 2012 13:13
鼠须管自定义方引号
# Author: dismory <http://zhihu.com/dismory>
#
# - 命名为:luna_pinyin.custom.yaml
# - 放到 ~/Library/Rime 目录下
# - 在菜单栏单击署鼠须管图标,下拉菜单里选择【重新部署】即可
#
# 此自定义方案是针对【朙月拼音】的,针对其它请修改文件名前缀 `luna_pinyin` 为其它。
patch:
"punctuator/full_shape/[" : ["「", "【"]