-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
348 lines (252 loc) · 14.6 KB
/
index.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
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta name="generator" content="Hugo 0.41" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta content="language, programming, automation" name="keywords">
<meta content="Byron ZHU" name="author">
<meta property="og:title" content="雜">
<meta property="og:url" content="https://byronz.github.io/">
<meta property="og:description" content="tech blog">
<meta property="og:type" content="website" />
<title>雜</title>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true
}
});
</script>
<link rel="stylesheet" href="https://byronz.github.io/css/style.css">
<link rel="shortcut icon" href="https://byronz.github.io/wave.ico">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/solarized-dark.min.css">
</head>
<section class="section">
<div class="container">
<nav class="nav">
<div class="nav-left">
<a class="nav-item" href="https://byronz.github.io"><h1 class="title is-4">雜</h1></a>
</div>
<div class="nav-right">
<nav class="nav-item level is-mobile">
<a class="level-item" href="https://github.com/byronz" target="_blank">
<span class="icon">
<i class="fa fa-github"></i>
</span>
</a>
<a class="level-item" href="https://linkedin.com/in/byronzhu" target="_blank">
<span class="icon">
<i class="fa fa-linkedin-square"></i>
</span>
</a>
<a class="level-item" href="/index.xml" target="_blank">
<span class="icon">
<i class="fa fa-rss"></i>
</span>
</a>
</nav>
</div>
</nav>
</div>
</section>
<section class="section">
<div class="container">
<article>
<h1 class="title"><a href="https://byronz.github.io/posts/docker_dev/">Docker Dev</a></h1>
<h2 class="subtitle is-5">December 2, 2019</h2>
<div class="content">
commons installs RUN export DEBIAN_FRONTEND=noninteractive && \ apt update && apt install -y --no-install-recommends \ sudo curl iputils-ping gcc make build-essential git vim openssh-client ca-certificates wget curl sudo gnupg vim iputils-ping && \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false RUN mkdir -p /root/.ssh && \ ssh-keygen -A && \ chmod 0700 /root/.ssh && \ ssh-keyscan github.com > /root/.ssh/known_hosts chmod 600 /root/.ssh/id_rsa RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers RUN groupadd --gid 999 docker && \ useradd -u 1000 -g users -G sudo,docker dev
</div>
</article>
<article>
<h1 class="title"><a href="https://byronz.github.io/posts/pycon_quality/">PYCON 2018 Code Quality</a></h1>
<h2 class="subtitle is-5">June 4, 2018</h2>
<div class="tags">
<a class="button is-link" href="/tags/cleveland">Cleveland</a>
<a class="button is-link" href="/tags/pycon">PYCON</a>
<a class="button is-link" href="/tags/2018">2018</a>
<a class="button is-link" href="/tags/quality">Quality</a>
</div>
<div class="content">
PYCQA pylint vs flake8 https://code.visualstudio.com/docs/python/linting
</div>
</article>
<article>
<h1 class="title"><a href="https://byronz.github.io/posts/init_mac/">Init_mac</a></h1>
<h2 class="subtitle is-5">May 26, 2018</h2>
<div class="tags">
<a class="button is-link" href="/tags/mac">mac</a>
<a class="button is-link" href="/tags/install">install</a>
</div>
<div class="content">
REMIDNER copy your previous terminal history
Set up byronz.github.com ssh-keygen -t rsa -b 4096 -C "byron.zhu.xq@gmail.com" cat ~/.ssh/id_rsa.pub | pbcopy add ssh key in github git clone git@github.com:byronz/blog.git if you have public, need to readd as submodule git rm -f public git submodule add -b master git@github.com:byronz/byronz.github.io.git public cd themes git submodule add -b master git@github.com:mgjohansen/hucore.git hucore install hugo brew install hugo https://gohugo.io/hosting-and-deployment/hosting-on-github/
Python brew install python3 cd /tmp && curl https://bootstrap.
...<a class="button is-link" href="https://byronz.github.io/posts/init_mac/" style="height:28px">
Read more
<span class="icon is-small">
<i class="fa fa-angle-double-right"></i>
</span>
</a>
</div>
</article>
<article>
<h1 class="title"><a href="https://byronz.github.io/posts/tech_tips/">Tech Tips</a></h1>
<h2 class="subtitle is-5">April 20, 2018</h2>
<div class="content">
Mongo console pretty echo DBQuery.prototype._prettyShell = true >> ~/.mongorc.js
</div>
</article>
<article>
<h1 class="title"><a href="https://byronz.github.io/posts/nosql_riak/">Riak</a></h1>
<h2 class="subtitle is-5">February 22, 2018</h2>
<div class="content">
Riak KV Note: I think the official documentation quality is very poor, a lot of links are 404 and not updated
Query option Riak search via Apache Solr Secondary Index Map Reduce Riak TS CREATE TABLE GeoCheckin ( region VARCHAR NOT NULL, - state VARCHAR NOT NULL, | time TIMESTAMP NOT NULL, | --> Column Definitions weather VARCHAR NOT NULL, | temperature DOUBLE, _ PRIMARY KEY ( (region, state, QUANTUM(time, 15, 'm')), <-- Partition Key => group data that will be queried together in the same physical part of the cluster region, state, time <-- Local Key => ) ) Note: Only one quantum function may be specified and it must be the last element of the partition key.
...<a class="button is-link" href="https://byronz.github.io/posts/nosql_riak/" style="height:28px">
Read more
<span class="icon is-small">
<i class="fa fa-angle-double-right"></i>
</span>
</a>
</div>
</article>
<article>
<h1 class="title"><a href="https://byronz.github.io/posts/nosql_mongo/">Mongo</a></h1>
<h2 class="subtitle is-5">February 22, 2018</h2>
<div class="tags">
<a class="button is-link" href="/tags/nosql">nosql</a>
<a class="button is-link" href="/tags/document">document</a>
<a class="button is-link" href="/tags/mongo">mongo</a>
<a class="button is-link" href="/tags/db">db</a>
<a class="button is-link" href="/tags/cluster">cluster</a>
<a class="button is-link" href="/tags/shard">shard</a>
</div>
<div class="content">
Replication Set A replica set in MongoDB is a group of mongod processes that maintain the same data set
A replica set can have only one primary capable of confirming writes with { w: “majority” } write concern
election new leader takes about 10-30s before, after v3.2 ~2s
Shared Cluster https://docs.mongodb.com/manual/tutorial/deploy-shard-cluster/
shard: Each shard contains a subset of the sharded data. Each shard can be deployed as a replica set.
...<a class="button is-link" href="https://byronz.github.io/posts/nosql_mongo/" style="height:28px">
Read more
<span class="icon is-small">
<i class="fa fa-angle-double-right"></i>
</span>
</a>
</div>
</article>
<article>
<h1 class="title"><a href="https://byronz.github.io/posts/nosql_cassandra/">Cassandra</a></h1>
<h2 class="subtitle is-5">February 21, 2018</h2>
<div class="tags">
<a class="button is-link" href="/tags/nosql">nosql</a>
<a class="button is-link" href="/tags/cassandra">cassandra</a>
<a class="button is-link" href="/tags/column">column</a>
<a class="button is-link" href="/tags/db">db</a>
</div>
<div class="content">
Data Model Map<RowKey, SortedMap<ColumnKey, ColumnValue>>
CREATE KEYSPACE sports WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'datacenter1' : 2}; # you can tune the r/w consistency level with keyspace Availability versus Consistency CREATE TABLE crossfit_gyms_by_city ( country_code text, state_province text, city text, gym_name text, opening_date timestamp, PRIMARY KEY ((country_code, state_province, city), opening_date, gym_name) ) WITH CLUSTERING ORDER BY ( opening_data ASC, gym_name ASC ); Cassandra RDBMS Keyspace Database Column Family Table Partition Key Primary Key Partitioner A partitioner determines how data is distributed across the nodes in the cluster (including replicas).
...<a class="button is-link" href="https://byronz.github.io/posts/nosql_cassandra/" style="height:28px">
Read more
<span class="icon is-small">
<i class="fa fa-angle-double-right"></i>
</span>
</a>
</div>
</article>
<article>
<h1 class="title"><a href="https://byronz.github.io/posts/bai/">Bai XianYong</a></h1>
<h2 class="subtitle is-5">February 19, 2018</h2>
<div class="content">
遊園驚夢 白先勇 錢夫人到達臺北近郊天母竇公館的時候,竇公館門前兩旁的汽車已經排滿了,大多是官家的黑色小轎車,錢夫人坐的計程車開到門口她便命令司
...<a class="button is-link" href="https://byronz.github.io/posts/bai/" style="height:28px">
Read more
<span class="icon is-small">
<i class="fa fa-angle-double-right"></i>
</span>
</a>
</div>
</article>
<article>
<h1 class="title"><a href="https://byronz.github.io/posts/mac/">Mac Unicode</a></h1>
<h2 class="subtitle is-5">February 15, 2018</h2>
<div class="content">
Switch to Unicode Hex Input and Type ⌥ +{unicode val}
Tab U+21E5 ⇥ Option U+2325 ⌥ Command U+2318 ⌘ Control U+2303 ⌃ Shift U+21E7 ⇧ Clear U+2327 ⌧ Escape U+238B ⎋
</div>
</article>
<article>
<h1 class="title"><a href="https://byronz.github.io/posts/tsdb/">NOSQL DB</a></h1>
<h2 class="subtitle is-5">February 9, 2018</h2>
<div class="content">
Cassandra Cassandra’s data model consists of keyspaces, column families, keys, and columns.
Data Model Map<RowKey, SortedMap<ColumnKey, ColumnValue>>
CREATE TABLE crossfit_gyms_by_city ( country_code text, state_province text, city text, gym_name text, opening_date timestamp, PRIMARY KEY ((country_code, state_province, city), opening_date, gym_name) ) WITH CLUSTERING ORDER BY ( opening_data ASC, gym_name ASC ); Partitioner A partitioner determines how data is distributed across the nodes in the cluster (including replicas).
Murmur3Partitioner (default): uniformly distributes data across the cluster based on MurmurHash hash values.
...<a class="button is-link" href="https://byronz.github.io/posts/tsdb/" style="height:28px">
Read more
<span class="icon is-small">
<i class="fa fa-angle-double-right"></i>
</span>
</a>
</div>
</article>
</div>
</section>
<section class="section">
<div class="container">
<nav class="level is-mobile">
<div class="level-left">
<div class="level-item">
</div>
</div>
<div class="level-right is-marginless">
<div class="level-item">
<a class="button" href="/page/2/">
Older
<span class="icon is-small is-marginless">
<i class="fa fa-angle-right"></i>
</span>
</a>
</div>
</div>
</nav>
</div>
</section>
<section class="section">
<div class="container has-text-centered">
<p>© 2018 | 朱曉清 | <small>powered by</small> <a href="gohugo.io" target="_blank">Hugo</a></p>
</div>
</section>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/highlight.min.js" integrity="sha256-+bhVTaRmJ/c07eV80nU8gD2cBBF0rYkf1txqXlrbvb0=" crossorigin="anonymous"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/languages/python.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/languages/bash.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/languages/json.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/languages/java.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/languages/yaml.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/languages/elixir.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/languages/scala.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/languages/go.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script>
var doNotTrack = false;
if (!doNotTrack) {
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-108552865-1', 'auto');
ga('send', 'pageview');
}
</script>
<script async src='//www.google-analytics.com/analytics.js'></script>