This file contains 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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> | |
<meta name="format-detection" content="telephone=no"> | |
<meta name="format-detection" content="email=no"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<link href="https://cdn.bootcss.com/weui/1.1.2/style/weui.min.css" rel="stylesheet"> | |
<script src="https://cdn.bootcss.com/zepto/1.2.0/zepto.min.js"></script> |
This file contains 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 | |
class Payjs | |
{ | |
private $url = 'https://payjs.cn/api/native'; | |
private $key = ''; // 填写通信密钥 | |
private $mchid = ''; // 特写商户号 | |
public function __construct($data=null) { | |
$this->data = $data; | |
} |
This file contains 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
<div class="mainbody"> | |
<div class="demo_title">演示代码</div> | |
<div class="blank"></div> | |
<p id="m-radio"> | |
<input type="radio" name="money" value="10" checked > 0.1元 | |
<input type="radio" name="money" value="500" > 5元 | |
<input type="radio" name="money" value="1000" > 10元 | |
<input type="radio" name="money" value="5000" > 50元 | |
</p> |
This file contains 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
<div class="main"> | |
<div class="hr">演示代码</div> | |
<p><input id="money" name=money placeholder="输入金额,单位:分"></p> | |
<p> | |
<input type="radio" name="pay" value="wxpay" checked > 微信支付 | |
<input type="radio" name="pay" value="alipay" > 支付宝 | |
<input type="radio" name="pay" value="jdpay" > 京东钱包 | |
<input type="radio" name="pay" value="qpay" > QQ钱包 |
This file contains 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 | |
/** | |
* 签名方法: | |
* 1.把所有参数根据参数名首字母asc码排序 | |
* 2.以键值 http querystring 方式连接 | |
* 3.取md5值转化为大写 | |
*/ | |
function sign(array $data) |
This file contains 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
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
import sys | |
import logging | |
import datetime | |
import requests | |
import BeautifulSoup | |
from requests.adapters import HTTPAdapter |
This file contains 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
#/bin/bash | |
URL="http://192.168.5.100/xxx.php" | |
check() { | |
RESULT=$(curl -s $URL) | |
echo $RESULT | |
if [ "$RESULT" -eq "1111" ] ; then | |
echo "again" |
This file contains 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
import urllib2 | |
def xiami_decode(s): | |
s = s.strip() | |
if not s: | |
return False | |
result = [] | |
line = int(s[0]) | |
rows = len(s[1:]) / line | |
extra = len(s[1:]) % line |
This file contains 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
<!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> | |
<title>Test Page</title> | |
<style> | |
#main{width:500px;} | |
li{list-style:none;font-size:14px;line-height:26px;} | |
a{color:#000; text-decoration:none;} | |
a:hover{color:red; text-decoration:none;} | |
.right{float:right;} |
This file contains 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
alias cd=x1 | |
function x1() { | |
builtin cd "$@" | |
ls | head -20 | |
} | |
-------------------------------- | |
贴gist到v2ex的方法是直接粘贴链接如: | |
http://gist.github.com/3952722 | |
-------------------------------- |
NewerOlder