#Kill node processes
##Kill all node processes
killall node
##Kill specfic node process
| # These are project build parameters in TeamCity | |
| # Depending on the branch, we will use different major/minor versions | |
| [System.Reflection.Assembly]::LoadWithPartialName("System.Web.Extensions") | |
| $ser = New-Object System.Web.Script.Serialization.JavaScriptSerializer | |
| $json = Get-Content "package.json" | Out-String | |
| $obj = $ser.DeserializeObject($json) | |
| $majorVerion = ($obj['version'] -split "\.")[0] | |
| $minorVerion = ($obj['version'] -split "\.")[1] | |
| $buildCounter = "%teamcity.build.counter%" | |
| $buildNumber = "$majorVerion.$minorVerion.$buildCounter" |
| private static void RegisterBsonClassMappings() | |
| { | |
| //AnyBaseClass is defined as a root | |
| BsonClassMap.RegisterClassMap<AnyBaseClass>(cm => | |
| { | |
| cm.AutoMap(); | |
| cm.SetIsRootClass(true); | |
| }); | |
| //IAnyInterface is a marker interface which falls in the inheritence tree for |
#Kill node processes
##Kill all node processes
killall node
##Kill specfic node process
| (function(window){ | |
| "use strict"; | |
| console.log(window); | |
| })(typeof global == 'object' && global || this); |
| { | |
| "name": "sample", | |
| "description": "A sample package", | |
| "version": "0.0.0", | |
| "author": "Tim Chaplin <[email protected]>", | |
| "repository": { | |
| "type": "git", | |
| "url": "https://github.com/<SOMEPROJECTNAME>.git" | |
| }, | |
| "homepage": "https://github.com/<SOMEPROJECTNAME>.git", |
| module.exports = function(grunt) { | |
| // configuration. | |
| grunt.initConfig({ | |
| //Package file | |
| pkg: grunt.file.readJSON("package.json"), | |
| //jshint - configuration | |
| jshint: { | |
| files: ["gruntfile.js", "index.js", "lib/**/*.js","test/**/*.js"], | |
| options: { |
| //install grunt command line interface(CLI) | |
| npm install -g grunt-cli | |
| //install grunt into the projects modules | |
| npm install grunt --save-dev | |
| //install JSHint package | |
| npm install grunt-contrib-jshint --save-dev | |
| //install Watch configuration |
| [Interceptor(typeof(SimpleInterceptor))] | |
| public class TestClass | |
| { | |
| public virtual void DoStuff() | |
| { | |
| //Do Important Stuff | |
| } | |
| } |
| Windsor.InitialiseCore(); | |
| Windsor.Container.Register(Component.For<IInterceptor>() | |
| .ImplementedBy<SimpleInterceptor>()); |
| public class SimpleInterceptor : IInterceptor | |
| { | |
| public void Intercept(IInvocation invocation) | |
| { | |
| invocation.Proceed(); | |
| } | |
| } |