-
Notifications
You must be signed in to change notification settings - Fork 68
/
options.html
140 lines (132 loc) · 5.6 KB
/
options.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="/js/lib/highlight.js"></script>
<script src="/js/languages/go.js"></script>
<script src="/js/options.js"></script>
<link rel="stylesheet" href="/css/reset.css" type="text/css" media="screen">
<link rel="stylesheet" href="/css/main.css" type="text/css" media="screen">
<link rel="stylesheet" href="/css/options.css" type="text/css" media="screen">
<link rel="stylesheet" href="/css/none.css" type="text/css" media="screen">
<title>Sight Options</title>
</head>
<body class="hljs">
<div>
<h3>Select your theme</h3>
<select id="theme">
<option value="agate">agate</option>
<option value="androidstudio">androidstudio</option>
<option value="arta">arta</option>
<option value="ascetic">ascetic</option>
<option value="atelier-dune.dark">atelier-dune.dark</option>
<option value="atelier-dune.light">atelier-dune.light</option>
<option value="atelier-forest.dark">atelier-forest.dark</option>
<option value="atelier-forest.light">atelier-forest.light</option>
<option value="atelier-heath.dark">atelier-heath.dark</option>
<option value="atelier-heath.light">atelier-heath.light</option>
<option value="atelier-lakeside.dark">atelier-lakeside.dark</option>
<option value="atelier-lakeside.light">atelier-lakeside.light</option>
<option value="atelier-seaside.dark">atelier-seaside.dark</option>
<option value="atelier-seaside.light">atelier-seaside.light</option>
<option value="atelier-sulphurpool.dark">atelier-sulphurpool.dark</option>
<option value="atelier-sulphurpool.light">atelier-sulphurpool.light</option>
<option value="codepen-embed">codepen-embed</option>
<option value="color-brewer">color-brewer</option>
<option value="dark">dark</option>
<option value="darkula">darkula</option>
<option value="default">default</option>
<option value="docco">docco</option>
<option value="far">far</option>
<option value="foundation">foundation</option>
<option value="github">github</option>
<option value="googlecode">googlecode</option>
<option value="hybrid">hybrid</option>
<option value="idea">idea</option>
<option value="ir_black">ir_black</option>
<option value="kimbie.dark">kimbie.dark</option>
<option value="kimbie.light">kimbie.light</option>
<option value="magula">magula</option>
<option value="mono-blue">mono-blue</option>
<option value="monokai">monokai</option>
<option value="monokai_sublime">monokai_sublime</option>
<option value="obsidian">obsidian</option>
<option value="paraiso.dark">paraiso.dark</option>
<option value="paraiso.light">paraiso.light</option>
<option value="pojoaque">pojoaque</option>
<option value="railscasts">railscasts</option>
<option value="rainbow">rainbow</option>
<option value="solarized_dark">solarized_dark</option>
<option value="solarized_light">solarized_light</option>
<option value="sunburst">sunburst</option>
<option value="tomorrow">tomorrow</option>
<option value="tomorrow-night">tomorrow-night</option>
<option value="tomorrow-night-blue">tomorrow-night-blue</option>
<option value="tomorrow-night-bright">tomorrow-night-bright</option>
<option value="tomorrow-night-eighties">tomorrow-night-eighties</option>
<option value="vs">vs</option>
<option value="xcode">xcode</option>
<option value="zenburn">zenburn</option>
</select>
<h3>Select your font</h3>
<select id="font">
<option value="Inconsolata">Inconsolata</option>
<option value="Courier New">Courier New</option>
<option value="Monaco">Monaco</option>
<option value="Anonymous Pro">Anonymous Pro</option>
<option value="DejaVuSansMono">DejaVu Sans Mono</option>
<option value="DroidSansMono">Droid Sans Mono</option>
<option value="Monofur">Monofur</option>
<option value="ProFont">ProFont</option>
<option value="ProggyClean">Proggy Clean</option>
<option value="Consolas">Consolas</option>
</select>
<h3>Select your font size</h3>
<select id="font-size">
<option value="xx-small">xx-small</option>
<option value="x-small">x-small</option>
<option value="small">small</option>
<option value="medium">medium</option>
<option value="large">large</option>
<option value="x-large">x-large</option>
<option value="xx-large">xx-large</option>
</select>
<h3>Line numbers:<input id="line-numbers" type="checkbox"></h3>
<pre id="code" class="go">
package main
import (
"fmt"
"math/rand"
"time"
)
type Runner interface {
Run(distance int) time.Duration
}
type human struct {
name string
}
func (h *human) Run(distance int) time.Duration {
began := time.Now()
for i := 0; i < distance; i++ {
time.Sleep(time.Duration(rand.Intn(100)) * time.Microsecond)
}
return time.Since(began)
}
func main() {
const distance = 30000
runners := []Runner{&human{"John Doe"}, &human{"John Moe"}}
timings := make(chan time.Duration, 2)
for i := range runners {
go func(i int) { timings <- runners[i].Run(distance) }(i)
}
var total time.Duration
for i := 0; i < cap(timings); i++ {
total += <-timings
}
avg := time.Duration(float64(total) / float64(len(runners)))
fmt.Printf("Average run took: %s", avg)
}
</pre>
</div>
</body>
</html>