This file contains hidden or 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
{ | |
"description": "Change right_command to command+control+option+shift.", | |
"from": { | |
"key_code": "right_command", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, |
This file contains hidden or 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
#!/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 |
This file contains hidden or 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 hidden or 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
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 & "" |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
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' |
This file contains hidden or 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
- (NSDictionary *)encrypt:(NSData *)fileData forSuffixFile:(NSString *)fileSuffix{ | |
NSMutableData *afterFile = [[NSMutableData alloc] init]; | |
[afterFile appendData:fileData]; | |
NSMutableData *keyContainer = [[NSMutableData alloc] init]; | |
int PERCENTAGE = 1; | |
int ex_location = 0; | |
int ex_length = 0; |
This file contains hidden or 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
NSString *bundlePath = [[NSBundle mainBundle] bundlePath]; | |
NSLog(@"bundlePath is %@",bundlePath); | |
NSString *documentDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentationDirectory, NSUserDomainMask, YES) lastObject]; | |
NSLog(@"documentDirectory is %@", documentDirectory); | |
NSString *libraryDirectory = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) lastObject]; | |
NSLog(@"libraryDirectory is %@", libraryDirectory); | |
NSString *cacheDirectory = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject]; |
NewerOlder