<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.5">Jekyll</generator><link href="https://blog.kieranties.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://blog.kieranties.com/" rel="alternate" type="text/html" /><updated>2019-06-29T09:23:10+01:00</updated><id>https://blog.kieranties.com/feed.xml</id><title type="html">Kieranties Codes</title><subtitle>Musings, thoughts, ramblings, code.</subtitle><author><name>Kieran Marron</name><email>Kieran@Kieranties.com</email><uri>http://Kieranties.com</uri></author><entry><title type="html">Windows Terminal - Themes and Gifs!</title><link href="https://blog.kieranties.com/2019/06/26/windows-terminal-themes-and-gifs" rel="alternate" type="text/html" title="Windows Terminal - Themes and Gifs!" /><published>2019-06-26T00:00:00+01:00</published><updated>2019-06-26T00:00:00+01:00</updated><id>https://blog.kieranties.com/2019/06/26/windows-terminal-themes-and-gifs</id><content type="html" xml:base="https://blog.kieranties.com/2019/06/26/windows-terminal-themes-and-gifs">&lt;p&gt;Microsoft has made great strides over the last few years to improve the developer
tool chain; &lt;a href=&quot;https://visualstudio.microsoft.com/&quot;&gt;Visual Studio&lt;/a&gt;, &lt;a href=&quot;https://code.visualstudio.com/&quot;&gt;Visual Studio Code&lt;/a&gt; (their &lt;a href=&quot;https://visualstudio.microsoft.com/vs/mac/&quot;&gt;Mac&lt;/a&gt; variants!), &lt;a href=&quot;https://docs.microsoft.com/en-us/windows/wsl/install-win10&quot;&gt;WSL&lt;/a&gt; and
all the work going into open-sourcing frameworks such as &lt;a href=&quot;https://dotnet.microsoft.com/&quot;&gt;dotnet&lt;/a&gt; and
&lt;a href=&quot;https://github.com/powershell/powershell&quot;&gt;PowerShell&lt;/a&gt; have led to renewed enthusiasm when developing on a Windows machine.&lt;/p&gt;

&lt;p&gt;Poor old cmd.exe didn’t get much love… And it still won’t.  Microsoft are now
developing a new &lt;a href=&quot;https://www.microsoft.com/en-us/p/windows-terminal-preview/9n0dx20hk701&quot;&gt;Windows Terminal&lt;/a&gt; application that will support multiple tabs,
font ligatures, emojis, multiple shells, and will also be developed as &lt;a href=&quot;https://github.com/microsoft/terminal&quot;&gt;open source&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The new terminal stores &lt;a href=&quot;https://github.com/microsoft/terminal/blob/master/doc/cascadia/SettingsSchema.md&quot;&gt;configuration&lt;/a&gt; in a &lt;code class=&quot;highlighter-rouge&quot;&gt;profiles.json&lt;/code&gt; file in the users appdata.
This defines &lt;em&gt;global&lt;/em&gt; configuration (such as whether tabs should always be displayed),
&lt;em&gt;profile&lt;/em&gt; configuration (e.g. powershell, cmd etc), and colour &lt;em&gt;schemes&lt;/em&gt;
which can be used across multiple profiles.&lt;/p&gt;

&lt;p&gt;I’m a big fan of the &lt;a href=&quot;https://draculatheme.com/&quot;&gt;Dracula&lt;/a&gt; theme, so the first thing I did was try to add a new
scheme and configure the PowerShell Core profile to use it.  You can do this by
adding a new entry to the &lt;code class=&quot;highlighter-rouge&quot;&gt;schemes&lt;/code&gt; array, and then using the value of the schemes
&lt;code class=&quot;highlighter-rouge&quot;&gt;name&lt;/code&gt; property in the &lt;code class=&quot;highlighter-rouge&quot;&gt;colorScheme&lt;/code&gt; property of the relevant profile:&lt;/p&gt;

&lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;profiles&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;snipped&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;other&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;properties&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;colorScheme&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Dracula&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;PowerShell Core&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;//...&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;schemes&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;background&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#282A36&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;black&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#21222C&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;blue&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#F1FA8C&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;brightBlack&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#6272A4&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;brightBlue&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#D6ACFF&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;brightCyan&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#A4FFFF&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;brightGreen&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#69FF94&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;brightPurple&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#FF92DF&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;brightRed&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#FF6E6E&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;brightWhite&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#FFFFFF&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;brightYellow&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#FFFFA5&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;cyan&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#8BE9FD&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;foreground&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#F8F8F2&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;green&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#50FA7B&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Dracula&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;purple&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#BD93F9&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;red&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#FF5555&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;white&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#F8F8F2&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;yellow&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#F1FA8C&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;While not completely true to the Dracula theme, this was quick and painless.
So quick, I wondered if changing the properties of the profile could be
automated…&lt;/p&gt;

&lt;h2 id=&quot;giftermps1&quot;&gt;gifterm.ps1&lt;/h2&gt;

&lt;p&gt;If you work in an office, one of the most important things you should do when
leaving your desk is &lt;strong&gt;lock your machine&lt;/strong&gt;.  This is a simple key-stroke that keeps
your machine secure.  It may seem minor, but it’s good practice to lock &lt;em&gt;any&lt;/em&gt;
device which you are not actively using.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;gifterm.ps1&lt;/code&gt; is a quick and dirty PowerShell script that can be used to remind people
how easily their machine can be breached if they leave it unlocked.&lt;/p&gt;

&lt;p&gt;Once invoked, the script will grab the top images from giphy.com for the given
query (‘cats’ by default) and then update each profile for the new terminal
with a random downloaded gif.  To really hammer things home, it also doesn’t
pollute the console, and terminates the active process once complete.  So you
can run it quickly and walk away…&lt;/p&gt;

&lt;p&gt;To reduce the number of keystrokes required, I’ve created a bitly link to the &lt;a href=&quot;https://gist.github.com/Kieranties/e78f8cc26f87c3dec3ab155816bce372&quot;&gt;gist&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;PS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;iwr &lt;/span&gt;bitly.com/gifterm | &lt;span class=&quot;nb&quot;&gt;iex&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# All cats, all the time&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;PS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$env&lt;/span&gt;:gifq&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'swear trek'&lt;/span&gt;; &lt;span class=&quot;nb&quot;&gt;iwr &lt;/span&gt;bitly.com/gifterm | &lt;span class=&quot;nb&quot;&gt;iex&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# He's f*%&amp;amp;$d Jim!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/e78f8cc26f87c3dec3ab155816bce372.js&quot;&gt; &lt;/script&gt;</content><author><name>Kieran Marron</name><email>Kieran@Kieranties.com</email><uri>http://Kieranties.com</uri></author><category term="Scripting" /><category term="PowerShell" /><summary type="html">Microsoft has made great strides over the last few years to improve the developer tool chain; Visual Studio, Visual Studio Code (their Mac variants!), WSL and all the work going into open-sourcing frameworks such as dotnet and PowerShell have led to renewed enthusiasm when developing on a Windows machine.</summary></entry><entry><title type="html">Git Next - Using Git Aliases for Presentations</title><link href="https://blog.kieranties.com/2019/04/06/git-next" rel="alternate" type="text/html" title="Git Next - Using Git Aliases for Presentations" /><published>2019-04-06T00:00:00+01:00</published><updated>2019-04-06T00:00:00+01:00</updated><id>https://blog.kieranties.com/2019/04/06/git-next</id><content type="html" xml:base="https://blog.kieranties.com/2019/04/06/git-next">&lt;p&gt;I recently presented at &lt;a href=&quot;https://www.sugcon.eu/&quot;&gt;Sugcon EU 2019&lt;/a&gt; (more on that in a soon to be written
blog post).  I’ve previously presented or taken part in presenting workshops and
talks, but this was the first time that I knew I would be limited in time to
deliver everything I wanted to cover.&lt;/p&gt;

&lt;p&gt;The talk covered some features built by me and my team at &lt;a href=&quot;https://www.sitecore.com/&quot;&gt;Sitecore&lt;/a&gt;, so there
were some fundamental pieces of code I wanted to demonstrate.  Furthermore,
I wanted to show the &lt;em&gt;progress&lt;/em&gt; of the code as decisions were made. While
setting up the code samples it became clear that I needed a quick way to ‘reset’
my working directory, while also quickly bringing in source code changes &lt;em&gt;and&lt;/em&gt;
ensuring things were in a good state to build/test/debug. Of course, I would
also like code samples to be easily handed over to external developers as soon
as possible after the presentation.&lt;/p&gt;

&lt;p&gt;This gave me a few requirements:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Code should be in a repo - Git was the obvious choice here.&lt;/li&gt;
  &lt;li&gt;I should be able to reset the repo - So I can always begin from a clean state&lt;/li&gt;
  &lt;li&gt;I should be able to progress to the next ‘step’ quickly&lt;/li&gt;
  &lt;li&gt;Each step should be cleaned of any previous changes - If I go off-piste and
