Skip to content

Instantly share code, notes, and snippets.

View liuxd's full-sized avatar
🗿
Hi, there.

Allen Liu liuxd

🗿
Hi, there.
  • Tax Traders
  • Auckland, New Zealand
View GitHub Profile
@liuxd
liuxd / phpinfo-plus.php
Created August 21, 2014 09:40
Beautify phpinfo().
<?php
date_default_timezone_set('Asia/Shanghai');
ob_start(); phpinfo();
$i = ob_get_contents();
ob_end_clean();
$html = str_replace(
"module_Zend Optimizer", "module_Zend_Optimizer",
preg_replace('%^.*<body>(.*)</body>.*$%ms', '$1', $i)
<?php
ob_start();
while (1) {
echo str_pad(time(), 4096);
sleep(1);
ob_flush();
flush();
}
<style>*{position:relative}</style><table><input></table>
<!-- 这段代码在IE6下运行会使ie6直接关闭页面 -->
<?php
class Excel_Export
{
/**
* Excel 标题
*
* @type: Array
*/
private $_titles = array();
$ curl ifconfig.me
$ curl icanhazip.com
$ curl ident.me
$ curl ipecho.net/plain
$ curl whatismyip.akamai.com
$ curl myip.dnsomatic.com

Console

The XSS Auditor refused to execute a script in 'http://XXXXX' because its source code was found within the request. The auditor was enabled as the server sent neither an 'X-XSS-Protection' nor 'Content-Security-Policy' header.

Explaination

That is a browser feather in secure to prevent XSS.If you wanna skip it,give a head like this from server side:

现象:

执行以下命令,想要统计当前目录下所有markdown文件的内容行数。

find . -name "*.md"|xargs cat|wc -l

结果报错了:

xargs: unterminated quote
@liuxd
liuxd / alias.sh
Last active September 5, 2017 07:35
alias config backup.
alias h='vim /etc/hosts'
alias subl="'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'"
alias loc="php -S 0.0.0.0:8000"
alias rm="rm -rf "
alias tree="tree -N"
alias ds="find . -name .DS_Store|xargs rm"
alias dh="df -h"
alias up='g add .;g ci -am up'
alias gpush='g push'
alias f='fuck'
@liuxd
liuxd / flash-title.html
Created September 7, 2017 00:51
title flash
<!DOCTYPE html>
<html>
<head>
<title>闪烁title</title>
</head>
<body>
<script type="text/javascript" language="javascript">
var flashTitlePlayer = {
//开始闪烁。
//@param string $msg
@liuxd
liuxd / html-editor.html
Created September 7, 2017 00:51
html-editor.html
data:text/html, <html contenteditable>