-
emace重新加载文件
M-x load-file ENTER
~/.emacs
ENTER
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 | |
| # | |
| # $Id: iotop.py 1160 2011-10-14 18:50:36Z g.rodola@gmail.com $ | |
| # | |
| # Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved. | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| # Transplant to NT system by hui.wang, 2012-11-28 | |
| # Add function of get cpu state and get memory state by hui.wang,2012-11-29 |
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
| print '\n'.join([' '.join(['%s*%s=%-2s' % (y,x,x*y) for y in range(1,x+1)]) for x in range(1,10)]) |
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 java.security.*; | |
| import javax.crypto.*; | |
| public class DESEnc { | |
| private static String strDefaultKey = "86b21af7cdef3dc6"; | |
| private Cipher encryptCipher = null; | |
| private Cipher decryptCipher = null; | |
| public static String byteArr2HexStr(byte[] arrB) throws Exception { | |
| int iLen = arrB.length; |
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
| Windows Registry Editor Version 5.00 | |
| [HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/json] | |
| "CLSID"="{25336920-03F9-11cf-8FD0-00AA00686F13}" | |
| "Encoding"=dword:00080000 | |
| [HKEY_CLASSES_ROOT\MIME\Database\Content Type\text/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
| #设置记住密码(默认15分钟): | |
| git config --global credential.helper cache | |
| #如果想自己设置时间,可以这样做:(这样就设置一个小时之后失效) | |
| git config credential.helper 'cache --timeout=3600' | |
| #长期存储密码: | |
| git config --global credential.helper store | |
| #增加远程地址的时候带上密码 |
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
| $('#btn').trigger("click"); | |
| $('#btn').click(); | |
| //自定义事件 | |
| $('#btn').bind("myClick", function(){ | |
| $('#test').append("<p>我的自定义事件.</p>"); | |
| }); | |
| $('#btn').trigger("myClick"); |
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 |
NewerOlder