modify the code, moving forward puts me in a clean state&lt;/li&gt;
  &lt;li&gt;If possible, I should be able to get notes when moving to the next step&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
  &lt;p&gt;The final requirement came about after practicing the talk. To easily switch
between the slide deck and Visual Studio meant I wouldn’t be able to see
speaker notes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;a-quick-detour-on-git-aliases&quot;&gt;A quick detour on git aliases&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases&quot;&gt;Git aliases&lt;/a&gt; are &lt;strong&gt;&lt;em&gt;awesome&lt;/em&gt;&lt;/strong&gt;.  Seriously.  Aliases are a very simple feature
that enables anyone to become a power user.  Or at least, simplify their life :-)&lt;/p&gt;

&lt;p&gt;An alias is exactly as it sounds, an alternative string to execute a command.
The main advantage is lengthy commands can become trivial; complicated arguments
don’t need to be entered each time.&lt;/p&gt;

&lt;p&gt;E.g. running &lt;code class=&quot;highlighter-rouge&quot;&gt;git config alias.co checkout&lt;/code&gt; in a repo will create the
&lt;code class=&quot;highlighter-rouge&quot;&gt;co&lt;/code&gt; alias.  Now running &lt;code class=&quot;highlighter-rouge&quot;&gt;git co&lt;/code&gt; will do a checkout (okay, not a lengthy
command, but you get the gist).&lt;/p&gt;

&lt;p&gt;Aliases are persisted in the &lt;code class=&quot;highlighter-rouge&quot;&gt;.git\config&lt;/code&gt; file:&lt;/p&gt;
&lt;div class=&quot;language-ini highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nn&quot;&gt;[alias]&lt;/span&gt;
	&lt;span class=&quot;py&quot;&gt;co&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;checkout&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;blockquote&gt;
  &lt;p&gt;You can also persist aliases globally by passing the &lt;code class=&quot;highlighter-rouge&quot;&gt;--global&lt;/code&gt; flag in the
command: &lt;code class=&quot;highlighter-rouge&quot;&gt;git config --global alias.co checkout&lt;/code&gt;. They will then be persisted
in your global config under your user folder. e.g. &lt;code class=&quot;highlighter-rouge&quot;&gt;~/&amp;lt;username&amp;gt;/.gitconfig&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;https://www.atlassian.com/blog/git/advanced-git-aliases&quot;&gt;Advanced aliases&lt;/a&gt; are where things get really interesting.  They allow
you to write arbitrary bash scripts which can do anything you want. You can
also call out to other shells or executables as needed (but consider the OS and
environment you’re running on). You can even pass arguments to your alias.&lt;/p&gt;

&lt;h2 id=&quot;implementing-git-next&quot;&gt;Implementing Git Next&lt;/h2&gt;

&lt;p&gt;With some basic understanding of git, and the flexibility of aliases, I was then
able to consider an approach to the requirements.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Code should be in a repo - Put code in git.&lt;/li&gt;
  &lt;li&gt;Ability to reset - &lt;code class=&quot;highlighter-rouge&quot;&gt;git reset&lt;/code&gt; is the key&lt;/li&gt;
  &lt;li&gt;Ability to progress to ‘next step’ quickly - Numerical tags make this trivial&lt;/li&gt;
  &lt;li&gt;Each step should be cleaned - &lt;code class=&quot;highlighter-rouge&quot;&gt;git clean&lt;/code&gt; is key here to remove files&lt;/li&gt;
  &lt;li&gt;Ability to get notes when moving to the next step - Annotated tags!&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;annotated-tags-are-the-real-star&quot;&gt;Annotated tags are the real star&lt;/h3&gt;

&lt;p&gt;Using tags allows the repo to be set up and the demonstration path to be
decided separately.  Tags can be specified anywhere in the repo, allowing
progress to jump across branches or even jump backwards in time.  By naming the
tags in a simple sequence, we can easily identify the next tag based on the
current tags name.&lt;/p&gt;

&lt;p&gt;Annotated tags allow the fifth requirement to be delivered.  By annotating tags
with some helpful comments we’re able to give notes during the demo, if needed.&lt;/p&gt;

&lt;h2 id=&quot;the-setup&quot;&gt;The setup&lt;/h2&gt;
&lt;p&gt;I created my git repo and began work on the demo.  As I completed key features I
tagged them so that I knew it was a point to highlight.  Once I had completed
the code I tidied things up so there were fewer commits, but this wasn’t
really necessary.&lt;/p&gt;

&lt;p&gt;Each point that I wanted to highlight was tagged with an annotated tag
where each tag was named sequentially from ‘1’:&lt;/p&gt;
&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;PS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; git tag 1 -m &lt;span class=&quot;s2&quot;&gt;&quot;This is a note&quot;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;PS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; git tag 2 -m &lt;span class=&quot;s2&quot;&gt;&quot;This is a multiline note&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;`n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;*Line endings will vary&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;`n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;*depending on your shell&quot;&lt;/span&gt;
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;the-aliases&quot;&gt;The aliases&lt;/h2&gt;
&lt;p&gt;I edited the &lt;code class=&quot;highlighter-rouge&quot;&gt;.git\config&lt;/code&gt; and added the following:
&lt;script src=&quot;https://gist.github.com/d0f7a411af95019c56e40541d9be3897.js&quot;&gt; &lt;/script&gt;&lt;/p&gt;

&lt;p&gt;The commands can be broken down as follows:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;git start&lt;/code&gt; - Receives an optional number (the tag to select). If no number
is provided ‘1’ is selected by default. The repo is reset to that tag,
additional files are cleaned and then the tag message is displayed&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;git next&lt;/code&gt; - Gets the current tag, increments by 1, then calls &lt;code class=&quot;highlighter-rouge&quot;&gt;git start&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;git prev&lt;/code&gt; - Gets the current tag, decrements by 1, then calls &lt;code class=&quot;highlighter-rouge&quot;&gt;git start&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The aliases can then be used as follows:&lt;/p&gt;
&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# Start at the beginning of the demo&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;PS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; git &lt;span class=&quot;nb&quot;&gt;start&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# Move to the next step&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;PS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; git next
&lt;span class=&quot;c1&quot;&gt;# Move to the previous step&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;PS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; git prev
&lt;span class=&quot;c1&quot;&gt;# Move to an arbitrary step&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;PS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; git &lt;span class=&quot;nb&quot;&gt;start&lt;/span&gt; &amp;lt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As you can see from the gif, I was now able to move around my repo with ease,
getting notes where needed &lt;em&gt;and&lt;/em&gt; be confident that each step gave me a clean
base to work from.  Things even worked happily with Visual Studio, where changes
to the csproj were picked up and loaded without causing issues.&lt;/p&gt;

&lt;p&gt;I’ll definitely be using this in demos moving forward.&lt;/p&gt;</content><author><name>Kieran Marron</name><email>Kieran@Kieranties.com</email><uri>http://Kieranties.com</uri></author><category term="Git" /><category term="Scripting" /><summary type="html">I recently presented at Sugcon EU 2019 (more on that in a soon to be written blog post). I’ve previously presented or taken part in presenting workshops and talks, but this was the first time that I knew I would be limited in time to deliver everything I wanted to cover.</summary></entry><entry><title type="html">Write-Information With Colours</title><link href="https://blog.kieranties.com/2018/03/26/write-information-with-colours" rel="alternate" type="text/html" title="Write-Information With Colours" /><published>2018-03-26T00:00:00+01:00</published><updated>2018-03-26T00:00:00+01:00</updated><id>https://blog.kieranties.com/2018/03/26/write-information-with-colours</id><content type="html" xml:base="https://blog.kieranties.com/2018/03/26/write-information-with-colours">&lt;p&gt;When learning PowerShell, one of the first things you learn is that the command
&lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Host&lt;/code&gt; is super useful.  It lets you write messages to the console and
allows you to specify optional foreground and background colors.&lt;/p&gt;

&lt;p&gt;However, the very next thing you learn is:&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;Don’t use &lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Host&lt;/code&gt; - it can’t be suppressed or redirected.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So how do you write messages to the user?&lt;/p&gt;

&lt;h2 id=&quot;write-information&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Information&lt;/code&gt;&lt;/h2&gt;

