Google+

Chocolately and BoxStarter

I recently received a new work computer (an Asus i7 that weighs 2.6 pounds, my old laptop, a Dell M6500 weighed over 8.5 lbs, it is like I am from the future now, but I digress). One of the things that I don't like about getting a new PC is setting up the computer. I am very good about making sure all of my files are stored in the cloud (via Skydrive and DropBox) and/or is under source control. I don't fear losing stuff, it is the loss time in restoring my applications and environments that makes me crazy. I always forget to install a utility I want. Or the exact moment I NEED to remote desktop is when I remember I forgot to ENABLE remote desktop.

However, since my last PC install, the world of Windows has changed, and its name is Chocolately. Chocolatey is similar to apt-get on Linux, or the NPM package manager for Node. You can, via the command line, automatically install all kinds of applications that are available on NuGet. For example, to install ReSharprer, fire up a command prompt and type

    cinst resharper

and away we go.

You can find out more at the Chocolately site. Essentially though, you can achieve all of this goodness by staring a command prompt and pasting the following

    @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin

So, Chocolately solves problem the first, allowing for command line install of applications. When paired with Boxstarter however, it figures out problem the second of installing many different applications that require reboots, etc, when you are setting up a new PC. BoxStarter handles reboots and logins automatically for the user. You can type one command and be on your way!

Boxstarter also enables me to setup a URL that will have all of the applications that I want installed in a single location. For example, I created a Gist file on GitHub with all of the programs I want installed when I have a PC.

    START http://boxstarter.org/package/nr/url?https://gist.github.com/jptacek/8099099/raw/f691b3433c09dcd361fca8cc6cfe637ca7521771/boxstarter

You can take a look at the file, but it is pretty basic.

I setup the Explorer options I want, for example, showing file extensions, and that provides me consistency across my installs.

I then install the bevy of browsers that all web developers want at their disposal. This is followed by setups for Git, NodeJS, Text Editor, coding utilities, etc. I even have installation for applications I use specifically at home, for example, iTunes (I know, I vomit a little in my mouth each time I use it too).

Not only can you setup explorer options, but you can also setup your Windows environment! For example, I automatically enable Remote Desktop, Setup HyperV and IIS on my development machines. I do this all from a single command and it is awesome!

Update A couple of people have run into issues if you are not using a default browser that does not support Click Once (for example Google Chrome). Matt Wrock identifies the workaround in the comments below.

It sounds like your default browser is not click-once enabled. Using START from the command line will invoke the url in your default browser. If that browser is IE or another browser that has a click-once extension, Boxstarter should be invoked. If Firefox or Chrome (or Opera or safari or anything not IE) is your default browser and you had no extension that is "click once" app aware, the behavior you describe sounds normal. Chrome is my default browser but I installed an extension from https://code.google.com/p/clickonceforchrome/ that will allow it to work with click once apps like Boxstarter's web launcher.

Just to reiterate... You need to update your default browser to support click once. Links for


 

Saying Hello to.... DocPad

I recently blogged about moving off of WordPress to a new blogging platform. I have been looking at several different options during this time and have finally picked one. There were three that really piqued my interest; Ghost, Jekyll with hosting on Github, and DocPad.

Each of the platforms had different things that made it interesting to me, and some things I did not like. Let's review each of them

##Ghost## Ghost Logo

I think Ghost is pretty awesome. When I started thinking about redoing my blog, it had a lot of things I was interested in. The platform is elegant. It uses Markdown for creating content, and the online editor for it is VERY nice. The other thing that really interested me is that it is all built on Node.JS. This is a platform I am definitely interested in growing my skill base.

However, despite all of these things, Ghost was not for me. In reality, is another blogging/CMS platform. The same limitations I was having with WordPress, in terms of page structure, adding JavaScript content, etc, would still be an impediment on Ghost. Essentially, Ghost is WordPress 2.0, a MUCH nice WordPress, hosted with Node.JS instead of PHP, but not for me and the things I would like to do.

##Jekyll## Jekyll Logo

Jekyll was VERY close to being what I chose. The magic of Jekyll is that it creates static HTML from templates. Essentially, you create a page layout. You can then create posts and content using Markdown to be combined with your layout and it will create static HTML. By serving up static HTML, your hosting costs quickly become much less since you are serving up static pages, and millions of web servers over the world are VERY good at that.

Jekyll also has the added benefit of being tied to GitHub and its GitHub Pages platform. I can have the fine folks at GitHub and their operations folks be responsible for ensuring my site is up. It also has some slick features where you check in your Markdown file in GitHub and your site content is automatically deployed.

