Skip to content

Instantly share code, notes, and snippets.

😀
Focusing

Devid.Ge gefangshuai

😀
Focusing
Block or report user

Report or block gefangshuai

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 git 设置和取消代理
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@gefangshuai
gefangshuai / 又一个片段.txt
Created Feb 7, 2017
snippetslab://snippet/97B9670A-8DD6-470E-B84B-8BDA99D20BCF/
@gefangshuai
gefangshuai / jquery.validate.ext.js
Created Jun 29, 2016
jQuery validate验证扩展
View jquery.validate.ext.js
// 身份证号码验证
jQuery.validator.addMethod("isIdCardNo", function(value, element) {
// var idCard = /^(\d{6})()?(\d{4})(\d{2})(\d{2})(\d{3})(\w)$/;
return this.optional(element) || isIdCardNo(value);
}, "请输入正确的身份证号码");
// 手机号码验证
jQuery.validator.addMethod("isMobile", function(value, element) {
var length = value.length;
var mobile = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
@gefangshuai
gefangshuai / ArrayParams.java
Created Jun 29, 2016
JDBC查询参数链式结构拼接工具类
View ArrayParams.java
public class ArrayParams {
private static Logger logger = Logger.getLogger(MapParams.class);
private List<Object> params;
private String pattern = "yyyy-MM-dd";
private ArrayParams() {
}
public static ArrayParams begin() {
ArrayParams arrayParams = new ArrayParams();
@gefangshuai
gefangshuai / CamelCaseUtils.java
Created Jun 29, 2016
Java驼峰命名法和下划线命名法互相转化工具类
View CamelCaseUtils.java
public class CamelCaseUtils {
private static final char SEPARATOR = '_';
public static String toUnderlineName(String s) {
if (s == null) {
return null;
}
StringBuilder sb = new StringBuilder();
You can’t perform that action at this time.