Skip to content

Instantly share code, notes, and snippets.

View nibocn's full-sized avatar

RichardNee nibocn

View GitHub Profile
@nibocn
nibocn / adblock.txt
Created February 28, 2016 14:25
adblock 自定义过滤规则
! 隐藏 inoreader 广告
inoreader.com##div#sinner_container
@nibocn
nibocn / cmder-aliases
Created February 26, 2016 16:34
Cmder/config/aliases
ls=ls --show-control-chars -F --color $*
l=ls --show-control-chars -F --color $*
la=ls -aF --show-control-chars -F --color $*
ll=ls -alF --show-control-chars -F --color $*
@nibocn
nibocn / msys-win
Last active February 18, 2016 06:48
msys 中文乱码 /bin/win
#!/bin/bash
$@ |iconv -f gbk -t utf-8
@nibocn
nibocn / msys-zsh
Last active February 14, 2016 07:24
/etc/zsh/zprofile
emulate sh -c 'source /etc/profile'
# 在MSYS中不设置此变量打软连直接变成了复制,很关键
export MSYS="winsymlinks:lnk"
# 解决MSYS中时间显示不正常的问题
export TZ=CET-8CEST
# Grab the current date (%D) and time (%T) wrapped in {}: {%D %T}
DALLAS_CURRENT_TIME_="%{$fg[white]%}[%{$fg[yellow]%}%T%{$fg[white]%}]%{$reset_color%}"
# Grab the current machine name: muscato
DALLAS_CURRENT_MACH_="%{$fg[green]%}%m%{$fg[white]%}:%{$reset_color%}"
# Grab the current filepath, use shortcuts: ~/Desktop
# Append the current git branch, if in a git repository: ~aw@master
DALLAS_CURRENT_LOCA_="%{$fg[cyan]%}%~\$(git_prompt_info)%{$reset_color%}"
# Grab the current username: dallas
DALLAS_CURRENT_USER_="%{$fg[green]%}%n%{$fg[white]%}: %{$reset_color%}"
#Grab the current username and machine name
public class SHA256 {
private static byte[] getHash(String password) {
MessageDigest digest;
try {
digest = MessageDigest.getInstance("SHA-256");
digest.reset();
return digest.digest(password.getBytes());
} catch (NoSuchAlgorithmException e1) {
e1.printStackTrace();
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\Vim]
"Icon"="E:\\Software\\Vim\\vim74\\gvim.exe,0"

[HKEY_CLASSES_ROOT\*\shell\Vim\Command]
@="E:\\Software\\Vim\\vim74\\gvim.exe -p --remote-tab-silent \"%1\""
@nibocn
nibocn / abhs.vba
Last active August 29, 2015 14:24
Sub test1()
Dim rowGap As Integer, i As Integer, j As Integer, k As Integer, h As Integer, n As Integer, m As Integer
Dim columns(1 To 15) As String, week(2 To 15) As String
Dim weekRange As range
Dim d As Date
Dim col As String
Dim dis_res1 As Integer
Dim rem_res1 As Integer
Dim times(1 To 5) As Integer
Dim rowGap2 As Integer
@nibocn
nibocn / virtualenvwrapper-win.md
Created May 17, 2015 10:55
virtualenvwrapper常用命令

mkvirtualenv <env_name> 在$WORKON_HOME创建虚拟环境

rmvirtualenv <env_name> -r 删除虚拟环境

workon [<env_name>] 切换到虚拟环境

deactivate 退出虚拟环境

lsvirtualenvs 列出全部的虚拟环境