Skip to content

Instantly share code, notes, and snippets.

@zhangskills
zhangskills / gist:864e9b0ee08c6fff03a7
Created September 3, 2014 13:00
ubuntu安装杂记
d
1
@zhangskills
zhangskills / gist:5733361
Last active December 18, 2015 05:29
CSS浮动DIV撑开父层高度的问题
<div class="content">
<div class="left"></div>
<div class="right">
</div>
<div style="clear:both;"></div>
</div>
@zhangskills
zhangskills / gist:5733355
Created June 8, 2013 00:43
标点符号正则表达式
[^a-zA-Z0-9\一-\龥]
@zhangskills
zhangskills / gist:5733351
Created June 8, 2013 00:42
html5canvas画图及导出
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<canvas id="canvas" width="600" height="300""></canvas>
<br>
<button style="width:80px;background-color:yellow;" onclick='linecolor = "yellow";'>YELLOW</button>
<button style="width:80px;background-color:red;" onclick='linecolor = "red";'>RED</button>
@zhangskills
zhangskills / gist:5733314
Created June 8, 2013 00:27
css实现三角形,兼容ie6
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>css三角形</title>
<style>
.tipArrow {
/*右边有颜色,其他透明*/
border-color: transparent #e00 transparent transparent;
border-style: solid;
alert("hello word!");
1
type MartiniPongo2 struct {
http.ResponseWriter
Context map[string]interface{}
}
func (m *MartiniPongo2) Html(fileName string, context map[string]interface{}) {
for k, v := range context {
m.Context[k] = v
}
var tpl = pongo2.Must(pongo2.FromFile("templates/" + fileName))