&lt;p&gt;In PowerShell 5, a new stream was introduced.  PowerShell already had Verbose,
Debug, Warning, Error, and Output streams, but it was now time to add an
&lt;em&gt;Information&lt;/em&gt; stream. Ed Wilson has a great write-up on its introduction
&lt;a href=&quot;https://blogs.technet.microsoft.com/heyscriptingguy/2015/07/04/weekend-scripter-welcome-to-the-powershell-information-stream/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;why&quot;&gt;Why?&lt;/h3&gt;
&lt;p&gt;One of the key problems with &lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Host&lt;/code&gt; is that it goes directly to the host
implementation.  There it is consumed and effectively ‘lost’ to the user.
By introducing &lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Information&lt;/code&gt; and the new stream, users
can now redirect the stream and modify its impact using &lt;code class=&quot;highlighter-rouge&quot;&gt;$InformationPreference&lt;/code&gt;
and the common parameter &lt;code class=&quot;highlighter-rouge&quot;&gt;-InformationAction&lt;/code&gt; for cmdlets.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/90ff3b32f4645577a1f201f3092300bd.js?file=Write-InformationExample.ps1&quot;&gt; &lt;/script&gt;

&lt;p&gt;With the new stream available, the implementation of &lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Host&lt;/code&gt; was then changed
to &lt;em&gt;redirect&lt;/em&gt; to &lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Information&lt;/code&gt;.  To make the changes non-breaking the
&lt;code class=&quot;highlighter-rouge&quot;&gt;-InformationAction&lt;/code&gt; is always treated as &lt;code class=&quot;highlighter-rouge&quot;&gt;Continue&lt;/code&gt; to ensure that
existing uses of &lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Host&lt;/code&gt; continue to display as they did in previous
versions of PowerShell.&lt;/p&gt;

&lt;p&gt;This means:&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;If a cmdlet calls &lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Host&lt;/code&gt; the user can never hide that message from the console.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For example, all of these messages are still displayed even when attempting to
use &lt;code class=&quot;highlighter-rouge&quot;&gt;$InformationPreference&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;-InformationAction&lt;/code&gt;&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/90ff3b32f4645577a1f201f3092300bd.js?file=Write-HostExample.ps1&quot;&gt; &lt;/script&gt;

&lt;h3 id=&quot;but-what-about-colours&quot;&gt;But what about colours?&lt;/h3&gt;

&lt;p&gt;However, &lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Host&lt;/code&gt; supports &lt;code class=&quot;highlighter-rouge&quot;&gt;-ForegroundColor&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;-BackgroundColor&lt;/code&gt; but
&lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Information&lt;/code&gt; does not. People continue to use
&lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Host&lt;/code&gt; and in doing so they continue to prevent the user from using
&lt;code class=&quot;highlighter-rouge&quot;&gt;$InformationPreference&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;-InformationAction&lt;/code&gt; as intended.&lt;/p&gt;

&lt;h2 id=&quot;how-is-write-host-implemented&quot;&gt;How is &lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Host&lt;/code&gt; implemented?&lt;/h2&gt;

&lt;p&gt;So how can we use the information stream &lt;em&gt;and&lt;/em&gt; also have colours?  Let’s take a
look at the source code to see how &lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Host&lt;/code&gt; is now implemented.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: This isn’t the &lt;em&gt;actual&lt;/em&gt; Windows PowerShell version of the code, but
by checking the PowerShell Core implementation we should get a handle on how
things currently work as well as how things work in the future.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The full implementation of &lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Host&lt;/code&gt; can be seen &lt;a href=&quot;https://github.com/PowerShell/PowerShell/blob/master/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WriteConsoleCmdlet.cs&quot;&gt;here&lt;/a&gt;.  We’re actually
just interested in the &lt;a href=&quot;https://github.com/PowerShell/PowerShell/blob/e86fea6acd508297646e307ffeae2340d0bafaa8/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WriteConsoleCmdlet.cs#L120&quot;&gt;implementation&lt;/a&gt; of &lt;code class=&quot;highlighter-rouge&quot;&gt;ProcessRecord&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;What we can see is the construction of a &lt;code class=&quot;highlighter-rouge&quot;&gt;HostInformationMessage&lt;/code&gt; object
containing the parameters from the cmdlet.  This is then passed on to &lt;code class=&quot;highlighter-rouge&quot;&gt;WriteInformation&lt;/code&gt;
along with a tag of &lt;code class=&quot;highlighter-rouge&quot;&gt;PSHOST&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Taking a look at the &lt;a href=&quot;https://github.com/PowerShell/PowerShell/blob/1b3c8aca507de2984cb14f0780dde94d977c7b8d/src/System.Management.Automation/engine/MshCommandRuntime.cs#L717&quot;&gt;implementation&lt;/a&gt; for &lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Information&lt;/code&gt;  we can see that the tags are checked to see if the the &lt;code class=&quot;highlighter-rouge&quot;&gt;PSHOST&lt;/code&gt; tag is provided and a tag of
&lt;code class=&quot;highlighter-rouge&quot;&gt;FORWARDED&lt;/code&gt; is missing &lt;strong&gt;or&lt;/strong&gt; the current information preference is &lt;code class=&quot;highlighter-rouge&quot;&gt;Continue&lt;/code&gt;.
In the event that this check is passed, the &lt;code class=&quot;highlighter-rouge&quot;&gt;MessageData&lt;/code&gt; of the current record
is tested as a &lt;code class=&quot;highlighter-rouge&quot;&gt;HostInformationMessage&lt;/code&gt; and if found, the message is then
decomposed and its values used to communicate to the host.&lt;/p&gt;

&lt;p&gt;Before all of these checks, there is a call to &lt;code class=&quot;highlighter-rouge&quot;&gt;CBhost.InternalUI.WriteInformationRecord(record);&lt;/code&gt;
where (I assume…) the normal writing of the record occurs.&lt;/p&gt;

&lt;p&gt;From this information we now understand:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;When calling &lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Host&lt;/code&gt; the parameters are packed up and passed to
&lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Information&lt;/code&gt; as a &lt;code class=&quot;highlighter-rouge&quot;&gt;HostInformationMessage&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Information&lt;/code&gt; will process the parameters as a special type &lt;em&gt;if&lt;/em&gt;
    &lt;ul&gt;
      &lt;li&gt;A tag of &lt;code class=&quot;highlighter-rouge&quot;&gt;PSHOST&lt;/code&gt; exists &lt;strong&gt;and&lt;/strong&gt; a tag of &lt;code class=&quot;highlighter-rouge&quot;&gt;FORWARDED&lt;/code&gt; does not&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;or&lt;/strong&gt; The current preference variable is &lt;code class=&quot;highlighter-rouge&quot;&gt;Continue&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We can therefore conclude:&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;Passing a &lt;code class=&quot;highlighter-rouge&quot;&gt;HostInformationMessage&lt;/code&gt; with no &lt;code class=&quot;highlighter-rouge&quot;&gt;PSHOST&lt;/code&gt; tag will ensure only the
preference variable impacts visibility.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;write-informationcolored&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;Write-InformationColored&lt;/code&gt;&lt;/h2&gt;

&lt;p&gt;Taking everything we’ve learnt so far, we can now build a function that will
support user-specified colours when viewed in a console, but also honour the
visibility of the information stream:&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/90ff3b32f4645577a1f201f3092300bd.js?file=Write-InformationColored.ps1&quot;&gt; &lt;/script&gt;

&lt;p&gt;By using the new function, we get all the benefits of the information stream
and its associated preference variable &lt;em&gt;as well as&lt;/em&gt; the simple coloured output
that &lt;code class=&quot;highlighter-rouge&quot;&gt;Write-Host&lt;/code&gt; also supports.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/90ff3b32f4645577a1f201f3092300bd.js?file=Write-InformationColoredExample.ps1&quot;&gt; &lt;/script&gt;

&lt;hr /&gt;
&lt;p&gt;You can grab all the examples from this post &lt;a href=&quot;https://gist.github.com/Kieranties/90ff3b32f4645577a1f201f3092300bd&quot;&gt;here&lt;/a&gt;&lt;/p&gt;</content><author><name>Kieran Marron</name><email>Kieran@Kieranties.com</email><uri>http://Kieranties.com</uri></author><category term="Powershell" /><summary type="html">When learning PowerShell, one of the first things you learn is that the command Write-Host is super useful. It lets you write messages to the console and allows you to specify optional foreground and background colors.</summary></entry><entry><title type="html">Sitecore Install Framework - SUG DK</title><link href="https://blog.kieranties.com/2018/03/20/sif-sug" rel="alternate" type="text/html" title="Sitecore Install Framework - SUG DK" /><published>2018-03-20T00:00:00+00:00</published><updated>2018-03-20T00:00:00+00:00</updated><id>https://blog.kieranties.com/2018/03/20/sif-sug</id><content type="html" xml:base="https://blog.kieranties.com/2018/03/20/sif-sug">&lt;p&gt;A few weeks back, I was in Copenhagen and was able to talk about the &lt;em&gt;Sitecore
Install Framework (SIF)&lt;/em&gt; at the &lt;a href=&quot;https://www.meetup.com/Sitecore-User-Group-Denmark/&quot;&gt;Danish Sitecore UserGroup&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Originally, I was hoping to just listen in to see how people were getting on
with SIF.  After speaking with &lt;a href=&quot;https://twitter.com/anderslaub&quot;&gt;Anders Laub&lt;/a&gt;, he offered the opportunity to
present and have a more hands-on involvement in the workshop.&lt;/p&gt;

