Skip to content

Instantly share code, notes, and snippets.

Khande

Block or report user

Report or block Khande

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View FloatLabelLayout.java
/*
* Copyright 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
View auto_switch_kb.py
#! /usr/bin/env python
# coding: utf-8
'''
auto switch keyboard between different applications
if you want to change the app list, modify the var 'ignore_list'
一定要用系统自带的 python, 用 brew 或其他方式安装的 python 不能识别 AppKit 等模块,花了很长时间在 pyobjc 的文档中看到这样一句话:
The system version of Python (``/usr/bin/python``) includes a copy of
PyObjC starting at MacOSX 10.5 ("Leopard"). Installing other versions
@Khande
Khande / auto_switch_kb.py
Created Oct 4, 2016 — forked from tiann/auto_switch_kb.py
auto switch keyboard to english in specific applications
View auto_switch_kb.py
#! /usr/bin/env python
# coding: utf-8
'''
auto switch keyboard between different applications
if you want to change the app list, modify the var 'ignore_list'
'''
from AppKit import NSWorkspace, NSWorkspaceDidActivateApplicationNotification, NSWorkspaceApplicationKey
@Khande
Khande / alfred-pinyin.py
Created Sep 19, 2016 — forked from tiann/alfred-pinyin.py
make alfred support pinyin search
View alfred-pinyin.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# @author weishu @2015/12/7
import subprocess
import os
import re
import json
View gist:4669205da48660f1733b399f16acb4cf
key.setGlobalKey(['C-x', '0'], function (ev, arg) {
SplitBrowser.activeBrowserCloseWindow();
}, '現在のフレームを閉じる');
key.setGlobalKey(['C-x', '1'], function (ev, arg) {
var url = SplitBrowser.activeBrowser != gBrowser ? SplitBrowser.activeSubBrowser.src : null;
var browsers = SplitBrowser.browsers;
for (var i = 0; i < browsers.length; ++i)
browsers[i].close();
@Khande
Khande / 0_reuse_code.js
Created Jul 12, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.