Skip to content

Instantly share code, notes, and snippets.

View hao-ji-xing's full-sized avatar
🎯
Focusing

haojixing hao-ji-xing

🎯
Focusing
  • shanghai
View GitHub Profile
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<textarea name="" id="txt" cols="30" rows="10">
@hao-ji-xing
hao-ji-xing / cleancache.html
Created May 14, 2014 07:46
QQ 冲掉缓存
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>更新文件--Ptlogin</title>
<script>
//判断浏览器类型
function browser_version(){
var ua = navigator.userAgent.toLowerCase();
@hao-ji-xing
hao-ji-xing / breakVsReturn.js
Created January 13, 2014 06:41
一种中断分支的写法
function fn(){
var ret = 0;
do{
if(xxx){
ret = 1;
break;
}
jQuery.extend({
getParam: function(n,u) {
if(!u) var u = window.location.search;
var match = RegExp('[?&]' + n + '=([^&]*)').exec(u);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}
});
@hao-ji-xing
hao-ji-xing / libcssbuild.js
Last active December 20, 2015 01:39
lib css builder
/*
author: [email protected]
Usage:
$ node libcssbuild.js -o libcss.css -p
Options:
-o filename "output file name, default: lib-css.css"
-p "build minify version" default: none
*/
<select class="input-xlarge">
<option data-tinyswitch="#input01,#input02,#input03@disabled">禁用所有文本框</option>
<option data-tinyswitch="#input01,#input02,#input03@enabled">启用所有文本框</option>
<option data-tinyswitch="#input01,#input02,#input03@show">显示所有文本框</option>
<option data-tinyswitch="#input01,#input02,#input03@hide">隐藏所有文本框</option>
</select>
<label class="radio" ><input checked type="radio" data-tinyswitch=".custom@~~off" name="g">一年</label>
<label class="radio" ><input type="radio" data-tinyswitch=".custom@~~off" name="g">半年</label>
<label class="radio" ><input type="radio" data-tinyswitch=".custom@~~off" name="g">三个月</label>
<label class="radio" ><input type="radio" data-tinyswitch=".custom@~~off" name="g">一个月</label>
<label class="radio" ><input type="radio" data-tinyswitch=".custom@~~off&focus" name="g">自定义</label>
<input type="text" name="" class="custom">
@hao-ji-xing
hao-ji-xing / douhao.js
Created July 17, 2013 10:21
给数字添加逗号
'3423112'.replace(/\d(?=(?:\d{3})+$)/g,'$&,')
"3,423,112"
'3423112'.replace(/(?!^)(?=(?:\d{3})+$)/g,',')
"3,423,112"
@hao-ji-xing
hao-ji-xing / .bash_alias
Created July 4, 2013 02:29
bash_profile backup
alias vi="vim"
alias cls="clear"
alias ll="ls -l"
alias d="cd .."
alias dd="cd ../../"
alias toaa="cd ~/dev/localdev/aa_svn/branches"
alias tofe="cd ~/dev/localdev/aa_svn/SNYU-FE"
alias tohsp="cd ~/dev/localdev/aa_svn/SNYU-FE/HSP"
alias torepo="cd ~/dev/gitrepo"
alias tolab="cd ~/dev/lab"
@hao-ji-xing
hao-ji-xing / .gitconfig
Created July 3, 2013 09:21
git 常用配置
[alias]
cia = "! bash -c \"git commit -a -m \\\"$*\\\" && git push\""
go = "! bash -c \"git add . && git commit -m \\\"$*\\\" && git push\""