Skip to content

Instantly share code, notes, and snippets.

View libo1106's full-sized avatar

libo libo1106

View GitHub Profile
@libo1106
libo1106 / gist:d053d66633cd780df200
Created August 14, 2014 04:44
Highchart String Format 保留多少位小数
pointFormat: {point.percentage:.2f}
// :.2f表示保留2位小数,:.0f表示保留两位小数
@libo1106
libo1106 / gist:cfbe9dbd98bd54078c64
Created July 21, 2014 10:30
ubuntu全局代理
export http_proxy="http://domain.com:8080/"
export https_proxy="https://domain.com:8080/"
# export是查看系统全局变量
@libo1106
libo1106 / gist:e89ee04262c5be3c26cf
Created May 30, 2014 02:28
Linux动态刷新日志文件
tail -f /var/log/run.log
@libo1106
libo1106 / randomRanssian.js
Last active August 29, 2015 14:01
正态随机数
var randomGaussian = function(a,b){
var c0 = 2.515517;
var c1 = 0.802853;
var c2 = 0.010328;
var d1 = 1.432788;
var d2 = 0.189269;
var d3 = 0.001308;
var f = 0;
var w = 0;
@libo1106
libo1106 / gist:11206721
Created April 23, 2014 08:17
去除IE6\IE7 input button元素value值两边留白
input,button{overflow:visible;}
@libo1106
libo1106 / gist:10438066
Created April 11, 2014 02:38
绝对定位元素水平垂直居中
.element {
width: 600px; height: 400px;
position: absolute; left: 0; top: 0; right: 0; bottom: 0;
margin: auto; /* 有了这个就自动居中了 */
}
@libo1106
libo1106 / gist:9888697
Created March 31, 2014 09:29
SecureCRT 大文件上传
rz -be
@libo1106
libo1106 / gist:9778670
Last active August 29, 2015 13:57
$HTTP_RAW_POST_DATA
<?php
$array_temp = explode( '&', $HTTP_RAW_POST_DATA);
$array_post = [];
if(isset($_REQUEST['mood'])){
$mood = $_REQUEST['mood'];
}else{
// 构造原始POST数组
foreach($array_temp as $val){
@libo1106
libo1106 / gist:9777985
Last active September 22, 2016 06:51
flex未知高度垂直居中写法
<!DOCTYPE html>
<html lang="zh-CN" class="fullscreen">
<head>
<title>flex未知高度垂直居中写法</title>
<style>
html,body{
width: 100%;
height: 100%;
overflow: hidden;
@libo1106
libo1106 / gist:9734344
Last active August 29, 2015 13:57
BattleCamp平均值计算
function bc($doms){
var result = {
pr:0,
hp:0,
attack:0,
recovery:0,
feed:0
}
var length = 0;