-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
345 lines (314 loc) · 17.8 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
345
<!DOCTYPE html>
<html lang="en" dir="auto">
<head>
<meta name="generator" content="Hugo 0.124.1"><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="index, follow">
<title>Jesse Swart Coding Blog</title>
<meta name="description" content="">
<meta name="author" content="">
<link rel="canonical" href="https://sswart.github.io/">
<link crossorigin="anonymous" href="/assets/css/stylesheet.b609c58d5c11bb90b1a54e04005d74ad1ddf22165eb79f5533967e57df9c3b50.css" integrity="sha256-tgnFjVwRu5CxpU4EAF10rR3fIhZet59VM5Z+V9+cO1A=" rel="preload stylesheet" as="style">
<link rel="icon" href="https://sswart.github.io/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="https://sswart.github.io/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="https://sswart.github.io/favicon-32x32.png">
<link rel="apple-touch-icon" href="https://sswart.github.io/apple-touch-icon.png">
<link rel="mask-icon" href="https://sswart.github.io/safari-pinned-tab.svg">
<meta name="theme-color" content="#2e2e33">
<meta name="msapplication-TileColor" content="#2e2e33">
<link rel="alternate" type="application/rss+xml" href="https://sswart.github.io/index.xml">
<link rel="alternate" hreflang="en" href="https://sswart.github.io/">
<noscript>
<style>
#theme-toggle,
.top-link {
display: none;
}
</style>
<style>
@media (prefers-color-scheme: dark) {
:root {
--theme: rgb(29, 30, 32);
--entry: rgb(46, 46, 51);
--primary: rgb(218, 218, 219);
--secondary: rgb(155, 156, 157);
--tertiary: rgb(65, 66, 68);
--content: rgb(196, 196, 197);
--code-block-bg: rgb(46, 46, 51);
--code-bg: rgb(55, 56, 62);
--border: rgb(51, 51, 51);
}
.list {
background: var(--theme);
}
.list:not(.dark)::-webkit-scrollbar-track {
background: 0 0;
}
.list:not(.dark)::-webkit-scrollbar-thumb {
border-color: var(--theme);
}
}
</style>
</noscript><meta property="og:title" content="Jesse Swart Coding Blog" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://sswart.github.io/" /><meta property="og:site_name" content="Software Engineering" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Jesse Swart Coding Blog"/>
<meta name="twitter:description" content=""/>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Jesse Swart Coding Blog",
"url": "https://sswart.github.io/",
"description": "",
"thumbnailUrl": "https://sswart.github.io/favicon.ico",
"sameAs": [
]
}
</script>
</head>
<body class="list" id="top">
<script>
if (localStorage.getItem("pref-theme") === "dark") {
document.body.classList.add('dark');
} else if (localStorage.getItem("pref-theme") === "light") {
document.body.classList.remove('dark')
} else if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.body.classList.add('dark');
}
</script>
<header class="header">
<nav class="nav">
<div class="logo">
<a href="https://sswart.github.io/" accesskey="h" title="Jesse Swart Coding Blog (Alt + H)">Jesse Swart Coding Blog</a>
<div class="logo-switches">
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</button>
</div>
</div>
<ul id="menu">
</ul>
</nav>
</header>
<main class="main">
<article class="first-entry">
<header class="entry-header">
<h2 class="entry-hint-parent">TDD with GitHub Copilot in Python
</h2>
</header>
<div class="entry-content">
<p>Though I have some experience with coding in Python, I’ve never actually done TDD in it. I wanted to see if GitHub Copilot could help me with this.
To start off, I needed something to build. Top of mind from the trusty ’list of example projects’ came a system for personal finance administration. I have some previous experience with building such a system, and got a good idea of how I would want that to work....</p>
</div>
<footer class="entry-footer"><span title='2024-06-24 16:06:14 +0200 CEST'>June 24, 2024</span></footer>
<a class="entry-link" aria-label="post link to TDD with GitHub Copilot in Python" href="https://sswart.github.io/post/tdd-python-copilot/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2 class="entry-hint-parent">Quickly Consume External APIs with GitHub Copilot
</h2>
</header>
<div class="entry-content">
<p>Ever had to implement an external API that does have documentation, but does not offer an SDK or OpenAPI spec? GitHub Copilot is a really great tool to help with these kinds of conversions. In this post, I’ll show you how to quickly consume an external API using GitHub Copilot.
The problem I would like to use the OpenWeather API to get the current weather for a specific location. The API documentation is available at https://openweathermap....</p>
</div>
<footer class="entry-footer"><span title='2024-06-21 09:51:32 +0200 CEST'>June 21, 2024</span></footer>
<a class="entry-link" aria-label="post link to Quickly Consume External APIs with GitHub Copilot" href="https://sswart.github.io/post/consume-api-copilot/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2 class="entry-hint-parent">Copilot Data Conversion
</h2>
</header>
<div class="entry-content">
<p>Converting data to different formats with copilot Recently, I got a question from a client if GitHub Copilot would be able to convert data from a table designer tool into working test files. The answer is probably yes! The only requirement is that the table designer tool is able to export its table (or tables) into a textual format, like SQL, JSON or CSV.
Here’s how you could achieve this with Copilot:...</p>
</div>
<footer class="entry-footer"><span title='2024-06-19 13:47:56 +0200 CEST'>June 19, 2024</span></footer>
<a class="entry-link" aria-label="post link to Copilot Data Conversion" href="https://sswart.github.io/post/copilot-data-conversion/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2 class="entry-hint-parent">Access the Log Analytics API with Managed Identity
</h2>
</header>
<div class="entry-content">
<p>Extending your alerts with additional data from the Log Analytics API I recently came accross a scenario where I needed to extend the data that was available in an alert. The alert data that was sent in the actiongroup only contained an EventId field. I was not at liberty to modify the alert, but I did notice an interesting extra property in the payload. The payload looked something like this:...</p>
</div>
<footer class="entry-footer"><span title='2024-01-23 18:37:02 +0100 CET'>January 23, 2024</span></footer>
<a class="entry-link" aria-label="post link to Access the Log Analytics API with Managed Identity" href="https://sswart.github.io/post/mi-loganalyticsapi/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2 class="entry-hint-parent">Authenticate Renovate with Service Principal in Azure DevOps
</h2>
</header>
<div class="entry-content">
<p>If you are using Renovate or a similar tool to manage some aspects of your Azure DevOps repositories, you might have come accross a security issue. Renovate wants to to use a PAT that you created, or the $(System.AccessToken) variable.
You probably want to stay away from creating a PAT yourself for the following reasons:
User Dependency: PATs are tied to the user account that creates them. If that user leaves the organization or if their permissions change, the PAT and any processes using it will be affected....</p>
</div>
<footer class="entry-footer"><span title='2023-05-15 11:28:51 +0200 CEST'>May 15, 2023</span></footer>
<a class="entry-link" aria-label="post link to Authenticate Renovate with Service Principal in Azure DevOps" href="https://sswart.github.io/post/azdo-renovate-spn-authentication/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2 class="entry-hint-parent">Azure DevOps Path Variable Pitfall
</h2>
</header>
<div class="entry-content">
<p>Ever spent too much time debugging an issue that seemed impossible at first, but then turned out to be stupid? I have.
Pipeline I was working on a pipeline. Just your run of the mill deployment pipeline really. I was trying to deploy some resources from a bicep template. It looked something like the following:
variables: path: $(Build.SourcesDirectory)/agw-bicep agwName: 'my-agw' agwRg: 'my-agw-rg' kvName: 'my-agw-kv' trigger: none pool: vmImage: ubuntu-latest jobs: - job: deploy pool: vmImage: ubuntu-latest timeoutInMinutes: 15 steps: - task: AzureCLI@2 displayName: 'Call Azure Cli' inputs: azureSubscription: '<sub>' scriptType: 'pscore' scriptLocation: 'inlineScript' workingDirectory: $(oath) inlineScript: | (....</p>
</div>
<footer class="entry-footer"><span title='2023-03-08 15:13:24 +0100 CET'>March 8, 2023</span></footer>
<a class="entry-link" aria-label="post link to Azure DevOps Path Variable Pitfall" href="https://sswart.github.io/post/azdo-variable-pitfall/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2 class="entry-hint-parent">Secret Scanning in Azure DevOps
</h2>
</header>
<div class="entry-content">
<p>Secret Scanning in Azure DevOps with GitLeaks As you might know, it is important to keep any private keys, passwords and/or other secrets away from your source control. Having secrets in source control poses many risks, the most important one being: you have no idea how or where those secrets will be stored once someone pulls your repository. If your repository is private, then you might argue that it is reasonably safe, but even then secrets will be stored in plain text on the pc of every person that works with the repository....</p>
</div>
<footer class="entry-footer"><span title='2022-08-23 13:53:42 +0200 CEST'>August 23, 2022</span></footer>
<a class="entry-link" aria-label="post link to Secret Scanning in Azure DevOps" href="https://sswart.github.io/post/secret-scanning-azdo/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2 class="entry-hint-parent">dotnet MAUI public key pinning
</h2>
</header>
<div class="entry-content">
<p>dotnet MAUI public key pinning When it comes to client-side security, mobile apps can be a double-edged sword. On the one hand, the software is on a user-controlled device, so security is out of your hands. On the other hand, that device will probably connect to any old public wifi that it can get its hands on. Man-in-the-middle attacks are a definite risk.
Luckily, we can improve protection against these by using certificate pinning, or public key pinning....</p>
</div>
<footer class="entry-footer"><span title='2022-07-31 14:03:34 +0200 CEST'>July 31, 2022</span></footer>
<a class="entry-link" aria-label="post link to dotnet MAUI public key pinning" href="https://sswart.github.io/post/maui-key-pinning/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2 class="entry-hint-parent">Five easy steps to get started with secure DevOps
</h2>
</header>
<div class="entry-content">
<p>The DevOps movement has claimed it’s rightful place in our hearts. If it hasn’t, go read up on it. Working in a proper DevOps environment is amazing, and I cannot recommend enough for any organization to try it.
But, let’s be real. DevOps has been around for a while. It is not the shiny new thing it used to be anymore.
We need something new.
Maybe something security related, security is always an important aspect of creating software....</p>
</div>
<footer class="entry-footer"><span title='2022-07-17 15:50:15 +0200 CEST'>July 17, 2022</span></footer>
<a class="entry-link" aria-label="post link to Five easy steps to get started with secure DevOps" href="https://sswart.github.io/post/five-easy-devsecops-steps/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2 class="entry-hint-parent">Xamarin Development Setup Part 2
<span class="entry-hint" title="Draft">
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" fill="currentColor">
<path
d="M160-410v-60h300v60H160Zm0-165v-60h470v60H160Zm0-165v-60h470v60H160Zm360 580v-123l221-220q9-9 20-13t22-4q12 0 23 4.5t20 13.5l37 37q9 9 13 20t4 22q0 11-4.5 22.5T862.09-380L643-160H520Zm300-263-37-37 37 37ZM580-220h38l121-122-18-19-19-18-122 121v38Zm141-141-19-18 37 37-18-19Z" />
</svg>
</span>
</h2>
</header>
<div class="entry-content">
<p>Xamarin Development Setup Part 2. Continuous Integration/Delivery With our initial solution in place, we will now start defining our build/deployment pipelines. So let us quickly sum up what we want our pipelines to do.
First of all, we want to build the project and run our unit tests each and every time we make a commit, and before we are allowed to merge a pull request. We can do this quickly and often, as the build time is usually a measure of minutes, and so are the unit tests....</p>
</div>
<footer class="entry-footer"><span title='2021-12-17 13:41:44 +0100 CET'>December 17, 2021</span></footer>
<a class="entry-link" aria-label="post link to Xamarin Development Setup Part 2" href="https://sswart.github.io/post/xamarin-development-setup-part-2/"></a>
</article>
<footer class="page-footer">
<nav class="pagination">
<a class="next" href="https://sswart.github.io/page/2/">Next »
</a>
</nav>
</footer>
</main>
<footer class="footer">
<span>© 2024 <a href="https://sswart.github.io/">Jesse Swart Coding Blog</a></span> ·
<span>
Powered by
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
<a href="https://github.com/adityatelange/hugo-PaperMod/" rel="noopener" target="_blank">PaperMod</a>
</span>
</footer>
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
<path d="M12 6H0l6-6z" />
</svg>
</a>
<script>
let menu = document.getElementById('menu')
if (menu) {
menu.scrollLeft = localStorage.getItem("menu-scroll-position");
menu.onscroll = function () {
localStorage.setItem("menu-scroll-position", menu.scrollLeft);
}
}
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener("click", function (e) {
e.preventDefault();
var id = this.getAttribute("href").substr(1);
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({
behavior: "smooth"
});
} else {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView();
}
if (id === "top") {
history.replaceState(null, null, " ");
} else {
history.pushState(null, null, `#${id}`);
}
});
});
</script>
<script>
var mybutton = document.getElementById("top-link");
window.onscroll = function () {
if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
mybutton.style.visibility = "visible";
mybutton.style.opacity = "1";
} else {
mybutton.style.visibility = "hidden";
mybutton.style.opacity = "0";
}
};
</script>
<script>
document.getElementById("theme-toggle").addEventListener("click", () => {
if (document.body.className.includes("dark")) {
document.body.classList.remove('dark');
localStorage.setItem("pref-theme", 'light');
} else {
document.body.classList.add('dark');
localStorage.setItem("pref-theme", 'dark');
}
})
</script>
</body>
</html>