- 中国电信 100M 宽带接入,局域网段
192.168.1/24
,光猫拥有管理员权限(后继需要); - NetGear WNDR3700v2 跑 OpenWRT 作为家庭主路由器, WAN IP
192.168.1.234
,局域网段10.10.10/24
; - PS4 无线连家庭网络(主),IP
10.10.10.3
;有线连光猫(备),IP192.168.1.3
。
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> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<title>Auto play html audio in iOS WeChat InAppBrowser the right way</title> | |
</head> | |
<body> | |
<h1>在 iOS 微信浏览器中自动播放 HTML5 audio(音乐) 的正确方式</h1> | |
<p>核心原理: 在微信的JS-API 中 play 一下 audio 即可达到自动播放的目的(应该是微信自己做了处理)</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
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl |
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 | |
require_once('/path/to/wordpress/wp-load.php'); | |
require_once('class-wp_post_helper.php'); | |
// initialize | |
$post = new wp_post_helper(array( | |
'post_name' => 'slug' , // slug | |
'post_author' => 1 , // author's ID | |
'post_date' => '2012/11/15 20:00:00' , // post date and time | |
'post_type' => 'posts' , // post type (you can use custom post type) |