Installing Cygwin + Jekyll in Windows 8.1

Just a quick one from me today, I recently got an excellent new laptop, that sadly does not seem to want to dual boot with Fedora, so I have been forced to fall back to just a Windows 8 Machine. A work colleague suggested I give Cygwin a whirl to continue to use all the amazing things Windows just can't do. During the set-up, I got extremely annoyed with the GUI based normal way of installing the environment due to me managing to break Ruby + gems and it taking longer than necessary clicking all the boxes to select the wanted applications, so I made a snippet to make the reinitialization of Cygwin in future much easier. I have moved on since this post to using Hugo instead, as ejekyll no longer works, and Hugo does!

The Snippet

# Open Powershell and go to where you have downloaded the Cygwin Installer

# This will initialise the environment installing all the packages we want
.\setup-x86_64.exe -q -l "C:\cygwin64" -q -P "zlib-devel,openssl,openssl-devel,libyaml-devel,libyaml0_2,sqlite3,make,libtool,gcc-core,autoconf,automake,bison,m4,mingw64-i686-gcc,mingw64-x86_64-gcc,cygwin32-readline,libffi6,libffi-devel,cygwin32-libffi,pkg-config,python,curl,patch,bash-completion,libcrypt-devel,git,openssh,python-libxml2,python-lxml,python-libxslt,vim,vim-commonset,wget,libreadline7,libreadline-devel" -C Ruby

# After Loading the term
# Grab cygwin set-up for things that use it
curl http://cygwin.com/setup-x86_64.exe -o /bin/setup-x86_64.exe
chmod 744 /bin/setup-x86_64.exe

gem install jekyll

# Fix Jekyll under windows
echo "export COMSPEC=/cygdrive/c/Windows/System32/cmd.exe" >> .bashrc

# Set up some extra stuff for my enviroment, had to escape the %
echo "set backspace=indent,eol,start" >> .vimrc
echo 'export PS1="\D{\%d-\%m \%k:\%M} : \u : \W \$ "' >> .bashrc