Skip to content

Instantly share code, notes, and snippets.

View lifedever's full-sized avatar
🚀
Working from home

Timothy.Ge lifedever

🚀
Working from home
View GitHub Profile
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
const router = new VueRouter({
mode: 'history',
routes: [...]
})
@lifedever
lifedever / 又一个片段.txt
Created February 7, 2017 11:22
snippetslab://snippet/97B9670A-8DD6-470E-B84B-8BDA99D20BCF/
带动
@lifedever
lifedever / jquery.validate.ext.js
Created June 29, 2016 08:21
jQuery validate验证扩展
// 身份证号码验证
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})$/;
@lifedever
lifedever / ArrayParams.java
Created June 29, 2016 06:36
JDBC查询参数链式结构拼接工具类
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();
@lifedever
lifedever / CamelCaseUtils.java
Created June 29, 2016 06:35
Java驼峰命名法和下划线命名法互相转化工具类
public class CamelCaseUtils {
private static final char SEPARATOR = '_';
public static String toUnderlineName(String s) {
if (s == null) {
return null;
}
StringBuilder sb = new StringBuilder();