Building a Yeoman webapi microservice template

References Yeoman with ASP.NET Attempt1: Installation of existing ASP.NET template Installs the .net dmx: 1.0.0.0rc1 Install Yo Update NPM: npm install -g npm npm install -g yo bower grunt-cli gulp Install the asp.net generator: npm install -g generator-aspnet Run ASP.NET Template yo aspnet…

Read this article

Git Diffs

The file names that changed between 2 commits git whatchanged 11d5b2894f98350eccef85f15c47510361f6691e c94027d16d121418560431330b727bbddb0dd3ca | cat > /c/Temp/out.txt The contents that changed between 2 commits git diff --patch 11d5b2894f98350eccef85f15c47510361f6691e c94027d16d121418560431330b727bbddb0dd3ca | cat > /c/Temp/out.txt…

Read this article

SQL Azure

Determine which user is assigned to which role Run this on your target database in Azure (ie: not against the master database) select m.name as Member, r.name as Role from sys.database_role_members inner join sys.database_principals m on sys.database_role_members.member_principal_id…

Read this article

Running a NodeJS and Express 4 App in Azure

I encountered 500 errors when I tried to move my Node/Express app to Azure. It ran fine on Heroku, but threw 500's when I ran it on Azure WebApps. I was using git deployment. In order to get a NodeJS and Express 4 app running in Azure, follow these…

Read this article

HSTS

Enable HSTS in IIS 8 Install URL ReWrite Add these lines to your web.config <rewrite> <rules> <rule name="HTTP to HTTPS redirect" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}"…

Read this article

Configure p4merge

How To Configure p4Merge https://danlimerick.wordpress.com/2011/06/19/git-for-window-tip-use-p4merge-as-mergetool/ Context Menu Plugin https://www.perforce.com/product/components/perforce-plugin-windows-explorer…

Read this article

How to Check for Blocking on SQL Azure

SELECT request.session_id, request.status, request.blocking_session_id, request.wait_type, userSessions.login_name, userSessions.host_name, userSessions.program_name, sqlText.text FROM sys.dm_exec_requests as request CROSS APPLY sys.dm_exec_sql_text(request.sql_handle) as sqlText CROSS APPLY sys.dm_exec_sessions as…

Read this article

AngularJS: $scope $emit $on examples

Emit : Upwards $emit This will dispatch an event upwards through the scope hierarchy. function parentCtrl($scope){ $scope.$on('myEvent', function(event, data) { console.log(data); }); } function childCtrl($scope){ $scope.$emit('myEvent', 'my data'); } Broadcast : Downwards $broadcast This will dispatch an event from the parent scope downwards to all child scopes…

Read this article

Update Existing Xamarin Project to Use MvvmCross

If you don't have existing code, then just use the Ninja Coder Visual Studio Extension for MVVMCross. If you have existing code already (ie: running an Xamarin android that you want to port to MvvmCross, then follow these steps: Creating New MvvmCross Project Setting up the Core Project Create a…

Read this article

C# Http Client

HTTP Post var httpClient = new HttpClient { Timeout = new TimeSpan(0, 0, 30), BaseAddress = new Uri("https://somedomain.com/api/v1") }; var serializedObject = JsonConvert.SerializeObject(someObject); var content = new StringContent(serializedSomeObject, Encoding.UTF8, "application/json"); var response = await _httpClient.PostAsync("/something", content);…

Read this article