Skip to content

Instantly share code, notes, and snippets.

@sherrier
sherrier / auto_switch_kb.py
Last active May 12, 2018 02:11 — forked from tiann/auto_switch_kb.py
auto switch keyboard to english in specific applications
#! /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
@sherrier
sherrier / 设置XP网络连接
Created April 8, 2012 12:48
使用命令行设置网络连接的IP,网关,DNS
@echo Setting IP for Office
netsh interface ip set address name="无线网络连接" source=static addr=192.168.23.19 mask=255.255.240.0 gateway=192.168.16.1 gwmetric=1
netsh interface ip set dns "无线网络连接" static 172.16.50.240