Skip to content

Instantly share code, notes, and snippets.

View jixiangac's full-sized avatar
🍊
Wow~

jixiangac jixiangac

🍊
Wow~
View GitHub Profile
@jixiangac
jixiangac / 404.html
Last active March 9, 2017 08:54
猴子404
<div className="me404">
<div className="clouds"></div>
<div className="the404"></div>
<div className="monkey">
<div className="monkey-eye-l"></div>
<div className="monkey-eye-r"></div>
</div>
<div className="moon"></div>
<div className="platform"></div>
<div className="star1"></div>
'1500000000000'.replace(/\B(?=(\d{3})+$)/g,',')
/**
* 日期格式化
* @param {[type]} date [description]
* @param {[type]} format [description]
* @return {[type]} [description]
*/
Utils.prototype.formatDate = function(date, format) {
var now = date;
var o = {
"M+": now.getMonth() + 1, //month
@jixiangac
jixiangac / 0_reuse_code.js
Created April 22, 2014 15:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@import "compass/css3/images";
// CSS-only multi-line ellipsis with generated content
// yields `position:relative`, so remember to declare an eventual `position:absolute/fixed` *after* including this mixin
@mixin limitLines(
$maxLinesPortrait, // Mandatory: The number of lines after which the clipping should take action.
$maxLinesLandscape: $maxLinesPortrait, // You may provide a different line limit for landscape orientation.
// Note that 'portrait' is our default orientation. However, if you omit $maxLinesLandscape,
// the value of $maxLinesPortrait is used for whatever orientation (that is, without a media query).
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)
@jixiangac
jixiangac / spliceNum.js
Last active December 27, 2015 08:49
格式化千分位
function spliceNum(num) {
var _init = [];
if (!num) {
return num;
}
if (!S.isNumber(num)) {
num = parseFloat(num);
}
var _float = num - parseInt(num, 10);
num -= _float;