&lt;p&gt;This led to setting up a repo with examples and some utility scripts
to help get people up and running.&lt;/p&gt;

&lt;p&gt;In general, it seems SIF is being used and is helping, but there is concern
that it has made Sitecore more complex to install.  This is a totally
valid concern which I hope to address in a few up-coming blog posts.&lt;/p&gt;

&lt;p&gt;For now, check out the examples from the user group and let me know of any
questions.&lt;/p&gt;

&lt;h2 id=&quot;repo&quot;&gt;Repo&lt;/h2&gt;
&lt;p&gt;The repo is available at https://github.com/Kieranties/SIfSug&lt;/p&gt;

&lt;div class=&quot;github-card&quot; data-github=&quot;kieranties/sifsug&quot; data-width=&quot;100%&quot; data-height=&quot;130px&quot; data-theme=&quot;default&quot; data-target=&quot;blank&quot;&gt;&lt;/div&gt;
&lt;script src=&quot;//cdn.jsdelivr.net/github-cards/latest/widget.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;The repo contains:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;An &lt;em&gt;Environment&lt;/em&gt; folder with scripts to configure the instance where SIF will
run and Sitecore will be installed, a script to configure SQL with contained
databases, and also a script to install Solr as a windows service under SSL.&lt;/li&gt;
  &lt;li&gt;An &lt;em&gt;Example&lt;/em&gt; folder with examples for each of the key features in SIF.&lt;/li&gt;
  &lt;li&gt;An &lt;em&gt;Uninstall&lt;/em&gt; folder demonstrating how to write your own configuration to
uninstall Sitecore.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At the root of the repo you’ll also find the install script and the
&lt;a href=&quot;https://github.com/Kieranties/SIfSug/blob/master/parameters.ps1&quot;&gt;parameters.ps1&lt;/a&gt; script which actually controls what is installed.&lt;/p&gt;

&lt;h2 id=&quot;running-locally&quot;&gt;Running Locally&lt;/h2&gt;
&lt;p&gt;The repo contains all the information needed to get up and running locally.
Just follow the guidance in the &lt;a href=&quot;https://github.com/Kieranties/SIfSug/blob/master/Readme.md&quot;&gt;README&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;You &lt;strong&gt;will&lt;/strong&gt; need to modify the values in &lt;code class=&quot;highlighter-rouge&quot;&gt;parameters.ps1&lt;/code&gt; when it comes to the install!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The examples contained in the &lt;em&gt;examples&lt;/em&gt; folder are the same examples used in
the SIF Fundamentals series so you’ll also be able to follow along with the
videos below:&lt;/p&gt;

&lt;!-- Courtesy of embedresponsively.com //--&gt;
&lt;div class=&quot;responsive-video-container&quot;&gt;

  &lt;iframe src=&quot;https://www.youtube.com/embed/videoseries?list=PL1jJVFm_lGnwA8Mfwvpt0yFdsYKL5yT43&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;/div&gt;</content><author><name>Kieran Marron</name><email>Kieran@Kieranties.com</email><uri>http://Kieranties.com</uri></author><category term="Powershell" /><category term="Sitecore Install Framework" /><summary type="html">A few weeks back, I was in Copenhagen and was able to talk about the Sitecore Install Framework (SIF) at the Danish Sitecore UserGroup.</summary></entry><entry><title type="html">Westwood-Scroll</title><link href="https://blog.kieranties.com/2014/09/05/westwood-scroll_51" rel="alternate" type="text/html" title="Westwood-Scroll" /><published>2014-09-05T12:12:00+01:00</published><updated>2014-09-05T12:12:00+01:00</updated><id>https://blog.kieranties.com/2014/09/05/westwood-scroll_51</id><content type="html" xml:base="https://blog.kieranties.com/2014/09/05/westwood-scroll_51">&lt;img alt=&quot;By John Antoni Griffiths [CC-BY-SA-2.0 (http://creativecommons.org/licenses/by-sa/2.0)], via Wikimedia Commons&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/6/6c/Tamer_Hassan%2C_Danny_Dyer_and_Tim_Westwood_Gumball_3000_-_2007.jpg&quot; title=&quot;&quot; /&gt;
