-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatom.xml
338 lines (244 loc) · 26.1 KB
/
atom.xml
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
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[Nyami's Blog]]></title>
<link href="http://www.nyami.uk/atom.xml" rel="self"/>
<link href="http://www.nyami.uk/"/>
<updated>2018-09-29T08:36:43+00:00</updated>
<id>http://www.nyami.uk/</id>
<author>
<name><![CDATA[Douglas Cameron]]></name>
</author>
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[Dotnet Sln Add]]></title>
<link href="http://www.nyami.uk/blog/2018/08/17/dotnet-sln-add/"/>
<updated>2018-08-17T09:02:03+00:00</updated>
<id>http://www.nyami.uk/blog/2018/08/17/dotnet-sln-add</id>
<content type="html"><![CDATA[<p>It’s been a while since I’d created a number dotnet projects and supporting solution using the command line so I had to refer to the <a href="https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet">documentation</a> to keep me right. As I had just created a number of projects adding each one to the solution is a little tedious so when I’d spotted I could use <a href="https://en.wikipedia.org/wiki/Glob_(programming">globbing patterns</a>) I thought this would save time and a few key presses.</p>
<!--more-->
<p>However, when I ran <code>dotnet sln Foo.sln add **/*.csproj</code> I was presented with the error <code>Could not find project or directory **/*.csproj</code>. It turns out that globbing is not actually supported by the CLI but actually a shell feature and PowerShell wasn’t expanding the glob. Luckly as dotnet is cross platform and I have <a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10">Windows Subsystem for Linux</a> installed with all the dotnet goodness I could switch to <code>bash</code>, ensure globbing was enabled using <code>shopt -s globstar</code>, and then run <code>dotnet sln Foo.sln add **/*.csproj</code> to add all my new projects, job done…</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[RGUHack 2018]]></title>
<link href="http://www.nyami.uk/blog/2018/04/10/rguhack-2018/"/>
<updated>2018-04-10T18:21:49+00:00</updated>
<id>http://www.nyami.uk/blog/2018/04/10/rguhack-2018</id>
<content type="html"><![CDATA[<p>I’ll be helping out at <a href="https://rguhack.uk">RGUHack</a> this coming weekend so I thought I’d pull together a few links from <a href="https://docs.microsoft.com/en-gb/azure/index#pivot=products&panel=all">some of the Azure services</a> available which might help the students build something awesome a little quicker. Hopefully the students have taken advantage of Github’s <a href="https://education.github.com/pack">Student Developer Pack</a> to pick up some free Azure credit, but if they haven’t, its easy to get started for free at <a href="https://azure.microsoft.com/en-us/free/">https://azure.microsoft.com/en-us/free/</a></p>
<!--more-->
<h2>Hosting</h2>
<p><a href="https://docs.microsoft.com/azure/app-service/">Azure Web Apps</a> will let you host your web application without having to manage infrastructure and you can be live in minuets. As you might expect Azure Web supports web applications created using <a href="https://docs.microsoft.com/en-gb/azure/app-service/app-service-web-get-started-dotnet-framework">.NET</a> (including <a href="https://docs.microsoft.com/en-gb/azure/app-service/app-service-web-get-started-dotnet">Core</a>) and <a href="https://docs.microsoft.com/en-gb/azure/app-service/app-service-web-get-started-html">Static HTML</a> but it also supports <a href="https://docs.microsoft.com/en-gb/azure/app-service/app-service-web-get-started-php">PHP</a>, <a href="https://docs.microsoft.com/en-gb/azure/app-service/app-service-web-get-started-nodejs">Node.js</a>, <a href="https://docs.microsoft.com/en-gb/azure/app-service/app-service-web-get-started-python">Python</a> and <a href="https://docs.microsoft.com/en-gb/azure/app-service/app-service-web-get-started-java">Java</a>.</p>
<h2>Compute</h2>
<p>One of the great features of Azure are <a href="https://docs.microsoft.com/en-gb/azure/azure-functions/">Azure Functions</a>, these allow you run your code on demand without having to consider the infrastructure, coupled with <a href="https://docs.microsoft.com/en-us/azure/logic-apps/">Logic Apps</a> Azure Functions can help build powerful workflows to solve many problems.</p>
<p>If you need a little more power or require to be a little closer to the actual OS you can spin up a virtual machine or two. Options include various flavours of <a href="https://docs.microsoft.com/en-gb/azure/virtual-machines/linux/tutorial-create-vmss">Linux</a> and of course <a href="https://docs.microsoft.com/en-gb/azure/virtual-machines/windows/">Windows</a>, alternatively you could create and use <a href="https://docs.microsoft.com/en-gb/azure/container-instances/">Containers</a> to get something up and running.</p>
<h2>Storage</h2>
<p>There are <a href="https://docs.microsoft.com/en-us/azure/#pivot=products&panel=storage">lots of solutions</a> for storing data in Azure, most commonly used are <a href="https://docs.microsoft.com/en-us/azure/storage/common/storage-introduction#blob-storage">Blob</a> and <a href="https://docs.microsoft.com/en-us/azure/storage/common/storage-introduction#azure-files">File</a> storage, <a href="https://docs.microsoft.com/en-us/azure/cosmos-db/introduction">Cosmos DB</a>, <a href="https://docs.microsoft.com/en-us/azure/sql-database/sql-database-technical-overview">SQL</a> and <a href="https://docs.microsoft.com/en-us/azure/redis-cache/">Redis Cache</a>.</p>
<h2>Cognitive Services</h2>
<p>This is where things get interesting, the smart people at Microsoft have created a huge range of services that I have no doubt will help accelerate just about any idea at a Hackathon!</p>
<h3>Text</h3>
<p>The internet is full of text, be it tweets, Facebook posts, news articles, emails, or much more. Azure have a range of services that can help analyze text content, so if any of the challenges call for some text analysis like detecting fake news, one of these features are going to make things a whole lot easier! <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/bing-spell-check/proof-text">Spell check</a>; <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-sentiment-analysis">Sentiment Analysis</a>; <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-keyword-extraction">Key Phrase Extraction</a>; <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-language-detection">Language Detection</a>; <a href="https://azure.microsoft.com/en-us/services/cognitive-services/translator-text-api/">Text Translate Services</a>;</p>
<h3>Images</h3>
<p>Cameras are just about everywhere, web cams, phones, drones, dash cams and even door bells! If any of the challenges require you analyse the images from any of those devices Cognitive Services has a series of APIs and tools to help. You can <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/emotion/home">Detect Emotions</a>, <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/face/">Recognise Faces</a>, <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/Custom-Vision-Service/home">Create a Custom Image Classifier</a>, <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/content-moderator/overview">Moderate Content</a>, <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/quickstarts/csharp#optical-character-recognition-ocr-with-computer-vision-api-using-ca-nameocr-a">Extract Text from images</a>, <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/quickstarts/csharp#GetThumbnail">Generate Image Thumbnails</a>, or even <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/quickstarts/csharp#analyze-an-image-with-computer-vision-api-using-c-a-nameanalyzeimage-a">Extract Visual Features</a>.</p>
<h3>Speech</h3>
<p>Microsoft Azure provides <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/speaker-recognition/home">Speaker Recognition</a>, <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/Speech/Home#speech-to-text-speech-recognition">Speech to Text</a>, <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/Speech/Home#text-to-speech-speech-synthesis">Text to Speech</a> and <a href="https://azure.microsoft.com/en-us/services/cognitive-services/translator-speech-api/">Translation to and from 10 languages</a>.</p>
<h3>Video</h3>
<p>You are not limited to analysing images or speech, you can analyse video as well. Cognitive Services includes <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/video-indexer/video-indexer-overview">Vision APIs for videos</a>. With these APIs you can perform face detection and tracking, motion detection, image stabilisation and video thumbnail generation. It’s also possible to use the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/video-indexer/video-indexer-overview">Video Indexer</a> to get an audio transcript, track faces, map and understand which speaker spoke which words and when, determine when a scene changes and a whole lot more!</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Simple Ping Middleware]]></title>
<link href="http://www.nyami.uk/blog/2018/02/09/simple-ping-middleware/"/>
<updated>2018-02-09T16:18:39+00:00</updated>
<id>http://www.nyami.uk/blog/2018/02/09/simple-ping-middleware</id>
<content type="html"><![CDATA[<p>If you find yourself needing to create a simple ping endpoint often used by load balancers as a quick check to see if traffic can be directed to your site, rather than complicating the simple and creating an MVC controller etc consider simple middleware.</p>
<!--more-->
<p>The ASP.NET Core request pipeline consists of a sequence of request delegates, these delegates are configured using <a href="https://docs.microsoft.com/en-us/dotnet/api/Microsoft.AspNetCore.Builder.RunExtensions?view=aspnetcore-2.0">Run</a>, <a href="https://docs.microsoft.com/en-us/dotnet/api/Microsoft.AspNetCore.Builder.MapExtensions?view=aspnetcore-2.0">Map</a> and <a href="https://docs.microsoft.com/en-us/dotnet/api/Microsoft.AspNetCore.Builder.UseExtensions?view=aspnetcore-2.0">Use</a>, and for our simple ping endpoint Map is a perfect fit. Map will create a branch in the pipeline allowing you to break out of the normal flow which could have the advantage as it can keep this as lightweight as you need. The following can be used to return a 200 response to indicate our site should be good to go, if you need to add some health checks or additional logic you could create more complex middleware.</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>app.Map("/ping",
</span><span class='line'> ping => ping.Run(async conext => await conext.Response.WriteAsync("ok")));</span></code></pre></td></tr></table></div></figure>
<p>For more information on Middleware check out <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?tabs=aspnetcore2x#writing-middleware">ASP.NET Core Middleware</a></p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Creating a Self-Signed Certificate for Identity Provider]]></title>
<link href="http://www.nyami.uk/blog/2017/11/18/creating-a-self-signed-certificate-for-identity-provider/"/>
<updated>2017-11-18T09:54:16+00:00</updated>
<id>http://www.nyami.uk/blog/2017/11/18/creating-a-self-signed-certificate-for-identity-provider</id>
<content type="html"><![CDATA[<p>I’d recently had to create a self-signed certificate for use in IdentityProvider4 and was coming up against problems when using the default options with New-SelfSignedCertificate PS module.</p>
<p>Identity Server was throwing “CryptographicException: Invalid provider type specified” and I had ensured the user account had access so it should have been all good. After a little bit of digging it turned out the private keys were not accessible from .NET. David Christiansen’s <a href="http://blog.davidchristiansen.com/2016/05/521/">blog post</a> helped me track down the issue but with a little more research I ended up with the following PowerShell to create a working certificate avoiding additional steps I didnt understand ;).</p>
<!--more-->
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>$idSrvCertificate = New-SelfSignedCertificate `
</span><span class='line'> -Subject "CN=MyIdentityProviderCert" `
</span><span class='line'> -FriendlyName "Identity Server Token Signing" `
</span><span class='line'> -CertStoreLocation "cert:LocalMachine\My" `
</span><span class='line'> -KeyAlgorithm RSA `
</span><span class='line'> -KeySpec Signature `
</span><span class='line'> -KeyLength 2048 `
</span><span class='line'> -KeyUsage DigitalSignature, KeyEncipherment, DataEncipherment, CertSign `
</span><span class='line'> -NotBefore (Get-Date) `
</span><span class='line'> -NotAfter (Get-Date).AddYears(5);
</span><span class='line'>
</span><span class='line'>$username = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name;
</span><span class='line'>
</span><span class='line'>$keyname = (((Get-ChildItem cert:\LocalMachine\my | Where-Object {$_.thumbprint -like $idSrvCertificate.ThumbPrint}).PrivateKey).CspKeyContainerInfo).UniqueKeyContainerName;
</span><span class='line'>
</span><span class='line'>$keypath = $env:ProgramData + "\Microsoft\Crypto\RSA\MachineKeys\";
</span><span class='line'>$fullpath = $keypath + $keyname;
</span><span class='line'>icacls $fullpath /grant $username`:RX;</span></code></pre></td></tr></table></div></figure>
<p> In addition to creating the certificate it will also ensure the current user has read access to the private keys avoiding the need to run VS elevated when developing, this last part could obviously be extracted and reused for your application pool if running Identity Server in IIS.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Bash - I Forgot Sudo]]></title>
<link href="http://www.nyami.uk/blog/2016/10/06/bash-i-forgot-sudo/"/>
<updated>2016-10-06T08:16:59+00:00</updated>
<id>http://www.nyami.uk/blog/2016/10/06/bash-i-forgot-sudo</id>
<content type="html"><![CDATA[<p>If you’re new to running Bash on Windows like me chances are you’ll type some huge long command only to be presented with a nice message telling you that permission was denied and then you realise you forgot “sudo”. Rather than typing the whole thing again prefixing with sudo this handy alias will save you a few keystrokes:</p>
<ul>
<li>Edit bashrc (vi .bashrc)</li>
<li>Add the alias “ffs=‘sudo $(history -p !!)’”</li>
<li>Restart/open bash console</li>
</ul>
<p>And in case you struggle with vi here is a handy <a href="http://www.lagmonster.org/docs/vi.html">cheat sheet</a>.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[RadButton Single Click]]></title>
<link href="http://www.nyami.uk/blog/2016/07/13/radbutton-single-click/"/>
<updated>2016-07-13T20:55:47+00:00</updated>
<id>http://www.nyami.uk/blog/2016/07/13/radbutton-single-click</id>
<content type="html"><![CDATA[<p>A great and easy way to avoid the double-bounce issue and prevent getting duplicate entries etc is to use the <a href="http://demos.telerik.com/aspnet-ajax/button/examples/singleclick/defaultcs.aspx">SingleClick</a> property of the RadButton.</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'><telerik:RadButton runat="server" ID="btnSend" Text="Send" OnClick="btnSend_Click" SingleClick="true" SingleClickText="Sending...">
</span><span class='line'></telerik:RadButton></span></code></pre></td></tr></table></div></figure>
<p>I’ve no idea how I’ve not encountered this RadButton setting before now, saves wiring up custom OnClientClick events…</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[A Blog Is Reborn]]></title>
<link href="http://www.nyami.uk/blog/2016/07/09/a-blog-is-reborn/"/>
<updated>2016-07-09T20:08:33+00:00</updated>
<id>http://www.nyami.uk/blog/2016/07/09/a-blog-is-reborn</id>
<content type="html"><![CDATA[<p>Ok, I started off with the best intention of blogging more regularly but 18 months between blog posts was not quite the cadence I was aiming for! Shortly after setting up the blog I rebuild my machine and completely failed in setting up Octopress, following my own steps in [“A Blog Is Born”] just wasn’t working, I was encountering more problems than I knew how to fix I think because most of the tools weren’t playing nicely with each other on Windows so I gave up in a huff until an easy solution came along.</p>
<!--more-->
<h2>Bash on Windows</h2>
<p>This year at Build Microsoft announced the ability to run native Bash on Ubuntu on Windows! Apart the obvious advantages of being able to use cmatrix or cowsay I was at first a little indifferent about the announcement until I realised that this might actually mean I could get Octopress working on Windows, so if all goes to plan this will be my fool proof guide to setting up Octopress using Bash in Windows 10.</p>
<h3>Installing Bash</h3>
<p>In order to run Bash on Windows you’ll need to be running the Windows 10 Anniversary Update (currently available to Insiders) and then you will need to:
* Turn-on Developer Mode
* Enable the “Windows Subsystem for Linux (beta)” feature</p>
<p>And that’s it, for more information and a more in-depth guide check out <a href="https://msdn.microsoft.com/en-us/commandline/wsl/about">https://msdn.microsoft.com/en-us/commandline/wsl/about</a></p>
<h3>Install the basics</h3>
<p>Once you are up and running with bash you’ll need to install the basic tools using apt-get, here’s the list that I used to get started:</p>
<ul>
<li>make</li>
<li>rake</li>
<li>nodejs</li>
<li>git</li>
<li>ruby1.9.1-dev</li>
<li>bundler</li>
</ul>
<p>I then pulled down everything from Github and picked up the usual Octopress workflow, and if all goes to plan this should be live within the hour.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[TFVC and NuGet Updates]]></title>
<link href="http://www.nyami.uk/blog/2015/01/07/tfvc-and-nuget-updates/"/>
<updated>2015-01-07T12:00:04+00:00</updated>
<id>http://www.nyami.uk/blog/2015/01/07/tfvc-and-nuget-updates</id>
<content type="html"><![CDATA[<p>At some point, for no obvious reason, I kept encountering an error when updating some NuGet packages, the error (TF14092) was basically telling me a file could not be modified as there was a pending delete. Experience has taught me that there is generally a reason for sudden changes in behaviour and after a little analysis I eventually worked it out.</p>
<!--more-->
<p>We currently use TFS2013 for version control, our main solution uses Visual Studio 2013 and we rely on a number of packages from <a href="http://www.nuget.org/">NuGet</a> as well as an internal repository for internal or licensed 3rd libraries. Historically this has not always been the case, we’ve upgraded the solution through various versions of Visual Studio and TFS has also been upgraded from TFS2010, but the occurrence of this problem didn’t appear to tie in with either upgrade. What I eventually worked out was that I had been using a server workspace long after the primary project had been upgraded, it wasn’t until I was free of some of our older projects that I upgraded to a <a href="http://msdn.microsoft.com/en-us/library/bb892960.aspx">local workspace</a> that had actually introduced this behaviour.</p>
<p>Once I realised the root cause the solution was simple, I created a new workspace on my PC but ensured it was a server workspace, opened the solution from this workspace and upgraded my NuGet packages, I could have alternatively changed the existing workspace from local to server but I think local workspaces work better for me.</p>
<p>For future reference the full error is:</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>1 error(s) encountered attempting to perform the add operation on 1 item(s) First error encountered:
</span><span class='line'>TF14092: The item $/SOMEITEM cannot be changed. A parent of this item has a pending delete which must be checked in first.
</span><span class='line'>See output tool window for information on any other errors.</span></code></pre></td></tr></table></div></figure>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[A Blog Is Born]]></title>
<link href="http://www.nyami.uk/blog/2014/12/14/a-blog-is-born/"/>
<updated>2014-12-14T11:23:47+00:00</updated>
<id>http://www.nyami.uk/blog/2014/12/14/a-blog-is-born</id>
<content type="html"><![CDATA[<p>So I’ve decided to start a blog, not for the first time, I’ve had a few attempts on a couple of different platforms from a custom web app to <a href="http://umbraco.com/">Umbraco</a> and I’ve probably got stuff on Geeks with Blogs and Blogger too. This time I’m going for an Octopress and GitHub Pages combo and I know little of either! Thankfully both are fairly well documented and hopefully be able to learn a few things along the way.</p>
<!--more-->
<p>This first post will hopefully detail how to get started, <strong>[SPOILER ALERT]</strong> I guess if you are reading this then this has proven to be successful. I’m using my trusty Surface Pro running Windows 10 Tech Preview so a good starting point looks to be <a href="http://thaiat.github.io/blog/2014/03/13/how-to-install-and-use-octopress-on-windows/">How to Install and Use Octopress on Windows</a> so let’s see how this goes.</p>
<h2>1. Getting the basics installed</h2>
<p>To get started we’ll need a couple of things installed and <a href="https://chocolatey.org">Chocolatey</a> is the best place to start this process! Once installed (or updated in my case) the following packages should be installed:</p>
<ul>
<li><code>choco install git</code></li>
<li><code>choco install ruby -version 1.9.3.54500</code></li>
<li><code>choco install ruby.devkit</code></li>
<li><code>choco install python</code></li>
</ul>
<h2>2. Install Octopress</h2>
<p>Once everything is installed and the command prompt is restarted lets get Octopress installed, configured and deployed.</p>
<ul>
<li><code>git init</code></li>
<li><code>git clone git://github.com/imathis/octopress.git nyami.github.io</code></li>
<li><code>cd nyami.github.io</code></li>
<li><code>gem install bundler</code></li>
<li><code>bundle install</code></li>
<li><code>rake install</code></li>
<li><code>notepad .\_config.yml</code> and update properties and save</li>
<li><code>echo www.nyami.uk >> source/CNAME</code></li>
<li><code>rake new_post["A Blog Is Born"]</code></li>
<li><code>rake generate</code></li>
<li><code>rake preview</code></li>
<li><code>rake setup_github_pages[https://github.com/Nyami/nyami.github.io.git]</code></li>
</ul>
<p>at this point I got the following error:</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>## Set the codepage to 65001 for Windows machines
</span><span class='line'>** Invoke setup_github_pages (first_time)
</span><span class='line'>** Execute setup_github_pages
</span><span class='line'>rake aborted!
</span><span class='line'>ArgumentError: invalid byte sequence in UTF-8
</span><span class='line'>C:/GitHub/nyami.github.io/Rakefile:393:in `strip'
</span><span class='line'>C:/GitHub/nyami.github.io/Rakefile:393:in `blog_url'
</span><span class='line'>C:/GitHub/nyami.github.io/Rakefile:344:in `block in <top (required)>'</span></code></pre></td></tr></table></div></figure>
<p>using the command <code>chcp 65001</code> at this point didn’t help so I had a quick peek at “Rakefile” not really knowing what it is but the problem looked to be around the CNAME file created above so I changed the encoding to ANSI and tried again and this time it was successful.</p>
<p>Now I’m going to try get this up on Github… lets see what happens…</p>
<p><strong>Update</strong>
So looks like everything worked using the following workflow:</p>
<ul>
<li><code>git add .</code></li>
<li><code>git commit -m "first commit of Octopress blog"</code></li>
<li><code>rake deploy</code></li>
<li><code>git push origin source</code></li>
</ul>
<p>This was surprisingly easy, hopefully over the next few months I’ll get some new posts up…</p>
]]></content>
</entry>
</feed>