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
{{define "body"}} | |
This is the start page. | |
<br><br> | |
Check out <a href="/user/5">user 5</a> or <a href="/user/7">user 7</a>. | |
{{end}} | |
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 = '<html> | |
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head> | |
<body>'.$html.'</body> | |
</html>'; | |
//echo $html; | |
//将本地 HTML 文件转为 PDF | |
// Run wkhtmltopdf |
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
package main | |
import ( | |
"fmt" | |
"github.com/blevesearch/bleve" | |
_ "github.com/wangbin/jiebago/analyse/tokenizers" | |
"log" | |
) | |
func main() { |
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
[General] | |
loglevel = notify | |
all-tcp-mode = false | |
[Proxy] | |
Proxy = custom | |
[Rule] | |
// iOS | |
DOMAIN-SUFFIX,lcdn-registration.apple.com,DIRECT |
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
/** | |
* Created by oBlank on 10/12/15. | |
*/ | |
var cluster = require('cluster'); | |
var http = require('http'); | |
var numCPUs = require('os').cpus().length; | |
var timeouts = []; | |
function errorMsg() { |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/* | |
Package goevent is event dispatcher. | |
Listen for event: | |
e := goevent.New() | |
e.On(func(i int, s string){ | |
fmt.Printf("%d: %s\n", i, s) | |
}) | |
Trigger: | |
e.Trigger(1, "foo") | |
Use event table: |
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
/** | |
* Created by oBlank on 10/12/15. | |
*/ | |
var cluster = require('cluster'); | |
var http = require('http'); | |
var numCPUs = require('os').cpus().length; | |
var timeouts = []; | |
function errorMsg() { |
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"> | |
<title>test ajax and push state</title> | |
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script> | |
</head> | |
<body> | |
<ul> | |
<li><a data-id="1" href="javascript:;">访问1</a></li> |
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
<style type="text/css"> | |
.scrollable-x,.scrollable-y { | |
outline-offset:-2px; | |
/*padding-right: 6px;*/ | |
overflow-x:hidden; | |
overflow-y:hidden; | |
} | |
.scrollable-y.scrollable-show,.scrollable-y:focus,.scrollable-y:hover,.scrollable-show-all .scrollable-y { | |
overflow-y:auto; |
OlderNewer