&lt;br /&gt;
&lt;strong&gt;Sometimes the random ideas are just fun to make.&lt;/strong&gt;&lt;br /&gt;When was the last time Westwood was “&lt;em&gt;up in your building looking real big…?&lt;/em&gt;“.  Now you can have him in every webpage encouraging you to “&lt;em&gt;get your hustle on baby!&lt;/em&gt;”&lt;br /&gt;Grab the &lt;a href=&quot;https://github.com/Kieranties/westwood-scroll&quot;&gt;source&lt;/a&gt;, check out the &lt;a href=&quot;https://github.com/Kieranties/westwood-scroll/blob/master/example.html&quot;&gt;example&lt;/a&gt; or just scroll this page while putting “&lt;em&gt;your finger in the air and press it four times!&lt;/em&gt;” &lt;script src=&quot;https://rawgit.com/Kieranties/westwood-scroll/master/westwoodscroll.js&quot;&gt;&lt;/script&gt;&lt;script&gt;if(window.location.pathname !== '/'){westwoodscroll(800);}; &lt;/script&gt;</content><author><name>Kieran Marron</name><email>Kieran@Kieranties.com</email><uri>http://Kieranties.com</uri></author><category term="Random" /><category term="Javascript" /><category term="HTML5" /><summary type="html">Sometimes the random ideas are just fun to make.When was the last time Westwood was “up in your building looking real big…?“. Now you can have him in every webpage encouraging you to “get your hustle on baby!”Grab the source, check out the example or just scroll this page while putting “your finger in the air and press it four times!”</summary></entry><entry><title type="html">PS-Pushover – Send Pushover messages from Powershell</title><link href="https://blog.kieranties.com/2013/05/13/ps-pushover-send-pushover-messages-from" rel="alternate" type="text/html" title="PS-Pushover – Send Pushover messages from Powershell" /><published>2013-05-13T08:35:00+01:00</published><updated>2013-05-13T08:35:00+01:00</updated><id>https://blog.kieranties.com/2013/05/13/ps-pushover-send-pushover-messages-from</id><content type="html" xml:base="https://blog.kieranties.com/2013/05/13/ps-pushover-send-pushover-messages-from">I’ve been playing around with &lt;a href=&quot;http://ifttt.com/&quot;&gt;IFTTT.com&lt;/a&gt; recently.&amp;nbsp; Both in an effort to get more organised and as an excuse to make the most out of my awesome new &lt;a href=&quot;http://getpebble.com/&quot; target=&quot;_blank&quot;&gt;Pebble&lt;/a&gt; watch :-)&lt;br /&gt;&lt;br /&gt;If you’ve never heard of IFTTT, go have a play &lt;em&gt;now&lt;/em&gt;.&amp;nbsp; It’s a brilliant site, framework and application designed to plug together many many things.&amp;nbsp; You can use it to:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Send you a text message when it’s someone's birthday on Facebook&lt;/li&gt;&lt;li&gt;Update all your profile pictures across social media applications in one go&lt;/li&gt;&lt;li&gt;Email you the weather update when it’s raining&lt;/li&gt;&lt;li&gt;Fetch new entries to an RSS feed and send to &lt;a href=&quot;http://getpocket.com/&quot; target=&quot;_blank&quot;&gt;Pocket&lt;/a&gt; for reading&lt;/li&gt;&lt;li&gt;Catalogue your starred emails in &lt;a href=&quot;http://evernote.com/&quot; target=&quot;_blank&quot;&gt;Evernote&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;You get the idea, take data from an event in one location and pipe to another.&lt;br /&gt;&lt;br /&gt;One of those pipes is &lt;a href=&quot;https://pushover.net/&quot; target=&quot;_blank&quot;&gt;Pushover&lt;/a&gt;. &amp;nbsp;Pushover is a notification application you can install on your Android/iOS device.&amp;nbsp; It’s a very simple app that will display a feed of messages as they come in but can be restricted by quiet hours, message priority and (most importantly for me) forwards messages to your Pebble.&lt;br /&gt;&lt;br /&gt;After registering on the site I spotted that they allow you to create your own applications for free with a monthly message allowance of &lt;em&gt;7500.&lt;/em&gt; So, let’s make use of it!&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;PS-Pushover&lt;/h4&gt;&lt;br /&gt;I’ve knocked up a Powershell module to do just that.&amp;nbsp; With &lt;a href=&quot;https://github.com/Kieranties/PS-Pushover&quot; target=&quot;_blank&quot;&gt;PS-Pushover&lt;/a&gt; you can add Pushover functionality to anything you can do in Powershell.&amp;nbsp; That means tracking performance of a server, watching for new files, waiting for completion of downloads or jobs to finish etc are all able to send messages as and when needed.&lt;br /&gt;&lt;br /&gt;Here’s a couple of example scripts:&lt;br /&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/Kieranties/5564690.js&quot;&gt;&lt;/script&gt; &lt;br /&gt;&lt;br /&gt;And here’s the results:&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-K5zZ6TMBNvY/UZCVcvAc4pI/AAAAAAAALTM/hgrDpkEL1b8/s1600/IMG_20130512_205726.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://3.bp.blogspot.com/-K5zZ6TMBNvY/UZCVcvAc4pI/AAAAAAAALTM/hgrDpkEL1b8/s320/IMG_20130512_205726.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-wfApwMFaRko/UZCVcxoXxsI/AAAAAAAALTU/klDxOB6LA5A/s1600/IMG_20130512_205911.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://3.bp.blogspot.com/-wfApwMFaRko/UZCVcxoXxsI/AAAAAAAALTU/klDxOB6LA5A/s320/IMG_20130512_205911.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-URqlHoBUneM/UZCVc2NFvtI/AAAAAAAALTQ/YLLnMU1OWZ8/s1600/Screenshot_2013-05-13-08-24-25.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://2.bp.blogspot.com/-URqlHoBUneM/UZCVc2NFvtI/AAAAAAAALTQ/YLLnMU1OWZ8/s320/Screenshot_2013-05-13-08-24-25.png&quot; width=&quot;192&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;</content><author><name>Kieran Marron</name><email>Kieran@Kieranties.com</email><uri>http://Kieranties.com</uri></author><category term="PowerShell" /><category term="Pebble" /><category term="Pushover" /><summary type="html">I’ve been playing around with IFTTT.com recently.&amp;nbsp; Both in an effort to get more organised and as an excuse to make the most out of my awesome new Pebble watch :-)If you’ve never heard of IFTTT, go have a play now.&amp;nbsp; It’s a brilliant site, framework and application designed to plug together many many things.&amp;nbsp; You can use it to:Send you a text message when it’s someone's birthday on FacebookUpdate all your profile pictures across social media applications in one goEmail you the weather update when it’s rainingFetch new entries to an RSS feed and send to Pocket for readingCatalogue your starred emails in EvernoteYou get the idea, take data from an event in one location and pipe to another.One of those pipes is Pushover. &amp;nbsp;Pushover is a notification application you can install on your Android/iOS device.&amp;nbsp; It’s a very simple app that will display a feed of messages as they come in but can be restricted by quiet hours, message priority and (most importantly for me) forwards messages to your Pebble.After registering on the site I spotted that they allow you to create your own applications for free with a monthly message allowance of 7500. So, let’s make use of it!PS-PushoverI’ve knocked up a Powershell module to do just that.&amp;nbsp; With PS-Pushover you can add Pushover functionality to anything you can do in Powershell.&amp;nbsp; That means tracking performance of a server, watching for new files, waiting for completion of downloads or jobs to finish etc are all able to send messages as and when needed.Here’s a couple of example scripts: And here’s the results:</summary></entry><entry><title type="html">PowerShell for Sitecore Item Web API</title><link href="https://blog.kieranties.com/2013/03/01/powershell-for-sitecore-item-web-api" rel="alternate" type="text/html" title="PowerShell for Sitecore Item Web API" /><published>2013-03-01T10:00:00+00:00</published><updated>2013-03-01T10:00:00+00:00</updated><id>https://blog.kieranties.com/2013/03/01/powershell-for-sitecore-item-web-api</id><content type="html" xml:base="https://blog.kieranties.com/2013/03/01/powershell-for-sitecore-item-web-api">My colleague &lt;a href=&quot;https://twitter.com/adamsimsy&quot;
    target=&quot;_blank&quot;&gt;Adam Simmonds&lt;/a&gt; did a demo of the Sitecore Item Web API at work based on the &lt;a href=&quot;https://github.com/herskinduk/Usergroup.ItemWebApi&quot;
    target=&quot;_blank&quot;&gt;code&lt;/a&gt; provided by &lt;a href=&quot;https://twitter.com/herskinduk&quot; target=&quot;_blank&quot;&gt;Kern Herskind&lt;/a&gt; from a recent
Sitecore User Group. &amp;nbsp;It was great to see a small, simple, yet powerful API available to mobile solutions and third-party
services that could operate in a RESTful way.&lt;br /&gt;&lt;br /&gt;The ability to drop into a solution with very minor configuration
changes makes the API incredibly simple to apply to existing solutions (if the Sitecore version is supported of course).&amp;nbsp;
It also follows Sitecore's principle design of pipelines and security; making it really easy to extend with custom functionality
or handlers while also restricting requests at a user level using the security domain set for the website. &amp;nbsp;This means
full control of security restrictions can be applied using the standard Sitecore security model and interface.&lt;br /&gt;&lt;br /&gt;In
short, it’s pretty damn awesome.&lt;br /&gt;&lt;br /&gt;
&lt;h4&gt;Now with added PowerShell&lt;/h4&gt;&lt;br /&gt;On Tuesday evening I knocked up a quick module to send requests to a site running the
API. &amp;nbsp;Yesterday I cleaned it up, improved documentation, and packaged with a proper manifest.&lt;br /&gt;&lt;br /&gt;I’m not entirely
happy with the state of the code but it is now much more usable and in a better state to extend and (hopefully) be useful
to others. &amp;nbsp;I'm still learning PowerShell and need to work out a coding style and development process that works for
me.&lt;br /&gt;&lt;br /&gt;
&lt;h4&gt;Usage&lt;/h4&gt;&lt;br /&gt;The module&amp;nbsp;implements&amp;nbsp;a small handful of commands:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Add-SitecoreItem&lt;/span&gt;&amp;nbsp;– Creates a new Sitecore item,
        optionally setting fields&lt;/li&gt;
    &lt;li&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Get-SitecoreItem&lt;/span&gt;&amp;nbsp;– Gets one or more Sitecore
        items which match the context of the given parameters&lt;/li&gt;
    &lt;li&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Remove-SitecoreItem&lt;/span&gt;&amp;nbsp;– Deletes one or more Sitecore
        items based on the context&lt;/li&gt;
    &lt;li&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Set-SitecoreItem&lt;/span&gt;&amp;nbsp;– Updates the fields of one
        or more Sitecore items&lt;/li&gt;
&lt;/ul&gt;There is an additional&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Invoke-SitecoreRequest&lt;/span&gt;&amp;nbsp;method
which is a special “bare bones” function &amp;nbsp;to allow extended control of the parameters passed to Sitecore.&amp;nbsp; All
other functions act as wrappers to this function, providing validation and parameter restrictions where possible.&lt;br /&gt;&lt;br
/&gt;Aside from making it simple to perform CRUD actions with Sitecore &amp;nbsp;(think bulk uploads, change properties, quick reports
etc) I hope to use this to perform some level of integration testing. &lt;br /&gt;&lt;br /&gt;I'm currently spending a lot of time investigating
(and improving!) build processes. &amp;nbsp;With the aim of making the transition of code from Dev -&amp;gt; Stage -&amp;gt; Live as
seamless and&amp;nbsp;&lt;i&gt;robust&lt;/i&gt;&amp;nbsp;as possible. &amp;nbsp;Increasing the robustness involves validating that packages and items
have been deployed properly. &amp;nbsp;This looks like it may be a useful tool to perform validation of fields that have been
updated.&lt;br /&gt;&lt;br /&gt;
&lt;h4&gt;Download and Install&lt;/h4&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;All the information you need is available at the &lt;a href=&quot;https://github.com/Kieranties/PSSitecoreItemWebApi&quot;
    target=&quot;_blank&quot;&gt;Github repo&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If you don't have the Sitecore Item Web API installed already you can download
