Wednesday, November 23, 2011

Some Things Should Be Made Obvious #DNN


Q: What do the check boxes public role and auto assign under security roles mean and how does one use them?

A: Public role means that users can choose to "join" those roles by selecting the checkboxes for those roles at the bottom of their user profile page. Auto Assign assigns new registered users to that particular role automatically.

Snippet from: http://forums.asp.net/t/314593.aspx/1

Thursday, September 22, 2011

Package Recieved

From Chain Reaction Cycles! Yeay!

Respro Nitesight Mask (L) (which has the same specs as the City Mask)

http://www.respro.com/protection-faqs/#q2
"1. The City filter uses Dynamic Activated Charcoal Cloth (DACC) a 95% pure charcoal weave, originally developed by the U.K. Ministry of Defence for use in the protection against chemical and bacteria warfare situations. We use DACC to effectively filter out Primary pollutants associated with vehicle exhaust emissions. The DACC is laminated with medical grade non woven polypropylene material which filters particulates from the air and helps prevent them from entering the respiratory system.

The City filter offers protection against: - Hydrocarbons. e.g. Benzene; Pyrene;1,3 Butadiene. - Acid gases. e.g. Nitrogen dioxide; Sulphur dioxide. - Photo-chemical pollutants. e.g. Low level Ozone - Particulates. e.g. Black smoke; Pollen; Lead oxide. For a more comprehensive list of all the chemicals that have tested with DACC, please go to the Industrial section of the website."

According to the NEA, haze consists of:
http://app2.nea.gov.sg/psi_faq.aspx
sulphur dioxide,
nitrogen dioxide,
ozone,
carbon monoxide
particulate matter called PM10 (particulate matter of 10 microns or smaller in size)


Wednesday, August 10, 2011

Saturday, July 23, 2011

Library Book Sale

Today, I judged books by their covers.

They were categorized in broad categories in piles and with 2 kids in tow, I had not much time to browse.

The word "bicycle" on the cover? Grab.

Terry Pratchett? No brainer. Grab.

Jim Butcher / Dresden? Grab.

Grabbed John Saul for the wife.

Grabbed a book with a nice, red cover. No idea what's in it.

...and a couple more I'm sure I won't get around to reading.

But hey, $2 a book!


Friday, July 22, 2011

Going Home!

Sure is nice to go home while the sun is still shining - on a Friday too!


Monday, May 30, 2011

PortQry - The Ping For Ports

Need to find out if your port is correctly configured? Try portqry from Microsoft. It's command line and straightforward to use.


How to use:

Sunday, May 22, 2011

Wednesday, March 16, 2011

Building a Build Machine

So, these past couple of weeks, I've been tasked with building a build machine.

What's a build machine?
A build machine should automagically build your code project into something that is usable. Actually, the complete flow should be:
  1. Get Latest Codes
  2. Build Codes
  3. Deploy
  4. Test
  5. Logging
  6. Reporting
Since the keyword here is automated, that means a Scheduled Task is involved, to be executed every night so that developers can come in the next day to see how their project has performed overnight and maybe fix bugs that their new code may have introduced.
Developers go home.
Repeat.

For this post, I will concentrate on automating the first 2 tasks:
  1. Getting the latest codes; and
  2. Building codes
== THE BUILD ENVIRONMENT ==
Lucky for me, I have a dedicated machine and multiple VMs to play with, so here's the specs of my Build Machine, for a Microsoft .NET Framework 3.5 C# Web Projects:
  1. A clean install of Windows Server 2008 Standard Full x64
  2. Set it up with a Role of a Web Server with default IIS7 settings.
  3. Get the latest copy (in my case, version 3) of Microsoft's Web Platform Installer from http://www.microsoft.com/web/downloads/platform.aspx
  4. Use it to install .NET Framework 3.5 SP1


Since automating everything will probably involve several different products (eg: SVN, Microsoft Build, Deployment, FTP, etc), executing a single batch file (.bat) seems to be the best bet.

== STEP 1: GET LATEST CODES ==
Getting the latest codes is the easiest of all the above-mentioned steps, if you're using SVN.

Get the SVN command-line client from CollabNet: http://www.open.collab.net/downloads/subversion/

The command to get the latest codes is, for example:
svn checkout https://PathOfRepository C:\ProjectPath --username MyUsername --password MyPassword

There are tons of SVN commands and options.
It's well documented and has lots of real-world examples online.
Go Google it for more details.

== STEP 2: BUILD CODES ==
If you've installed .NET Framework 3.5 SP1 correctly and successfully, check out this path in Explorer:
C:\Windows\Microsoft.NET\Framework\v3.5\

You should have a nice MSBuild.exe sitting there.
No need for a copy of Visual Studio to build your project.

To build, use the following line:
C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe C:\ProjectPath\MyProject.csproj

Again, MSBuild.exe can either build the Project or the Solution, so this also works:
C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe C:\ProjectPath\MySolution.sln

It depends on how your Project or Solution is set up.
You will probably need to tweak your Solution or Project file, by setting up Dependencies or References in Visual Studio (the GUI really helps, instead of tweaking the csproj or sln file by hand) before MSBuild.exe performs the way you want it.

== BUILD TIPS ==
The /target or /t flag
Since I am automating a build for an end-product, I set my /target flag like so:
C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe /t:Rebuild C:\ProjectPath\MyProject.csproj

I use Rebuild so that MSBuild.exe always deletes old binaries and dependencies before rebuilding them.
This may take up some extra CPU cycles, but ensures that you are always building and referencing the latest codes.

The /property or /p flag
Again, since I am automating a build for an end-product, I add on my /property flag like so:
C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe /t:Rebuild /p:Configuration=Release C:\ProjectPath\MyProject.csproj

This ensures that the build is in a "Release" configuration, rather than a "Debug" build or some unknown, default build configuration.
Also, since this is a clean install of Windows, adding this Configuration=Release might throw an error, with an error message that looks something like a path not found.
(I forgot what was the exact error was).

Look for the missing path in your Development environment and copy it into the build machine. This should solve it.

MSBuild.exe has a ton of options, and is probably documented by developers (read: not user-friendly!) and not many real-world examples online.

Good luck using this tool!