-
Notifications
You must be signed in to change notification settings - Fork 0
/
curl.go
216 lines (203 loc) · 9.53 KB
/
curl.go
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
package main
import (
"fmt"
"net/http"
"time"
)
func curlHandler(w http.ResponseWriter, r *http.Request) {
loops := 6
for i := 0; i < len(frames)*loops; i++ {
color := 31 + i%6
fmt.Fprintf(w, "\033[2J\033[H")
fmt.Fprintf(w, "\033[%dm", color)
fmt.Fprintf(w, frames[i%len(frames)][1:])
w.(http.Flusher).Flush()
fmt.Fprintf(w, "\033[39m")
time.Sleep(50 * time.Millisecond)
}
fmt.Fprintf(w, "\033[2J\033[H")
fmt.Fprintf(w, "no resume here yet, but thanks for checking me out!\n")
}
var frames = []string{
`
.cccc;;cc;';c.
.,:dkdc:;;:c:,:d:.
.loc'.,cc::c:::,..;:.
.cl;....;dkdccc::,...c;
.c:,';:'..ckc',;::;....;c.
.c:'.,dkkoc:ok:;llllc,,c,';:.
.;c,';okkkkkkkk:;lllll,:kd;.;:,.
co..:kkkkkkkkkk:;llllc':kkc..oNc
.cl;.,oxkkkkkkkkkc,:cll;,okkc'.cO;
;k:..ckkkkkkkkkkkl..,;,.;xkko:',l'
.,...';dkkkkkkkkkkd;.....ckkkl'.cO;
.,,:,.;oo:ckkkkkkkkkkkdoc;;cdkkkc..cd,
.cclo;,ccdkkl;llccdkkkkkkkkkkkkkkkd,.c;
.lol:;;okkkkkxooc::coodkkkkkkkkkkkko'.oc
.c:'..lkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkd,.oc
.lo;,:cdkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkd,.c;
,dx:..;lllllllllllllllllllllllllllllllllc'...
cNO;........................................
`, `
.ckx;'........':c.
.,:c:::::oxxocoo::::,',.
.odc'..:lkkoolllllo;..;d,
;c..:o:..;:..',;'.......;.
,c..:0Xx::o:.,cllc:,'::,.,c.
;c;lkXKXXXXl.;lllll;lKXOo;':c.
,dc.oXXXXXXXXl.,lllll;lXXXXx,c0:
;Oc.oXXXXXXXXo.':ll:;'oXXXXO;,l'
'l;;kXXXXXXXXd'.'::'..dXXXXO;,l'
'l;:0XXXXXXXX0x:...,:o0XXXXx,:x,
'l;;kXXXXXXXXXKkol;oXXXXXXXO;oNc
,c'..ckk0XXXXXXXXXX00XXXXXXX0:;o:.
.':;..:do::ooookXXXXXXXXXXXXXXXo..c;
.',',:co0XX0kkkxxOXXXXXXXXXXXXXXXOc..;l.
.:;'..oXXXXXXXXXXXXXXXXXXXXXXXXXXXXXko;';:.
.ldc..:oOXKXXXXXXKXXKXXXXXXXXXXXXXXXXXXXo..oc
:0o...:dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxo,.:,
cNo........................................;'
`, `
.cc;. ... .;c.
.,,cc:cc:lxxxl:ccc:;,.
.lo;...lKKklllookl..cO;
.cl;.,:'.okl;..''.;,..';:.
.:o;;dkd,.ll..,cc::,..,'.;:,.
co..lKKKkokl.':lloo;''ol..;dl.
.,c;.,xKKKKKKo.':llll;.'oOxl,.cl,.
cNo..lKKKKKKKo'';llll;;okKKKl..oNc
cNo..lKKKKKKKko;':c:,'lKKKKKo'.oNc
cNo..lKKKKKKKKKl.....'dKKKKKxc,l0:
.c:'.lKKKKKKKKKk;....lKKKKKKo'.oNc
,:.'oxOKKKKKKKOxxxxOKKKKKKxc,;ol:.
;c..'':oookKKKKKKKKKKKKKKKKKk:.'clc.
,xl'.,oxo;'';oxOKKKKKKKKKKKKKKKOxxl:::;,.
.dOc..lKKKkoooookKKKKKKKKKKKKKKKKKKKxl,;ol.
cx,';okKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKl..;lc.
co..:dddddddddddddddddddddddddddddddddl::',::.
co...........................................
`, `
.ccccccc.
.,,,;cooolccoo;;,,.
.dOx;..;lllll;..;xOd.
.cdo;',loOXXXXXkll;';odc.
,ol:;c,':oko:cccccc,...ckl.
;c.;kXo..::..;c::'.......oc
,dc..oXX0kk0o.':lll;..cxxc.,ld,
kNo.'oXXXXXXo',:lll;..oXXOo;cOd.
KOc;oOXXXXXXo.':lol;..dXXXXl';xc
Ol,:k0XXXXXX0c.,clc'.:0XXXXx,.oc
KOc;dOXXXXXXXl..';'..lXXXXXo..oc
dNo..oXXXXXXXOx:..'lxOXXXXXk,.:; ..
cNo..lXXXXXXXXXOolkXXXXXXXXXkl,..;:';.
.,;'.,dkkkkk0XXXXXXXXXXXXXXXXXOxxl;,;,;l:.
;c.;:''''':doOXXXXXXXXXXXXXXXXXXOdo;';clc.
;c.lOdood:'''oXXXXXXXXXXXXXXXXXXXXXk,..;ol.
';.:xxxxxocccoxxxxxxxxxxxxxxxxxxxxxxl::'.';;.
';........................................;l'
`, `
.;:;;,.,;;::,.
.;':;........'co:.
.clc;'':cllllc::,.':c.
.lo;;o:coxdllllllc;''::,,.
.c:'.,cl,.'l:',,;;'......cO;
do;';oxoc;:l;;llllc'.';;'.,;.
c..ckkkkkkkd,;llllc'.:kkd;.':c.
'.,okkkkkkkkc;lllll,.:kkkdl,cO;
..;xkkkkkkkkc,ccll:,;okkkkk:,co,
..,dkkkkkkkkc..,;,'ckkkkkkkc;ll.
..'okkkkkkkko,....'okkkkkkkc,:c.
c..ckkkkkkkkkdl;,:okkkkkkkkd,.',';.
d..':lxkkkkkkkkxxkkkkkkkkkkkdoc;,;'..'.,.
o...'';llllldkkkkkkkkkkkkkkkkkkdll;..'cdo.
o..,l;'''''';dkkkkkkkkkkkkkkkkkkkkdlc,..;lc.
o..;lc;;;;;;,,;clllllllllllllllllllllc'..,:c.
o..........................................;'
`, `
.,,,,,,,,,.
.ckKxodooxOOdcc.
.cclooc'....';;cool.
.loc;;;;clllllc;;;;;:;,.
.c:'.,okd;;cdo:::::cl,..oc
.:o;';okkx;';;,';::;'....,:,.
co..ckkkkkddkc,cclll;.,c:,:o:.
co..ckkkkkkkk:,cllll;.:kkd,.':c.
.,:;.,okkkkkkkk:,cclll;.ckkkdl;;o:.
cNo..ckkkkkkkkko,.;loc,.ckkkkkc..oc
,dd;.:kkkkkkkkkx;..;:,.'lkkkkko,.:,
;:.ckkkkkkkkkkc.....;ldkkkkkk:.,'
,dc..'okkkkkkkkkxoc;;cxkkkkkkkkc..,;,.
kNo..':lllllldkkkkkkkkkkkkkkkkkdcc,.;l.
KOc,c;''''''';lldkkkkkkkkkkkkkkkkkc..;lc.
xx:':;;;;,.,,...,;;cllllllllllllllc;'.;od,
cNo.....................................oc
`, `
.ccccccc.
.ccckNKOOOOkdcc.
.;;cc:ccccccc:,:c::,,.
.c;:;.,cccllxOOOxlllc,;ol.
.lkc,coxo:;oOOxooooooo;..:,
.cdc.,dOOOc..cOd,.',,;'....':l.
cNx'.lOOOOxlldOc..;lll;.....cO;
,do;,:dOOOOOOOOOl'':lll;..:d:''c,
co..lOOOOOOOOOOOl'':lll;.'lOd,.cd.
co.'dOOOOOOOOOOOo,.;llc,.,dOOc..dc
co..lOOOOOOOOOOOOc.';:,..cOOOl..oc
.,:;.'::lxOOOOOOOOOo:'...,:oOOOc.'dc
;Oc..cl'':lldOOOOOOOOdcclxOOOOx,.cd.
.:;';lxl''''':lldOOOOOOOOOOOOOOc..oc
,dl,.'cooc:::,....,::coooooooooooc'.c:
cNo.................................oc
`, `
.cccccccc.
.,,,;;cc:cccccc:;;,.
.cdxo;..,::cccc::,..;l.
,do:,,:c:coxxdllll:;,';:,.
.cl;.,oxxc'.,cc,.';;;'...oNc
;Oc..cxxxc'.,c;..;lll;...cO;
.;;',:ldxxxdoldxc..;lll:'...'c,
;c..cxxxxkxxkxxxc'.;lll:'','.cdc.
.c;.;odxxxxxxxxxxxd;.,cll;.,l:.'dNc
.:,''ccoxkxxkxxxxxxx:..,:;'.:xc..oNc
.lc,.'lc':dxxxkxxxxxxxol,...',lx:..dNc
.:,',coxoc;;ccccoxxxxxxxxo:::oxxo,.cdc.
.;':;.'oxxxxxc''''';cccoxxxxxxxxxxxc..oc
,do:'..,:llllll:;;;;;;,..,;:lllllllll;..oc
cNo.....................................oc
`, `
.ccccc.
.cc;'coooxkl;.
.:c:::c:,,,,,;c;;,.'.
.clc,',:,..:xxocc;'..c;
.c:,';:ox:..:c,,,,,,...cd,
.c:'.,oxxxxl::l:.,loll;..;ol.
;Oc..:xxxxxxxxx:.,llll,....oc
.,;,',:loxxxxxxxxx:.,llll;.,,.'ld,
.lo;..:xxxxxxxxxxxx:.'cllc,.:l:'cO;
.:;...'cxxxxxxxxxxxxoc;,::,..cdl;;l'
.cl;':,'';oxxxxxxdxxxxxx:....,cooc,cO;
.,,,::;,lxoc:,,:lxxxxxxxxxxxo:,,;lxxl;'oNc
.cdxo;':lxxxxxxc'';cccccoxxxxxxxxxxxxo,.;lc.
.loc'.'lxxxxxxxxocc;''''';ccoxxxxxxxxx:..oc
olc,..',:cccccccccccc:;;;;;;;;:ccccccccc,.'c,
Ol;......................................;l'
`, `
,ddoodd,
.cc' ,ooccoo,'cc.
.ccldo;...',,...;oxdc.
.,,:cc;.,'..;lol;;,'..lkl.
.dOc';:ccl;..;dl,.''.....oc
.,lc',cdddddlccld;.,;c::'..,cc:.
cNo..:ddddddddddd;':clll;,c,';xc
.lo;,clddddddddddd;':clll;:kc..;'
.,c;..:ddddddddddddd:';clll,;ll,..
;Oc..';:ldddddddddddl,.,c:;';dd;..
.''',:c:,'cdddddddddddo:,''..'cdd;..
.cdc';lddd:';lddddddddddddd;.';lddl,..
.,;::;,cdddddol;;lllllodddddddlcldddd:.'l;
.dOc..,lddddddddlcc:;'';cclddddddddddd;;ll.
.coc,;::ldddddddddddddlcccc:ldddddddddl:,cO;
,xl::,..,cccccccccccccccccccccccccccccccc:;':xx,
cNd.........................................;lOc
`,
}