-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
283 lines (229 loc) · 11.7 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
<!DOCTYPE html>
<html lang="english">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="index, follow" />
<link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="http://olipratt.co.uk/theme/stylesheet/style.min.css">
<link rel="stylesheet" type="text/css" href="http://olipratt.co.uk/theme/pygments/monokai.min.css">
<link rel="stylesheet" type="text/css" href="http://olipratt.co.uk/theme/font-awesome/css/font-awesome.min.css">
<link href="http://olipratt.co.uk/static/custom.css" rel="stylesheet">
<link href="http://olipratt.co.uk/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Oli Pratt's Blog Atom">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<!-- Chrome, Firefox OS and Opera -->
<meta name="theme-color" content="#282828">
<!-- Windows Phone -->
<meta name="msapplication-navbutton-color" content="#282828">
<!-- iOS Safari -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<!-- Microsoft EDGE -->
<meta name="msapplication-TileColor" content="#282828">
<meta name="author" content="Oli Pratt" />
<meta name="description" content="Oli Pratt's Thoughts and Writings" />
<meta property="og:site_name" content="Oli Pratt's Blog"/>
<meta property="og:type" content="blog"/>
<meta property="og:title" content="Oli Pratt's Blog"/>
<meta property="og:description" content="Oli Pratt's Thoughts and Writings"/>
<meta property="og:locale" content="en_GB"/>
<meta property="og:url" content="http://olipratt.co.uk"/>
<meta property="og:image" content="http://olipratt.co.uk/static/images/site_logo.png">
<title>Oli Pratt's Blog</title>
</head>
<body>
<aside>
<div>
<a href="http://olipratt.co.uk">
<img src="http://olipratt.co.uk/static/images/site_logo.png" alt="Oli Pratt" title="Oli Pratt">
</a>
<h1><a href="http://olipratt.co.uk">Oli Pratt</a></h1>
<p>Software Engineer</p>
<nav>
<ul class="list">
<li><a href="http://olipratt.co.uk/pages/about-me.html#about-me">About Me</a></li>
<li><a href="https://www.metaswitch.com/" target="_blank">Metaswitch</a></li>
</ul>
</nav>
<ul class="social">
<li><a class="sc-github" href="https://github.com/olipratt" target="_blank"><i class="fa fa-github"></i></a></li>
<li><a class="sc-linkedin" href="https://www.linkedin.com/in/olipratt/" target="_blank"><i class="fa fa-linkedin"></i></a></li>
<li><a class="sc-rss" href="/feeds/all.atom.xml" target="_blank"><i class="fa fa-rss"></i></a></li>
</ul>
</div>
</aside>
<main>
<nav>
<a href="http://olipratt.co.uk"> Home
</a>
<a href="/archives.html">Archives</a>
<a href="/categories.html">Categories</a>
<a href="/tags.html">Tags</a>
<a href="http://olipratt.co.uk/feeds/all.atom.xml"> Atom
</a>
</nav>
<article>
<header>
<h2><a href="http://olipratt.co.uk/rebuilding-makefile-targets-only-when-dependency-content-changes.html#rebuilding-makefile-targets-only-when-dependency-content-changes">Rebuilding Makefile Targets Only When Dependency Content Changes</a></h2>
<p>
Posted on Sun 25 February 2018 in <a href="http://olipratt.co.uk/category/gnu-make.html">GNU Make</a>
• 6 min read
</p>
</header>
<div>
<h4 id="tldr">TL;DR:</h4>
<ul>
<li>
<p>GNU Make decides whether to rebuild a ‘target’ file based on the modification times of ‘dependency’ files of the target.</p>
</li>
<li>
<p>In some cases those dependencies’ modification times can change <em>without</em> the contents of the files changing, thus forcing an unnecessary rebuild.</p>
</li>
<li>
<p>If <code>make</code> was to decide whether to rebuild by looking at the hash of the contents of the dependency files instead, it would only rebuild when the contents changed.</p>
</li>
<li>
<p>I wrote a …</p></li></ul>
<br>
<a class="btn" href="http://olipratt.co.uk/rebuilding-makefile-targets-only-when-dependency-content-changes.html#rebuilding-makefile-targets-only-when-dependency-content-changes"> Continue reading
</a>
</div>
<hr />
</article>
<article>
<header>
<h2><a href="http://olipratt.co.uk/building-vs-code-extensions-in-docker-containers.html#building-vs-code-extensions-in-docker-containers">Building VS Code Extensions in Docker Containers</a></h2>
<p>
Posted on Fri 23 February 2018 in <a href="http://olipratt.co.uk/category/editors.html">Editors</a>
• 3 min read
</p>
</header>
<div>
<img src="/static/images/vscode_banner.png">
<h4 id="tldr">TL;DR:</h4>
<ul>
<li>
<p><a href="https://code.visualstudio.com/">VS Code</a> is an editor that allows you to <a href="https://code.visualstudio.com/docs/extensions/example-hello-world">write</a> and <a href="https://marketplace.visualstudio.com/">share</a> custom extensions.</p>
</li>
<li>
<p>These extensions require <code>Node.js</code> and <code>npm</code> installed, which you might not want to install locally - especially <a href="https://www.bleepingcomputer.com/news/linux/botched-npm-update-crashes-linux-systems-forces-users-to-reinstall/">given recent, scary issues</a>.</p>
</li>
<li>
<p>Instead, using the <code>Dockerfile</code> and commands below, you can build extensions inside a Docker container and still test and run them inside the VS Code installation on the same machine without Node installed.</p>
</li>
</ul>
<h2 id="background">Background</h2>
<p>I’ve been using …</p>
<br>
<a class="btn" href="http://olipratt.co.uk/building-vs-code-extensions-in-docker-containers.html#building-vs-code-extensions-in-docker-containers"> Continue reading
</a>
</div>
<hr />
</article>
<article>
<header>
<h2><a href="http://olipratt.co.uk/docker-container-for-a-simple-flask-app.html#docker-container-for-a-simple-flask-app">Docker Container for a simple Flask App</a></h2>
<p>
Posted on Wed 01 March 2017 in <a href="http://olipratt.co.uk/category/containers.html">Containers</a>
• 3 min read
</p>
</header>
<div>
<img src="/static/images/docker_small_h.png">
<p>Continuing the recent microservices trend, I tried to containerise a previous project, a small REST datastore - <a href="http://olipratt.co.uk/python-rest-api-with-swaggerui.html">microstore</a>.</p>
<p>I’m not going to go into detail on what containers are (not least because I don’t think I could!) - but briefly they are a way to package up an app and it’s dependencies so they can be run in their own mini-environment. The best intro is just to follow the tutorial <a href="https://docs.docker.com/engine/getstarted/">here</a>.</p>
<h2 id="creating-the-container">Creating the Container …</h2>
<br>
<a class="btn" href="http://olipratt.co.uk/docker-container-for-a-simple-flask-app.html#docker-container-for-a-simple-flask-app"> Continue reading
</a>
</div>
<hr />
</article>
<article>
<header>
<h2><a href="http://olipratt.co.uk/python-microservice-logging.html#python-microservice-logging">Python Microservice Logging</a></h2>
<p>
Posted on Sat 25 February 2017 in <a href="http://olipratt.co.uk/category/logging.html">Logging</a>
• 5 min read
</p>
</header>
<div>
<p>After looking into <a href="http://olipratt.co.uk/python-rest-api-with-swaggerui.html">microservices</a> <a href="http://olipratt.co.uk/python-rest-api-client-adhering-to-a-swagger-schema.html">recently</a>, I was running multiple terminals and switching between them to look at logs as they are written to screen. This was a little awkward so I thought it was worth looking for the right way to log to a central location from multiple microservices. Ideally I wanted do this just using the Python logging library, and without adding more dependencies to every service.</p>
<p>This meant a lot of reading around …</p>
<br>
<a class="btn" href="http://olipratt.co.uk/python-microservice-logging.html#python-microservice-logging"> Continue reading
</a>
</div>
<hr />
</article>
<article>
<header>
<h2><a href="http://olipratt.co.uk/rest-apis-notes-and-references.html#rest-apis-notes-and-references">REST APIs Notes and References</a></h2>
<p>
Posted on Sun 12 February 2017 in <a href="http://olipratt.co.uk/category/rest.html">REST</a>
• 1 min read
</p>
</header>
<div>
<p>After working to create a <a href="http://olipratt.co.uk/python-rest-api-with-swaggerui.html">REST API</a> and <a href="http://olipratt.co.uk/python-rest-api-client-adhering-to-a-swagger-schema.html">client</a> recently, here are some notes and resources I found useful. I’ll keep adding to this as I find new info.</p>
<h4 id="general-notes">General notes</h4>
<ul>
<li>
<p>Resource collection names should always be plural.</p>
</li>
<li>
<p>Depending on who (client vs server) names resources, creation switches between <code>PUT</code>/<code>POST</code>:</p>
<ul>
<li>client names resources:<ul>
<li><code>PUT /kittens/<my_kittens_name></code> - creates a resource there</li>
</ul>
</li>
<li>server names resources:<ul>
<li><code>POST /things</code> - Creates a new <code>thing</code> at <code>/things/<autogened_id></code>, with …</li></ul></li></ul></li></ul>
<br>
<a class="btn" href="http://olipratt.co.uk/rest-apis-notes-and-references.html#rest-apis-notes-and-references"> Continue reading
</a>
</div>
<hr />
</article>
<article>
<header>
<h2><a href="http://olipratt.co.uk/python-rest-api-client-adhering-to-a-swagger-schema.html#python-rest-api-client-adhering-to-a-swagger-schema">Python REST API Client Adhering to a Swagger Schema</a></h2>
<p>
Posted on Sat 11 February 2017 in <a href="http://olipratt.co.uk/category/rest.html">REST</a>
• 3 min read
</p>
</header>
<div>
<p>After <a href="http://olipratt.co.uk/python-rest-api-with-swaggerui.html">building a REST API</a> I left it alone for a while before coming back to try and get a client working properly.</p>
<p>Similar goals here to back then - find a good library to use going forwards that does the heavy lifting and make a simple example project. I chose a simple microservice that provides an API for decks of playing cards - like a casino dealer type of thing - which would be a client of …</p>
<br>
<a class="btn" href="http://olipratt.co.uk/python-rest-api-client-adhering-to-a-swagger-schema.html#python-rest-api-client-adhering-to-a-swagger-schema"> Continue reading
</a>
</div>
</article>
<div class="pagination">
<a class="btn float-left" href="http://olipratt.co.uk/index2.html">
<i class="fa fa-angle-left"></i> Older Posts
</a>
</div>
<footer>
<p>© Oli Pratt </p>
<p> Powered by <a href="http://getpelican.com" target="_blank">Pelican</a> - <a href="https://github.com/alexandrevicenzi/flex" target="_blank">Flex</a> theme by <a href="http://alexandrevicenzi.com" target="_blank">Alexandre Vicenzi</a>
</p> </footer>
</main>
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "Blog",
"name": "Oli Pratt's Blog",
"url" : "http://olipratt.co.uk",
"image": "http://olipratt.co.uk/static/images/site_logo.png",
"description": "Oli Pratt's Thoughts and Writings"
}
</script>
</body>
</html>