This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window, undefined) { | |
// 编码 | |
function encode(str) { | |
return encodeURIComponent(JSON.stringify(str)); | |
} | |
// 解码 | |
function decode(str) { | |
if (undefined == str) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ignore all test and documentation for archive | |
/.gitattributes export-ignore | |
/.gitignore export-ignore | |
/.travis.yml export-ignore | |
/tests export-ignore | |
/docs export-ignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--360浏览器--> | |
<meta name="renderer" content="webkit"> | |
<!--其它双核浏览器--> | |
<meta name="force-rendering" content="webkit"> | |
<!--如果安装了GCF,则使用GCF来渲染页面,如果没有安装GCF,则使用最高版本的IE内核进行渲染。--> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 为了避免字体混乱的局面,Neat.css 统一了 font-family 的设置。 | |
* | |
* 1. 中文字体选择如下: | |
* Windows 优先使用「微软雅黑」,如果没有则使用「中易宋体(SimSun)」。 | |
* OS X 优先使用「冬青黑体简体(Hiragino Sans GB)」,如果没有则使用默认的「华文黑体」。 | |
* Linux 优先使用「文泉驿微米黑」。 | |
* | |
* 2. 西文字体选择如下: | |
* Windows 优先使用「Arial」。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 提取淘宝地址库 | |
* | |
* 用法: | |
* 1. 打开淘宝 https://www.taobao.com/ | |
* 2. 将下面代码复制到控制台 | |
* 3. 按回车 | |
* 4. 复制输出的 json 数据保存到你的文件 | |
* | |
* 仅支持: chrome 48+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
listen 80; | |
charset utf-8; | |
index index.html index.php; | |
error_page 404 /404.html; | |
# 开启 php 并支持 pathinfo | |
include enable-php-pathinfo.conf; | |
# yii2 rewrite |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 源: https://sf-static.b0.upaiyun.com/v-5703995e/global/js/debug.js | |
/* | |
监控js错误并上报 | |
[email protected] | |
*/ | |
window.onerror = function(msg, url, line, col, error) { | |
if (msg !== "Script error." && !url) { | |
return true; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$headers = [ // 构造IP | |
'CLIENT-IP: 8.8.8.8', | |
'X-FORWARDED-FOR: 8.8.8.8', | |
]; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'http://127.0.0.1:8000/server.php'); | |
curl_setopt($ch, CURLOPT_REFERER, 'http://www.baidu.com/'); // 构造来路 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax('?', {type:'head'}).done(function(data, status, xhr) { | |
var dt = new Date(xhr.getResponseHeader('Date')); // 字符串转日期对象 | |
console.log(dt.toLocaleString()); | |
}); |