the API and documentation from &lt;a href=&quot;https://www.google.co.uk/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=4&amp;amp;cad=rja&amp;amp;ved=0CEgQFjAD&amp;amp;url=http%3A%2F%2Fsdn.sitecore.net%2FSDN5%2FProducts%2FSitecore%2520Item%2520Web%2520API%2FSitecoreItemWebApi10.aspx&amp;amp;ei=ytsvUaP8BuPE0QWG5IHIAQ&amp;amp;usg=AFQjCNGgG2v33aikFY8lPxf4MXf2CLUlZA&amp;amp;bvm=bv.43148975,d.d2k&quot;
    target=&quot;_blank&quot;&gt;Sitecore&lt;/a&gt;&amp;nbsp;(You'll need an SDN login).&lt;br /&gt;&lt;br /&gt;
&lt;h4&gt;Examples&lt;/h4&gt;&lt;br /&gt;&lt;em&gt;For demo purposes the account used here is an admin.&amp;nbsp; To restrict access, use Sitecore roles and the configuration options in the Sitecore Item Web API config include.&lt;/em&gt;&lt;br
/&gt;
&lt;h5&gt;Getting an item&lt;/h5&gt;
&lt;script async src=&quot;https://gist.github.com/Kieranties/5059684.js?file=Get-SitecoreItem.ps1&quot;&gt;&lt;/script&gt; &lt;br /&gt;
&lt;h5&gt;Adding an item&lt;/h5&gt;
&lt;script src=&quot;https://gist.github.com/Kieranties/5059684.js?file=Add-SitecoreItem.ps1&quot;&gt;&lt;/script&gt; &lt;br /&gt;
&lt;h5&gt;Setting an item&lt;/h5&gt;
&lt;script src=&quot;https://gist.github.com/Kieranties/5059684.js?file=Set-SitecoreItem.ps1&quot;&gt;&lt;/script&gt; &lt;br /&gt;
&lt;h5&gt;Removing an item&lt;/h5&gt;
&lt;script src=&quot;https://gist.github.com/Kieranties/5059684.js?file=Remove-SitecoreItem.ps1&quot;&gt;&lt;/script&gt; &lt;br /&gt;
&lt;h4&gt;Further Work&lt;/h4&gt;
&lt;ol&gt;
    &lt;li&gt;Tests - seriously, if I want to use this for testing and building I’m going to need a decent test suite to know things
        are working as expected.&amp;nbsp; This will also give me a chance to get to grips with &lt;a href=&quot;https://github.com/pester/Pester&quot;
            target=&quot;_blank&quot;&gt;Pester&lt;/a&gt;. &lt;/li&gt;
    &lt;li&gt;Additional functions – RSA encryption and the ability to upload media are next on the list &lt;/li&gt;
    &lt;li&gt;Pipelining – PowerShell functions are even more useful when you chain them together.&amp;nbsp; It would be great to run something
        like: &lt;span style=&quot;font-family: courier new, courier, monospace;&quot;&gt;Import-Csv input.csv | Add-SitecoreItem mydomain –user username –pass password | select –expand Items | select DisplayName,ID,Path,Version | Export-Csv output.csv&lt;/span&gt;        (which would read a csv, create new items based on each row then output the new item details to another csv &lt;/li&gt;
    &lt;li&gt;Code structure – I don’t like everything being one big file.&amp;nbsp; I’d like to break things into smaller chunks and related
        modules.&amp;nbsp; &lt;/li&gt;
    &lt;li&gt;Session based access – It’s a bit tedious adding the domain, username and password to every request.&amp;nbsp; While requests
        are stateless a PowerShell session&amp;nbsp;needn't&amp;nbsp;be.&amp;nbsp; Something like: &lt;span style=&quot;font-family: courier new, courier, monospace;&quot;&gt;Start-SitecoreSession domain username password -encrypt –params @{ path = “/sitecore/content/home” }&lt;/span&gt;        could set session level variables that can be used by methods.&amp;nbsp; This is extended to cater for parameters which
        could apply to every call (while overriding at a function level) and also be a good place to perform encryption duties.
        &lt;/li&gt;
    &lt;li&gt;Aliases - For parameters as well as functions. &amp;nbsp;The breadth of parameters available to the functions make it tedious
        to type long form when you just want to type in the command line.&lt;/li&gt;
    &lt;li&gt;Response formatting - I've done a small amount of work to normalise the formatting of the different responses the API
        provides. &amp;nbsp;However the response format of the Fields property is a little awkward. &amp;nbsp;It would be better
        if this was an array of fields rather then a hash with guid based keys.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;Hopefully this little module will be of use to others. &amp;nbsp;If you've taken a look and have any suggestions or improvements
    (or bugs!) let me know ;-)&lt;/div&gt;</content><author><name>Kieran Marron</name><email>Kieran@Kieranties.com</email><uri>http://Kieranties.com</uri></author><category term="PowerShell" /><category term="Sitecore" /><category term="Utilities" /><summary type="html">My colleague Adam Simmonds did a demo of the Sitecore Item Web API at work based on the code provided by Kern Herskind from a recent Sitecore User Group. &amp;nbsp;It was great to see a small, simple, yet powerful API available to mobile solutions and third-party services that could operate in a RESTful way.The ability to drop into a solution with very minor configuration changes makes the API incredibly simple to apply to existing solutions (if the Sitecore version is supported of course).&amp;nbsp; It also follows Sitecore's principle design of pipelines and security; making it really easy to extend with custom functionality or handlers while also restricting requests at a user level using the security domain set for the website. &amp;nbsp;This means full control of security restrictions can be applied using the standard Sitecore security model and interface.In short, it’s pretty damn awesome. Now with added PowerShellOn Tuesday evening I knocked up a quick module to send requests to a site running the API. &amp;nbsp;Yesterday I cleaned it up, improved documentation, and packaged with a proper manifest.I’m not entirely happy with the state of the code but it is now much more usable and in a better state to extend and (hopefully) be useful to others. &amp;nbsp;I'm still learning PowerShell and need to work out a coding style and development process that works for me. UsageThe module&amp;nbsp;implements&amp;nbsp;a small handful of commands: Add-SitecoreItem&amp;nbsp;– Creates a new Sitecore item, optionally setting fields Get-SitecoreItem&amp;nbsp;– Gets one or more Sitecore items which match the context of the given parameters Remove-SitecoreItem&amp;nbsp;– Deletes one or more Sitecore items based on the context Set-SitecoreItem&amp;nbsp;– Updates the fields of one or more Sitecore items There is an additional&amp;nbsp;Invoke-SitecoreRequest&amp;nbsp;method which is a special “bare bones” function &amp;nbsp;to allow extended control of the parameters passed to Sitecore.&amp;nbsp; All other functions act as wrappers to this function, providing validation and parameter restrictions where possible.Aside from making it simple to perform CRUD actions with Sitecore &amp;nbsp;(think bulk uploads, change properties, quick reports etc) I hope to use this to perform some level of integration testing. I'm currently spending a lot of time investigating (and improving!) build processes. &amp;nbsp;With the aim of making the transition of code from Dev -&amp;gt; Stage -&amp;gt; Live as seamless and&amp;nbsp;robust&amp;nbsp;as possible. &amp;nbsp;Increasing the robustness involves validating that packages and items have been deployed properly. &amp;nbsp;This looks like it may be a useful tool to perform validation of fields that have been updated. Download and Install All the information you need is available at the Github repo.If you don't have the Sitecore Item Web API installed already you can download the API and documentation from Sitecore&amp;nbsp;(You'll need an SDN login). ExamplesFor demo purposes the account used here is an admin.&amp;nbsp; To restrict access, use Sitecore roles and the configuration options in the Sitecore Item Web API config include. Getting an item Adding an item Setting an item Removing an item Further Work Tests - seriously, if I want to use this for testing and building I’m going to need a decent test suite to know things are working as expected.&amp;nbsp; This will also give me a chance to get to grips with Pester. Additional functions – RSA encryption and the ability to upload media are next on the list Pipelining – PowerShell functions are even more useful when you chain them together.&amp;nbsp; It would be great to run something like: Import-Csv input.csv | Add-SitecoreItem mydomain –user username –pass password | select –expand Items | select DisplayName,ID,Path,Version | Export-Csv output.csv (which would read a csv, create new items based on each row then output the new item details to another csv Code structure – I don’t like everything being one big file.&amp;nbsp; I’d like to break things into smaller chunks and related modules.&amp;nbsp; Session based access – It’s a bit tedious adding the domain, username and password to every request.&amp;nbsp; While requests are stateless a PowerShell session&amp;nbsp;needn't&amp;nbsp;be.&amp;nbsp; Something like: Start-SitecoreSession domain username password -encrypt –params @{ path = “/sitecore/content/home” } could set session level variables that can be used by methods.&amp;nbsp; This is extended to cater for parameters which could apply to every call (while overriding at a function level) and also be a good place to perform encryption duties. Aliases - For parameters as well as functions. &amp;nbsp;The breadth of parameters available to the functions make it tedious to type long form when you just want to type in the command line. Response formatting - I've done a small amount of work to normalise the formatting of the different responses the API provides. &amp;nbsp;However the response format of the Fields property is a little awkward. &amp;nbsp;It would be better if this was an array of fields rather then a hash with guid based keys. Hopefully this little module will be of use to others. &amp;nbsp;If you've taken a look and have any suggestions or improvements (or bugs!) let me know ;-)</summary></entry><entry><title type="html">Gaming For 2013</title><link href="https://blog.kieranties.com/2013/01/06/gaming-for-2013_6" rel="alternate" type="text/html" title="Gaming For 2013" /><published>2013-01-06T13:45:00+00:00</published><updated>2013-01-06T13:45:00+00:00</updated><id>https://blog.kieranties.com/2013/01/06/gaming-for-2013_6</id><content type="html" xml:base="https://blog.kieranties.com/2013/01/06/gaming-for-2013_6">&lt;a href=&quot;http://blog.kieranties.com/2012/01/gaming-for-new-year.html&quot;&gt;I wrote early last year&lt;/a&gt; about the pile of games I had to work through – having bought a bunch in the January sales.&amp;nbsp; I managed to play a some, a few I never got to.&lt;br /&gt;There’s no shopping spree for me this year.&amp;nbsp; I got three major games for Christmas that should have a play time of at least 30+ hours each.&amp;nbsp; I also already have a pile sitting at home from previous shopping excursions, notably during the time Game and Gamestation couldn't make their mind up on who was closing down...&lt;br /&gt;Here’s a brief run down of what I managed to play from last years pile:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Child Of Eden&amp;nbsp; - Love this, but it’s complete filler.&amp;nbsp; Something to play when I only have a little time.&amp;nbsp; It’s Rez with shinier graphics but doesn’t pretend to be anything more.  &lt;/li&gt;&lt;li&gt;Rage – For a fiver this gave me plenty of game play but it was mediocre at best.&amp;nbsp; Even on hard the game struggled to be anything more then a pretty Fallout-esque landscape with elements of Borderlands thrown in.&amp;nbsp; Something of a swansong for Id during their acquisition by Bethesda.  &lt;/li&gt;&lt;li&gt;Dead Rising 2 – Not touched beyond five minutes, one bought for the missus.&amp;nbsp; I’ll get there at some point  &lt;/li&gt;&lt;li&gt;Far Cry 2 – Not touched… somehow there always seemed to be something else to play!  &lt;/li&gt;&lt;li&gt;Crysis 2 – Great, short, zero replay-ability for me.&amp;nbsp; I ran through the game on Super-Soldier after completing once and being fully levelled up made things rather simple.&amp;nbsp; The initial run through was a lot of fun and set things up for Crysis 3 quite well.&amp;nbsp; Which is definitely one to pick up.&amp;nbsp; &lt;/li&gt;&lt;li&gt;Metro 2033 – This was quite a surprise.&amp;nbsp; In some places it felt quite like Half-Life.&amp;nbsp; Others, the story line is engaging enough to keep you interested but often forgotten once in an action set-piece.&amp;nbsp; Generally there was nothing to place it above any other story driven FPS.&amp;nbsp; The sequel does look to be quite &lt;a href=&quot;http://www.cinemablend.com/games/Metro-Last-Light-Screenshots-Head-Surface-50674.html&quot; target=&quot;_blank&quot;&gt;interesting&lt;/a&gt; though.  &lt;/li&gt;&lt;li&gt;Ninety Nine Nights – This is one of those games I’ve wanted to play forever, yet again I’ve barely scratched it.  &lt;/li&gt;&lt;li&gt;Dark Souls – Wow.&amp;nbsp; I played this for just a few hours but for some reason just haven’t found the time to dedicate to it.&amp;nbsp; This isn’t a game to take lightly, I really like long gaming sessions and this game deserves to have a few days off work to play!  &lt;/li&gt;&lt;li&gt;Splinter Cell: Double Agent – This was everything you’d expect from the series and nothing more.&amp;nbsp; Worthy of attention if in the bargain basement, otherwise ignore.  &lt;/li&gt;&lt;li&gt;Skyrim – I’m not going to write longwinded on this, there’s enough of that on the internet already.&amp;nbsp; It’s everything that you’d expect from the Elder Scrolls series and then some.&amp;nbsp; I reached level 53 and all achievements in 110 hours but the world is so expansive that it still feels like you can adventure off in one direction and not know what you will find.&amp;nbsp; The DLC is yet to be played.  &lt;/li&gt;&lt;li&gt;Fable 2 – After two hours this just wasn’t working for me.&amp;nbsp; It felt slow and after playing Skyrim, a shade of what games on this scale can be.  &lt;/li&gt;&lt;li&gt;Halo 3 – I had a lot of fun playing through Legendary with a mate, but single-player I’ve no care for.  &lt;/li&gt;&lt;li&gt;Left For Dead – This has now become a party game only  &lt;/li&gt;&lt;li&gt;Left For Dead 2 – as above  &lt;/li&gt;&lt;li&gt;Star Wars: The Force Unleashed&amp;nbsp; - Still not restarted, still not traded as the missus wants to play!&lt;/li&gt;&lt;/ul&gt;By my count, that’s still 5 games from that pile to play.&amp;nbsp; Plus the following…(in no particular order)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Borderlands 2  &lt;/li&gt;&lt;li&gt;Mass Effect 3  &lt;/li&gt;&lt;li&gt;Assassins Creed 3 (now playing!)  &lt;/li&gt;&lt;li&gt;Dead Island  &lt;/li&gt;&lt;li&gt;Dead to Rights: Retribution  &lt;/li&gt;&lt;li&gt;Duke Nukem  &lt;/li&gt;&lt;li&gt;Brink  &lt;/li&gt;&lt;li&gt;Deadly Premonition (on loan)  &lt;/li&gt;&lt;li&gt;Just Cause  &lt;/li&gt;&lt;li&gt;Goldeneye Reloaded  &lt;/li&gt;&lt;li&gt;The Darkness 2  &lt;/li&gt;&lt;li&gt;Inversion  &lt;/li&gt;&lt;li&gt;Dodonpachi Resurrection (this will just be filler)  &lt;/li&gt;&lt;li&gt;Darksiders 2 – Apocalpytic run through (I’ve completed once already)  &lt;/li&gt;&lt;li&gt;Dead Space 3 (on pre-order)&lt;/li&gt;&lt;/ul&gt;I’ll undoubtedly buy and play other games not in this list already.&amp;nbsp; I’m looking to keep track of what I’ve played to see just how much time I’m really spending on the console.&amp;nbsp; It’s going to be a busy year!</content><author><name>Kieran Marron</name><email>Kieran@Kieranties.com</email><uri>http://Kieranties.com</uri></author><category term="Games" /><category term="Chatter" /><summary type="html">I wrote early last year about the pile of games I had to work through – having bought a bunch in the January sales.&amp;nbsp; I managed to play a some, a few I never got to.There’s no shopping spree for me this year.&amp;nbsp; I got three major games for Christmas that should have a play time of at least 30+ hours each.&amp;nbsp; I also already have a pile sitting at home from previous shopping excursions, notably during the time Game and Gamestation couldn't make their mind up on who was closing down...Here’s a brief run down of what I managed to play from last years pile:Child Of Eden&amp;nbsp; - Love this, but it’s complete filler.&amp;nbsp; Something to play when I only have a little time.&amp;nbsp; It’s Rez with shinier graphics but doesn’t pretend to be anything more. Rage – For a fiver this gave me plenty of game play but it was mediocre at best.&amp;nbsp; Even on hard the game struggled to be anything more then a pretty Fallout-esque landscape with elements of Borderlands thrown in.&amp;nbsp; Something of a swansong for Id during their acquisition by Bethesda. Dead Rising 2 – Not touched beyond five minutes, one bought for the missus.&amp;nbsp; I’ll get there at some point Far Cry 2 – Not touched… somehow there always seemed to be something else to play! Crysis 2 – Great, short, zero replay-ability for me.&amp;nbsp; I ran through the game on Super-Soldier after completing once and being fully levelled up made things rather simple.&amp;nbsp; The initial run through was a lot of fun and set things up for Crysis 3 quite well.&amp;nbsp; Which is definitely one to pick up.&amp;nbsp; Metro 2033 – This was quite a surprise.&amp;nbsp; In some places it felt quite like Half-Life.&amp;nbsp; Others, the story line is engaging enough to keep you interested but often forgotten once in an action set-piece.&amp;nbsp; Generally there was nothing to place it above any other story driven FPS.&amp;nbsp; The sequel does look to be quite interesting though. Ninety Nine Nights – This is one of those games I’ve wanted to play forever, yet again I’ve barely scratched it. Dark Souls – Wow.&amp;nbsp; I played this for just a few hours but for some reason just haven’t found the time to dedicate to it.&amp;nbsp; This isn’t a game to take lightly, I really like long gaming sessions and this game deserves to have a few days off work to play! Splinter Cell: Double Agent – This was everything you’d expect from the series and nothing more.&amp;nbsp; Worthy of attention if in the bargain basement, otherwise ignore. Skyrim – I’m not going to write longwinded on this, there’s enough of that on the internet already.&amp;nbsp; It’s everything that you’d expect from the Elder Scrolls series and then some.&amp;nbsp; I reached level 53 and all achievements in 110 hours but the world is so expansive that it still feels like you can adventure off in one direction and not know what you will find.&amp;nbsp; The DLC is yet to be played. Fable 2 – After two hours this just wasn’t working for me.&amp;nbsp; It felt slow and after playing Skyrim, a shade of what games on this scale can be. Halo 3 – I had a lot of fun playing through Legendary with a mate, but single-player I’ve no care for. Left For Dead – This has now become a party game only Left For Dead 2 – as above Star Wars: The Force Unleashed&amp;nbsp; - Still not restarted, still not traded as the missus wants to play!By my count, that’s still 5 games from that pile to play.&amp;nbsp; Plus the following…(in no particular order)Borderlands 2 Mass Effect 3 Assassins Creed 3 (now playing!) Dead Island Dead to Rights: Retribution Duke Nukem Brink Deadly Premonition (on loan) Just Cause Goldeneye Reloaded The Darkness 2 Inversion Dodonpachi Resurrection (this will just be filler) Darksiders 2 – Apocalpytic run through (I’ve completed once already) Dead Space 3 (on pre-order)I’ll undoubtedly buy and play other games not in this list already.&amp;nbsp; I’m looking to keep track of what I’ve played to see just how much time I’m really spending on the console.&amp;nbsp; It’s going to be a busy year!</summary></entry><entry><title type="html">What to do with old domains?</title><link href="https://blog.kieranties.com/2012/12/27/what-to-do-with-old-domains" rel="alternate" type="text/html" title="What to do with old domains?" /><published>2012-12-27T19:11:00+00:00</published><updated>2012-12-27T19:11:00+00:00</updated><id>https://blog.kieranties.com/2012/12/27/what-to-do-with-old-domains</id><content type="html" xml:base="https://blog.kieranties.com/2012/12/27/what-to-do-with-old-domains">So, it seems I suffer from one of two problems.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;I am incapable of seeing a personal project through to the end  &lt;/li&gt;&lt;li&gt;I struggle to find the time to dedicate to personal projects&lt;/li&gt;&lt;/ol&gt;I sincerely hope it’s number two.&lt;br /&gt;&lt;br /&gt;I own the domains &lt;a href=&quot;http://www.scraptrack.net/&quot; target=&quot;_blank&quot;&gt;scraptrack.net&lt;/a&gt; and &lt;a href=&quot;http://www.sharpnote.net/&quot; target=&quot;_blank&quot;&gt;sharpnote.net&lt;/a&gt;.&amp;nbsp; Both were bought as the title domains for planned projects.&amp;nbsp; I did actually manage to start &lt;a href=&quot;https://github.com/Kieranties/Sharpnote&quot;&gt;Sharpnote &lt;/a&gt;– a simple .NET wrapper to the &lt;a href=&quot;http://www.simplenoteapp.com/&quot; target=&quot;_blank&quot;&gt;Simplenote&lt;/a&gt; API.&amp;nbsp; However my workload in my actual job increased and it took some time getting used to being that busy.&amp;nbsp; By the time I was back to having free time that I didn’t use to just relax, I was using &lt;a href=&quot;http://www.workflowy.com/&quot; target=&quot;_blank&quot;&gt;Workflowy&lt;/a&gt; for all my lists/note tracking and my interest in Simplenote waned.&lt;br /&gt;&lt;br /&gt;That said, I do hope to get back to using the domains for &lt;em&gt;something&lt;/em&gt;.&amp;nbsp; For the time being, I just don’t know &lt;em&gt;what&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;In an effort to be a little more organised and possibly a little more forward-thinking I plan to write blog posts a lot more often.&amp;nbsp; 2-4 a month would be great.&amp;nbsp; I’m not holding any promises to myself but instead of trying to write on something that is new and hoping to be heard I’m just going to write on something that interests me.&lt;br /&gt;&lt;br /&gt;I’m no literary genius either so if the post is only a handful of words or paragraphs, that’s just fine.</content><author><name>Kieran Marron</name><email>Kieran@Kieranties.com</email><uri>http://Kieranties.com</uri></author><category term="Chatter" /><category term="Web" /><summary type="html">So, it seems I suffer from one of two problems.I am incapable of seeing a personal project through to the end I struggle to find the time to dedicate to personal projectsI sincerely hope it’s number two.I own the domains scraptrack.net and sharpnote.net.&amp;nbsp; Both were bought as the title domains for planned projects.&amp;nbsp; I did actually manage to start Sharpnote – a simple .NET wrapper to the Simplenote API.&amp;nbsp; However my workload in my actual job increased and it took some time getting used to being that busy.&amp;nbsp; By the time I was back to having free time that I didn’t use to just relax, I was using Workflowy for all my lists/note tracking and my interest in Simplenote waned.That said, I do hope to get back to using the domains for something.&amp;nbsp; For the time being, I just don’t know what.In an effort to be a little more organised and possibly a little more forward-thinking I plan to write blog posts a lot more often.&amp;nbsp; 2-4 a month would be great.&amp;nbsp; I’m not holding any promises to myself but instead of trying to write on something that is new and hoping to be heard I’m just going to write on something that interests me.I’m no literary genius either so if the post is only a handful of words or paragraphs, that’s just fine.</summary></entry><entry><title type="html">Multipart Form Posting in Android</title><link href="https://blog.kieranties.com/2012/03/28/multipart-form-posting-in-android" rel="alternate" type="text/html" title="Multipart Form Posting in Android" /><published>2012-03-28T11:50:00+01:00</published><updated>2012-03-28T11:50:00+01:00</updated><id>https://blog.kieranties.com/2012/03/28/multipart-form-posting-in-android</id><content type="html" xml:base="https://blog.kieranties.com/2012/03/28/multipart-form-posting-in-android">I'm chugging away making a native Android app for the rather splendid &lt;a href=&quot;http://twitter.com/stringfellow&quot;&gt;@stringfellow&lt;/a&gt;. &amp;nbsp;It's been quite the eye-opener in terms of &lt;a href=&quot;http://developer.android.com/resources/dashboard/platform-versions.html&quot;&gt;Android&amp;nbsp;fragmentation&lt;/a&gt;, the joys of returning to Java after a (very) long hiatus and the intricacies of the platform as a whole. &amp;nbsp;I fully intend to write-up a few posts on what I've done (and hope for feedback on how things can be improved) but the following was an unexpected pitfall I think is worth talking about now.&lt;br /&gt;&lt;br /&gt;Naturally the wealth of apps on Android and other mobile devices require some kind of network interface for consumption of data and communicating details back to servers. &amp;nbsp;Android - being built with Java - allows you to use the&amp;nbsp;&lt;a &quot;target=&quot;_blank&quot; href=&quot;http://developer.android.com/reference/org/apache/http/client/HttpClient.html&quot;&gt;org.apache.http.client.HttpClient&lt;/a&gt;&amp;nbsp;which is great until you want to send an image/file or anything else in a multi-part form.&lt;br /&gt;&lt;br /&gt;The version of HttpClient in Android (2.2 - not developing against other versions yet) does not have support for multi-part forms. &amp;nbsp;You could write content as&amp;nbsp;separate&amp;nbsp;entities/directly to the stream but that can soon get messy.&lt;br /&gt;&lt;br /&gt;To make things simpler, grab the &lt;a href=&quot;http://hc.apache.org/downloads.cgi&quot;&gt;HttpClient (4.1.3)&lt;/a&gt; jar from Apache, drop into your Android project build path and do the following in your request/response handler:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/2225346.js&quot;&gt;  &lt;/script&gt;</content><author><name>Kieran Marron</name><email>Kieran@Kieranties.com</email><uri>http://Kieranties.com</uri></author><category term="Java" /><category term="Android" /><summary type="html">I'm chugging away making a native Android app for the rather splendid @stringfellow. &amp;nbsp;It's been quite the eye-opener in terms of Android&amp;nbsp;fragmentation, the joys of returning to Java after a (very) long hiatus and the intricacies of the platform as a whole. &amp;nbsp;I fully intend to write-up a few posts on what I've done (and hope for feedback on how things can be improved) but the following was an unexpected pitfall I think is worth talking about now.Naturally the wealth of apps on Android and other mobile devices require some kind of network interface for consumption of data and communicating details back to servers. &amp;nbsp;Android - being built with Java - allows you to use the&amp;nbsp;org.apache.http.client.HttpClient&amp;nbsp;which is great until you want to send an image/file or anything else in a multi-part form.The version of HttpClient in Android (2.2 - not developing against other versions yet) does not have support for multi-part forms. &amp;nbsp;You could write content as&amp;nbsp;separate&amp;nbsp;entities/directly to the stream but that can soon get messy.To make things simpler, grab the HttpClient (4.1.3) jar from Apache, drop into your Android project build path and do the following in your request/response handler:</summary></entry></feed>