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
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(); |
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
# 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 |
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
emulate sh -c 'source /etc/profile' | |
# 在MSYS中不设置此变量打软连直接变成了复制,很关键 | |
export MSYS="winsymlinks:lnk" | |
# 解决MSYS中时间显示不正常的问题 | |
export TZ=CET-8CEST |
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
#!/bin/bash | |
$@ |iconv -f gbk -t utf-8 |
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
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 $* |
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
! 隐藏 inoreader 广告 | |
inoreader.com##div#sinner_container |
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/python | |
import smtplib,re,urllib2,time | |
import socket | |
from subprocess import Popen, PIPE | |
smtpServer='smtp.163.com' | |
smtpPort='25' | |
sender = '[email protected]' | |
senderPasswd = "XXXXX" |
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
var jq = document.createElement('script'); | |
jq.src = "//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
// ... give time for script to load, then type. | |
jQuery.noConflict(); | |
function print_download_url() { | |
var text = '\n'; | |
$('div.ndownlist>ul>li input').each(function () { | |
text += $(this).val() + '\n' |
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
## | |
## 32-bit Mingw-w64 repository mirrorlist | |
## Changed on 2014-11-15 | |
## | |
##中国科学技术大学开源软件镜像 | |
Server = http://mirrors.ustc.edu.cn/msys2/REPOS/MINGW/i686 | |
##北京理工大学镜像 | |
Server = http://mirror.bit.edu.cn/msys2/REPOS/MINGW/i686 | |
##日本北陆先端科学技术大学院大学 sourceforge 镜像 | |
Server = http://jaist.dl.sourceforge.net/project/msys2/REPOS/MINGW/i686 |
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
*.class | |
# Mobile Tools for Java (J2ME) | |
.mtj.tmp/ | |
# Package Files # | |
*.jar | |
*.war | |
*.ear |