Multi-user WordPress Hosted by IIS

I’ve been playing WebMatrix for open source projects. For Say you can start a WordPress instance with just a few clicks. It installs all the pre-requisites like MySQL database and PHP. Then downloads WordPress and bootstraps the configuration. All happens within just a couple of minutes. Which is amazing.

Everything goes well until you start to enable multi-site aka Network feature. The setup requires the site hosting on port 80. So I have to change the IIS Express binding and put a new entry to my local hosts registration. And I have to start WebMatrix as administrator.

This seems to be fine and it asks to update the web.config with new URL rewrite. But when I visit the sub-site. The address is not able to be resolved. After I asked the Dr. Google which led me to this post. There provides a better rewrite rules. Now everything works like a magic. ;)

AngularJS, Protractor, Visual Studio! SUPER DRY!!

I AM A .NET Developer. Visual Studio is the trench that I dig every day. AngularJS is the primary weapon that I use in the frontend. I want to have Protractor as my first aid kit which doesn’t play nicely without Node.js. But it’s all right, I can tame it!

Update: you might be interested in this sample project to dig in quickly. It contains a tiny AngularJS app and a few test cases.

Let’s shave the yak

Do you know that Node.js Project is actually a Node.js flavoured ASP.NET project?

  • Update selenium standalone server
    .bin\webdriver-manager update

  • Start selenium standalone server
    .bin\webdriver-manager start

  • Run test specs
    .bin\protractor protractor.conf.js

Debugging

  • Include node_modules\protractor\lib\cli.js into project and Set it as Node.js Startup File
  • In project properties, configure Script arguments as protractor.conf.js

Tools

  • taskkill /f /t /im chromedriver.exe
    Sometimes you are stuck while debugging because previous chromedriver session was not terminated properly. Use this to kill all chromdrivers that lurks around.

  • Testing out Protractor interactively
    The tool provides a REPL-ish way to test selector.
    It helps to test while writing the test. Instead of test after you finish the test spec.

Other things help you get started

Sublime Code Preview

Sublime Code Preview, a Sublime Text package, inspired by Visual Studio Web Essentials.

sublime code preview ui

Sublime Code Preview UI

Excitingly, my package get merged into sublime package community list last weekend. And within a week, I got a pull request from Carl Furrow. Carl says it is the beauty of the open source. Anyway, it does make me feel so social in the bits and bytes world ;)

This package is totally inspired by Visual Studio Web Essential, which has a awesome code preview window for CoffeeScript, TypeScript etc. I really like feedback it provides as I am writing the code. So I ended up with this package provide similar code preview tool for Sublime Text.

The source code is hosted on github, feel free to contribute new features to the project!

#Appfest Sydney

#appfest sydney

Just spent 3 days join in the #Appfest Sydney since last Friday. Got a little bit tired. But it’s absolutely fantastic. This event is about windows 8 app, windows phone app and windows azure.

As I join the session of building apps for two platforms, talked by Microsoft technical evangelist, Nick Hodge. He is funny, and his style is somewhat like Scott Hanselman to me.

Shane Morris shared very good slides at keynote session for designing windows and windows phone app.

freebie

What I got from this 3-day event? A lot of freebies, fantastic catering, and most of all, the tips of designing and building windows, windows phone apps.

Mentors are very helpful. So there are many good ideas generated. I really enjoyed. Thanks for organizing such an event. And I decided to start my journey of building windows apps.

Steps To Big Data: Hello, Cascading

In previous post Steps To Big Data: Hello, Pail, we have defined our fact model and shown how to use Pail to store out data. What is fact model?

A Fact Model, as we see it, structures basic knowledge about business operations from a business perspective. “Basic” means that the knowledge it represents cannot be derived or computed from any other knowledge. It that sense, a Fact Model is a crucial starting point for developing more advanced forms of business knowledge, including measures and rules.

As described above, fact model cannot be derived or computed from any other knowledge. In other words, its purpose is to generate data. The process of generating data from fact model could be illustrated as below.

Cascading supports to create and execute complex data processing workflows on top of Hadoop using any JVM-based language(Java, Scala, JRuby, Clojure, etc.) Most cascading related libraries are in the Maven Repository http://conjars.org/

We are going to use cascading to count users’ actions.

Continue reading

Steps To Big Data: Hello, Pail

Just before I had my first anniversary holiday since I had joined communityengine. I started my new role in the recommendation team. The team is relatively new, so we are open to use virtually any technologies.

In the book Big Data (MEAP), Nathan Marz describes a framework calls Pail (dfs-datastores) which is a data storage solution on top of hadoop. It supports schema, merging small files into a large chunk for better hdfs performance etc.

We started to use Pail for our data collection. So what have we done?

  • a data schema defined in protobuf
  • an implementation of PailStructure
  • a job to run the data collection

Ready to dig deeper? Let’s get it started.

Continue reading