However, like Goldilocks finding the porridge a bit too cool, there were some things that steered me away. First, while the automatic updating feature is slick, it is a limited subset of the Jekyll functionality. Further, Jekyll is based on the Ruby programming platform. While I find that more interesting than WordPresss’ PHP, it is definitely not as high up on my list as Node.JS.

Which brings us too….

##DocPad## DocPad Logo

Ultimately, I ended up picking DocPad. I REALLY liked the idea of static page generation. I have been around the web now that it is all back where it started, with developers putting static HTML files on a server. Who would have thunk? Of course, this is much nicer since you have templates to go and create the site. It is also a Node.JS application, which is of interest. You can also auto deploy your markdown files and have it create the static HTML in an Azure web instance after you commit and push your changes to GitHub. VERY SLICK. Of course, I pay for the CPU part of that, and only when I create content. The rest will all be static HTML files being sent by IIS.

It is really very slick how easy the site setup was. I will detail my instructions down the road. I do LOVE the Node Package Manager and the magic of package.json which allows you to quickly get a site up and running on your machine.

I give a lot of credit to the site redo to my old Skyline colleague and now Microsoft guy, Jason Young. As I was investigating my next blog platform, he published a post about migrating his site to DocPad. The gold star for Jason was taking the DocPad site and configuring Azure to compile the markdown to static HTML and then set for hosting. This is what moved me from going to Jekyll to Docpad. VERY COOL!

Also, hat tip to Erv Walter for great stuff he did in setting up the platform and UI that Jason and I have both, VERY liberally borrowed from.

Obviously, my site has a lot of UI cleanup I would like to do, I also need to edit a lot of posts, but here it is, in all of it's static glory.

##Conclusion##

Why DocPad

  • Node.JS platform
  • Templating engine to allow creation of static HTML files
  • Enable Javascript on pages
  • Auto publish from a GitHub repository
  • Markdown language for publishing
  • Lots of extensibility via Plugins

Erv Walter GitHub repository for Ewal.net

Jason Young GitHub repository for Ytechie.com

My GitHub repository for JPtacek.com


 

Saying Goodbye to WordPress

I have been using WordPress for a while with my personal blog, JPtacek.com. I have been a big fan and have written up many posts about setting up WordPress using the awesomeness of Azure websites. However, the time to move on has come upon to a new blogging platform. Sylvester ByeBye WordPress logo So the question is why... Well here is my reasoning

  • A CMS does a great many things, but ultimately they are for people to be able to host websites and publish content. And most CMSes are for people who do not want to learn about things like HTML. However, with a developer background I kept running into things I could easily do in HTML, but were near impossible within WordPress
  • Azure is great, however I still pay for Azure. I am responsible for CPU and bandwidth. Since WordPress is a platform, every page requests is essentially run through a CPU, where the WordPress blackbox does its magic, queries a database and spits out HTML. This is a cost. (To be honest, it is not a BIG cost)
  • It always felt a bit goofy to have simple web pages hosted in a back end database. Everything starts as a document or HTML, then gets thrown into a database. I need to be responsible for backing up the database and being a good admin type person. I would rather just have my one true source be HTML that I can save in Dropbox or SkyDrive
  • PHP is not my thing. I am always up for learning something new, but PHP is NOT something I that is on the learn something new list.
  • Update, update, update. Since WordPress is a platform, hackers tend to get bored and are always looking to hack into it. You constantly need to be aware of keeping your software and plugins up to date if you are hosting your own WordPress environment. This is not an issue if you are hosting at WordPress.com, but I am not, on account of the awesomeness of Azure Websites
  • Truthfully, probably the biggest reason is JavaScript. Doing web front end things with WordPress is really not a pleasant experience. I have found myself resorting to embedding JSFiddles into my pages to show functionality that is plain easy to do on other platforms.

So what am I looking for?

  • More web, please. I want to be able to have a blog engine that supports HTML and JavaScript, rather than make me miserable
  • Speedy please
  • Reduce hosting costs, please
  • Help me learn something new, please

I have been spending time thinking about this. I believe I have an answer. Any suggestions from you oh mighty Internet?


 

John Ptacek I'm John Ptacek, a software developer for Skyline Technologies. This blog is my contains my content and opinionss, which are not those of my employer.

Currently, I am reading Norse Mythology by Neil Gaiman

@jptacekGitHubLinkedInStack OverflowGoogle+