tag:blogger.com,1999:blog-33841012581681253242024-02-20T12:17:19.893-08:00Technical BlogPooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.comBlogger377125tag:blogger.com,1999:blog-3384101258168125324.post-32245524913055548702022-03-03T01:12:00.002-08:002022-03-21T09:39:08.369-07:00Best NPM Packages<p> <a href="https://www.npmjs.com/package/axios"><b>Axios</b></a></p><p>Promise based HTTP client for the browser and node.js</p><p><a href="https://github.com/dominictarr/JSONStream" rel="nofollow" target="_blank">JSONStream</a></p><p>Parses a json data as stream</p>Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-16985175697258412852020-05-09T05:22:00.002-07:002020-05-11T01:43:25.431-07:00Definition of Done ChecklistA story is fully done when the below phases are done.<br />
<br />
<b>Analysis (What)</b><br />
<ol>
<li>Story Description: The story is detailed, what does it aim to achieve as the?</li>
<li>Story Scenarios: The edge cases of the story are detailed.</li>
<li>Story Conditions of the Acceptance is written in details</li>
<li>Story Review Session: The overall high level view of the story</li>
<li>Stories being sized in points regarding complexity e.g. 3, 5, 8 etc.</li>
<li>Story Kick off session: To go through the story details and all its edge cases and conditions of acceptance in details. All the questions should be answered at this phase.</li>
</ol>
<div>
Milestone:</div>
<div>
The Developer will know exactly what the PO/BA would like to achieve.</div>
<div>
<br /></div>
<b>Design (How)</b><br />
<ol>
<li>The solution how to implement is proposed, discussed and agreed with the Architect/Lead dev.</li>
<li>Story Estimation: the story is estimated in more details</li>
<li>Smaller Tasks are created out of the design session</li>
<ol>
</ol>
</ol>
<div>
Milestone:</div>
<div>
The Developer will know how exactly the story should be achieved and how long it'd take.</div>
<div>
<br /></div>
<div>
<b>Development</b></div>
<br />
<ol>
<li>The main scenario/edge cases are developed</li>
<li>Unit tests are written and pass</li>
<li>Component tests are written and pass</li>
<li>The PR is created</li>
<li>The code is built with no errors</li>
<li>Test coverage remains within limit.</li>
<li>The PR code is reviewed by peer devs</li>
<li>The PR demo is reviewed by peer UX/UI designers</li>
<li>PR feedbacks are resolved</li>
<li>PR is approved and merged</li>
</ol>
Milestone:<br />
The Developer believes the story is fully implemented.<br />
<br />
<b>Testing (Quality)</b><br />
<ol>
<li>Test cases and plans are written based on the story main and edge scenarios</li>
<li>Tests conducted and issues logged and reported.</li>
<li>Acceptance criteria is met</li>
<li>Issues are resolved.</li>
<li>Test cases pass successfully</li>
<li>Product owner signs off</li>
</ol>
Milestone:<br />
The Tester believes the story is fully implemented according to the requirements and the Product Owner signs it off meaning ready for deployment.<br />
<br />
<b>Deployment</b><br />
<b><br /></b>
Milestone:<br />
The Product Owner believes that the story has deployed to live.Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-62695036189880821682017-01-25T08:08:00.000-08:002017-01-25T08:08:24.708-08:00EpiServer<b>Field Types:</b><br />
<br />
<ul>
<li>XHtmlString</li>
<li>ContentArea</li>
<li>ContentReference</li>
</ul>
<div>
<br /></div>
<div>
<br /></div>
Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-38400487207874746172017-01-20T03:21:00.003-08:002017-01-20T03:21:46.798-08:00Source Control Branching and Structure<div class="MsoNormal">
<b>Trunk<o:p></o:p></b></div>
<div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -18.0pt;">
</div>
<ul>
<li><span style="font-family: Symbol; text-indent: -18pt;"><span style="font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-numeric: normal;"> </span></span><span style="text-indent: -18pt;">This is the master from which all feature
branches are created.</span></li>
<li><span style="font-family: Symbol; text-indent: -18pt;"><span style="font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-numeric: normal;"> </span></span><span style="text-indent: -18pt;">Only check in to Trunk when a feature has been
tested in RC and LIVE change request has been created and approved.</span> </li>
</ul>
<br />
<div class="MsoNormal">
<b>Branches Folder<o:p></o:p></b></div>
<div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -18.0pt;">
</div>
<ul>
<li><span style="font-family: Symbol; text-indent: -18pt;"><span style="font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-numeric: normal;"> </span></span><span style="text-indent: -18pt;">This folder contains multiple feature branches
created from the trunk.</span></li>
<li><span style="font-family: Symbol; text-indent: -18pt;"><span style="font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-numeric: normal;"> </span></span><span style="text-indent: -18pt;">Once your branch is ready then merge it into RC if
it’s going to be released next.</span></li>
<li><span style="font-family: Symbol; text-indent: -18pt;"><span style="font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-numeric: normal;"> </span></span><span style="text-indent: -18pt;">If it’s not going to be released next, then don’t
merge it. Park it there.</span></li>
<li><span style="font-family: Symbol; text-indent: -18pt;"><span style="font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-numeric: normal;"> </span></span><span style="text-indent: -18pt;">Once the feature is merged and tested in RC and
live release approved, then merge it with trunk.</span></li>
</ul>
<br />
<div class="MsoNormal">
<b>Releases Folder<o:p></o:p></b></div>
<div class="MsoListParagraph" style="mso-list: l1 level1 lfo2; text-indent: -18.0pt;">
</div>
<ul>
<li><span style="font-family: Symbol; text-indent: -18pt;"><span style="font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-numeric: normal;"> </span></span><span style="text-indent: -18pt;">RC branch. This is</span><span style="text-indent: -18pt;"> the upcoming release candidate</span></li>
<li><span style="text-indent: -18pt;"> Once RC gone live, create a new branch from it and put it under the Releases folder and name it like Release2.6</span> </li>
</ul>
<br />
<div align="center" class="MsoNormal" style="text-align: center;">
<b>Teamcity<o:p></o:p></b></div>
<div class="MsoListParagraph" style="mso-list: l2 level1 lfo3; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;">·<span style="font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-numeric: normal;">
</span></span><!--[endif]-->Trunk<o:p></o:p></div>
<div class="MsoListParagraph" style="mso-list: l2 level1 lfo3; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;">·<span style="font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-numeric: normal;">
</span></span><!--[endif]-->RC<o:p></o:p></div>
<br />
<div class="MsoListParagraph" style="mso-list: l2 level1 lfo3; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;">·<span style="font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-numeric: normal;">
</span></span><!--[endif]-->Feature (optional for when a feature branch has
a different release schedule but still needs to be tested)<o:p></o:p></div>
Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-29176517581999756172016-12-20T01:50:00.002-08:002016-12-20T01:54:27.324-08:00SASSCompilers:<br />
<br />
<ul>
<li><a href="https://marketplace.visualstudio.com/items?itemName=MindscapeLimited.MindscapeWebWorkbench">Web Workbench</a></li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=MadsKristensen.WebCompiler">Web Compiler</a></li>
</ul>
Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-41120244134874336192016-10-11T06:29:00.002-07:002016-12-01T06:33:10.190-08:00Angular 2Proxy: https://jjasonclark.com/how-to-setup-node-behind-web-proxy<br />
<br />
<b>Disable SSL:</b><br />
npm config set strict-ssl false<br />
<div>
<br /></div>
<div>
<b>Set Registry</b></div>
<div>
<span style="background-color: white; color: #333333; font-family: , "blinkmacsystemfont" , "segoe ui" , "helvetica" , "arial" , sans-serif , "apple color emoji" , "segoe ui emoji" , "segoe ui symbol"; font-size: 14px; line-height: 21px;">npm config set registry "</span><a href="http://registry.npmjs.org/" style="background-color: white; box-sizing: border-box; color: #4078c0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 14px; line-height: 21px; text-decoration: none;">http://registry.npmjs.org/</a><span style="background-color: white; color: #333333; font-family: , "blinkmacsystemfont" , "segoe ui" , "helvetica" , "arial" , sans-serif , "apple color emoji" , "segoe ui emoji" , "segoe ui symbol"; font-size: 14px; line-height: 21px;">"</span></div>
<div>
<span style="background-color: white; color: #333333; font-family: , "blinkmacsystemfont" , "segoe ui" , "helvetica" , "arial" , sans-serif , "apple color emoji" , "segoe ui emoji" , "segoe ui symbol"; font-size: 14px; line-height: 21px;"><br /></span></div>
<div>
<span style="background-color: white; color: #333333; font-family: , "blinkmacsystemfont" , "segoe ui" , "helvetica" , "arial" , sans-serif , "apple color emoji" , "segoe ui emoji" , "segoe ui symbol"; font-size: 14px; line-height: 21px;"><b>Proxy</b></span></div>
<div>
<pre class="lang-js prettyprint prettyprinted" style="background-color: #eff0f1; border: 0px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><div class="MsoNormal" style="color: #393318; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", "courier new", monospace, sans-serif; font-size: 13px;">
npm config set proxy <a href="http://localhost:53128/">http://localhost:53128</a><o:p></o:p></div>
<span style="color: #393318; font-family: "consolas" , "menlo" , "monaco" , "lucida console" , "liberation mono" , "dejavu sans mono" , "bitstream vera sans mono" , "courier new" , monospace , sans-serif;">
</span><div class="MsoNormal" style="color: #393318; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", "courier new", monospace, sans-serif; font-size: 13px;">
npm config set https-proxy <a href="http://localhost:53128/">http://localhost:53128</a><o:p></o:p></div>
<span style="color: #393318; font-family: "consolas" , "menlo" , "monaco" , "lucida console" , "liberation mono" , "dejavu sans mono" , "bitstream vera sans mono" , "courier new" , monospace , sans-serif;">
</span><div class="MsoNormal" style="color: #393318; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", "courier new", monospace, sans-serif; font-size: 13px;">
npm config set registry <a href="http://registry.npmjs.org/">http://registry.npmjs.org</a><o:p></o:p></div>
<span style="color: #333333; font-family: "times new roman";"><span style="font-size: 14px; line-height: 21px; white-space: normal;">
</span></span></pre>
</div>
<div>
<span style="background-color: white; color: #333333; font-size: 14px; line-height: 21px;"><b>Angular with TypeScript</b></span><br />
<span style="background-color: white; color: #333333; font-size: 14px; line-height: 21px;">https://angular.io/docs/ts/latest/quickstart.html</span><br />
<span style="background-color: white; color: #333333; font-size: 14px; line-height: 21px;"><br /></span>
<span style="background-color: white; color: #333333; font-size: 14px; line-height: 21px;"><b>WebPack:</b></span><br />
<br />
<ul>
<li><span style="color: #333333;"><span style="font-size: 14px; line-height: 21px;">https://github.com/AngularClass/angular2-webpack-starter</span></span></li>
<li><span style="color: #333333;"><span style="font-size: 14px; line-height: 21px;">https://github.com/preboot/angular2-webpack</span></span></li>
<li><span style="color: #333333;"><span style="font-size: 14px; line-height: 21px;"><br /></span></span></li>
</ul>
<br />
<span style="background-color: white; color: #333333; font-size: 14px; line-height: 21px;"><br /></span></div>
Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-60739697271798835662016-10-11T06:29:00.001-07:002016-11-10T09:25:06.088-08:00Angular 2Proxy: https://jjasonclark.com/how-to-setup-node-behind-web-proxy<br />
<br />
<b>Disable SSL:</b><br />
npm config set strict-ssl false<br />
<div>
<br /></div>
<div>
<b>Set Registry</b></div>
<div>
<span style="background-color: white; color: #333333; font-family: , "blinkmacsystemfont" , "segoe ui" , "helvetica" , "arial" , sans-serif , "apple color emoji" , "segoe ui emoji" , "segoe ui symbol"; font-size: 14px; line-height: 21px;">npm config set registry "</span><a href="http://registry.npmjs.org/" style="background-color: white; box-sizing: border-box; color: #4078c0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 14px; line-height: 21px; text-decoration: none;">http://registry.npmjs.org/</a><span style="background-color: white; color: #333333; font-family: , "blinkmacsystemfont" , "segoe ui" , "helvetica" , "arial" , sans-serif , "apple color emoji" , "segoe ui emoji" , "segoe ui symbol"; font-size: 14px; line-height: 21px;">"</span></div>
<div>
<span style="background-color: white; color: #333333; font-family: , "blinkmacsystemfont" , "segoe ui" , "helvetica" , "arial" , sans-serif , "apple color emoji" , "segoe ui emoji" , "segoe ui symbol"; font-size: 14px; line-height: 21px;"><br /></span></div>
<div>
<span style="background-color: white; color: #333333; font-family: , "blinkmacsystemfont" , "segoe ui" , "helvetica" , "arial" , sans-serif , "apple color emoji" , "segoe ui emoji" , "segoe ui symbol"; font-size: 14px; line-height: 21px;"><b>Proxy</b></span></div>
<div>
<pre class="lang-js prettyprint prettyprinted" style="background-color: #eff0f1; border: 0px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><div class="MsoNormal" style="color: #393318; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", "courier new", monospace, sans-serif; font-size: 13px;">
npm config set proxy <a href="http://localhost:53128/">http://localhost:53128</a><o:p></o:p></div>
<span style="color: #393318; font-family: "consolas" , "menlo" , "monaco" , "lucida console" , "liberation mono" , "dejavu sans mono" , "bitstream vera sans mono" , "courier new" , monospace , sans-serif;">
</span><div class="MsoNormal" style="color: #393318; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", "courier new", monospace, sans-serif; font-size: 13px;">
npm config set https-proxy <a href="http://localhost:53128/">http://localhost:53128</a><o:p></o:p></div>
<span style="color: #393318; font-family: "consolas" , "menlo" , "monaco" , "lucida console" , "liberation mono" , "dejavu sans mono" , "bitstream vera sans mono" , "courier new" , monospace , sans-serif;">
</span><div class="MsoNormal" style="color: #393318; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", "courier new", monospace, sans-serif; font-size: 13px;">
npm config set registry <a href="http://registry.npmjs.org/">http://registry.npmjs.org</a><o:p></o:p></div>
<span style="color: #333333; font-family: "times new roman";"><span style="font-size: 14px; line-height: 21px; white-space: normal;">
</span></span></pre>
</div>
<div>
<span style="background-color: white; color: #333333; font-size: 14px; line-height: 21px;"><b>Angular with TypeScript</b></span><br />
<span style="background-color: white; color: #333333; font-size: 14px; line-height: 21px;">https://angular.io/docs/ts/latest/quickstart.html</span><br />
<span style="background-color: white; color: #333333; font-size: 14px; line-height: 21px;"><br /></span>
<span style="background-color: white; color: #333333; font-size: 14px; line-height: 21px;"><b>Getting Started with VS2015</b></span><br />
<span style="background-color: white; color: #333333; font-size: 14px; line-height: 21px;"><a href="https://angular.io/docs/ts/latest/cookbook/visual-studio-2015.html">https://angular.io/docs/ts/latest/cookbook/visual-studio-2015.html</a></span><br />
<br />
<b>MVC 5.0 with Angular 2.0</b><br />
<br />
<ul>
<li><a href="https://ievangelistblog.wordpress.com/2016/01/13/building-an-angular2-spa-with-asp-net-5-mvc-6-web-api-2-and-typescript-1-7-5/">https://ievangelistblog.wordpress.com/2016/01/13/building-an-angular2-spa-with-asp-net-5-mvc-6-web-api-2-and-typescript-1-7-5/</a></li>
</ul>
<b style="color: #333333; font-size: 14px; line-height: 21px;">Plugins:</b><br />
<br />
<ul>
<li><span style="color: #333333;"><span style="font-size: 14px; line-height: 21px;"><a href="http://www.primefaces.org/">http://www.primefaces.org/</a></span></span></li>
<li><span style="color: #333333;"><span style="color: #333333; font-size: 14px; line-height: 21px;"><a href="https://jtblin.github.io/angular-chart.js/">https://jtblin.github.io/angular-chart.js/</a></span></span></li>
<li><span style="color: #333333;"><span style="color: #333333; font-size: 14px; line-height: 21px;"><a href="https://github.com/angular/material2">https://github.com/angular/material2</a></span></span></li>
<li><span style="color: #333333;"><span style="color: #333333; font-size: 14px; line-height: 21px;"><a href="http://valor-software.com/ng2-charts/#top">http://valor-software.com/ng2-charts/#top</a></span></span></li>
<li><span style="color: #333333;"><span style="color: #333333; font-size: 14px; line-height: 21px;"><a href="https://github.com/wealthbar/angular-d3">https://github.com/wealthbar/angular-d3</a></span></span></li>
<li><span style="color: #333333;"><a href="https://github.com/chartjs/Chart.js">https://github.com/chartjs/Chart.js</a></span></li>
</ul>
</div>
Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-12837986910359097742016-10-11T06:29:00.000-07:002016-10-11T06:59:58.068-07:00Angular 2Proxy: https://jjasonclark.com/how-to-setup-node-behind-web-proxy<br />
<br />
<b>Disable SSL:</b><br />
npm config set strict-ssl false<br />
<div>
<br /></div>
<div>
<b style="color: #333333; font-size: 14px; line-height: 21px;">Proxy</b></div>
<div>
<pre class="lang-js prettyprint prettyprinted" style="background-color: #eff0f1; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><div class="MsoNormal">
npm config set proxy <a href="http://localhost:53128/">http://localhost:53128</a><o:p></o:p></div>
<div class="MsoNormal">
npm config set https-proxy <a href="http://localhost:53128/">http://localhost:53128</a><o:p></o:p></div>
<div class="MsoNormal">
npm config set registry <a href="http://registry.npmjs.org/">http://registry.npmjs.org</a><o:p></o:p></div>
</pre>
</div>
<div>
<span style="background-color: white; color: #333333; font-family: , "blinkmacsystemfont" , "segoe ui" , "helvetica" , "arial" , sans-serif , "apple color emoji" , "segoe ui emoji" , "segoe ui symbol"; font-size: 14px; line-height: 21px;"><b>AngularJS with TypeScript</b></span><br />
<span style="background-color: white; color: #333333; font-size: 14px; line-height: 21px;"><a href="https://angular.io/docs/ts/latest/quickstart.html">https://angular.io/docs/ts/latest/quickstart.html</a></span><br />
<span style="background-color: white; color: #333333; font-size: 14px; line-height: 21px;"><br /></span></div>
Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-57185064175315803522016-08-21T05:33:00.001-07:002016-08-21T05:33:38.547-07:00Custom Shadowbox ModalThe below code shows the Processing Image as a Modal.<br />
<br />
You can close it by setting the processing property on the angular $scope.<br />
<br />
<pre class="brush: csharp"> .customModal {
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
padding-top: 100px; /* Location of the box */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
text-align: center;
background-color: rgb(0, 0, 0); /* Fallback color */
background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}
/* Modal Content */
.customModal-content {
margin: auto;
width: 220px;
height: 183px;
}
<div class="customModal" id="myModal" ng-show="processing">
<div class="customModal-content">
<img class="img-rounded" src="~/content/img/processing.gif" />
</div>
</div>
</pre>
Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-33851012579237654392016-08-09T01:54:00.002-07:002016-08-11T04:01:57.730-07:00SMS Gateway Providers<br />
<div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "symbol"; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol; mso-fareast-language: EN-GB;">·<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]-->TextLocal<o:p></o:p></div>
<div class="MsoListParagraph" style="margin-left: 72.0pt; mso-list: l0 level2 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New"; mso-fareast-language: EN-GB;">o<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]-->They provide an API to use <a href="http://www.textlocal.com/sms-api-integrations">http://www.textlocal.com/sms-api-integrations</a><o:p></o:p></div>
<div class="MsoListParagraph" style="margin-left: 72.0pt; mso-list: l0 level2 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New"; mso-fareast-language: EN-GB;">o<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]-->Commercial – PAYG (2.4p per text) or Monthly payments<o:p></o:p></div>
<div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "symbol"; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol; mso-fareast-language: EN-GB;">·<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]-->ClickATell<o:p></o:p></div>
<div class="MsoListParagraph" style="margin-left: 72.0pt; mso-list: l0 level2 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New"; mso-fareast-language: EN-GB;">o<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]-->API: <a href="https://www.clickatell.com/developers/2015/10/08/rest-api/">https://www.clickatell.com/developers/2015/10/08/rest-api/</a><o:p></o:p></div>
<div class="MsoListParagraph" style="margin-left: 72.0pt; mso-list: l0 level2 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New"; mso-fareast-language: EN-GB;">o<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]-->Commercial (2.9p per message)<o:p></o:p></div>
<div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "symbol"; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol; mso-fareast-language: EN-GB;">·<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]-->Twilio:<o:p></o:p></div>
<div class="MsoListParagraph" style="margin-left: 72.0pt; mso-list: l0 level2 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New"; mso-fareast-language: EN-GB;">o<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]--><a href="https://www.twilio.com/sms/api">https://www.twilio.com/sms/api</a><o:p></o:p></div>
<div class="MsoListParagraph" style="margin-left: 72.0pt; mso-list: l0 level2 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New"; mso-fareast-language: EN-GB;">o<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]-->Commercial<o:p></o:p></div>
<div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "symbol"; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol; mso-fareast-language: EN-GB;">·<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]-->Email to SMS Gateway (doesn’t seem to be reliable):<o:p></o:p></div>
<div class="MsoListParagraph" style="margin-left: 72.0pt; mso-list: l0 level2 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New"; mso-fareast-language: EN-GB;">o<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]--><a href="https://sites.google.com/site/emailtosmsgateway/">https://sites.google.com/site/emailtosmsgateway/</a><o:p></o:p></div>
<br />
Dynmark:<br />
<br />
<ul>
<li><a href="http://www.dynmark.com/sms">http://www.dynmark.com/sms</a></li>
<li><a href="http://docs.dynmark.com/docs/qs-cs-send-sms-messages">http://docs.dynmark.com/docs/qs-cs-send-sms-messages</a></li>
<li><a href="https://services.dynmark.com/WebServices/MessagingServicesWS.asmx">https://services.dynmark.com/WebServices/MessagingServicesWS.asmx</a></li>
<li>2.4p per message</li>
</ul>
<br />
<div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "symbol"; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol; mso-fareast-language: EN-GB;">·<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]-->There seems to be a way also with pure .NET but need to look into it if it has any drawbacks: <a href="http://www.codeproject.com/Articles/19023/Sending-SMS-using-NET">http://www.codeproject.com/Articles/19023/Sending-SMS-using-NET</a><o:p></o:p></div>
<div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -18.0pt;">
<br /></div>
Sinch<br />
Nexmo<br />
Plivo<br />
<div>
<br /></div>
<div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -18.0pt;">
<br /></div>
<br />Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-11848684706159971372016-07-07T02:34:00.002-07:002016-07-07T02:35:06.047-07:00DateTime Extensions<pre class="brush: csharp">
public static class DateTimeExtensions
{
/// <summary>
/// Includes the from and to dates so from Monday to Tuesday it returns 2
/// </summary>
public static int FindBusinessDaysUntil(this DateTime from, DateTime to)
{
double calcBusinessDays =
1 + ((to - from).TotalDays * 5 -
(from.DayOfWeek - to.DayOfWeek) * 2) / 7;
if ((int)to.DayOfWeek == 6) calcBusinessDays--;
if ((int)from.DayOfWeek == 0) calcBusinessDays--;
return Convert.ToInt16(calcBusinessDays);
}
public static DateTime NextBusinessDay(this DateTime from)
{
var nextDay = from.AddDays(1);
while (true)
{
var numberOfBusinessDays = FindBusinessDaysUntil(from, nextDay);
if (numberOfBusinessDays == 2)
{
return nextDay;
}
nextDay = nextDay.AddDays(1);
}
}
public static DateTime NextBusinessDay(this DateTime from, int days)
{
var result = from;
for (int i = 0; i < days; i++)
{
result = result.NextBusinessDay();
}
return result;
}
}
}
</pre>Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-46601742082919453122016-07-01T07:02:00.001-07:002016-08-01T01:01:47.073-07:00JIRA API<b>Project:</b><br />
<a href="http://domain:8080/rest/api/2/project/[project%20key]/versions">http://domain:8080/rest/api/2/project/{project key}</a><br />
<div>
<br /></div>
<div>
<b>Project Versions:</b></div>
<a href="http://domain:8080/rest/api/2/project/[project%20key]/versions">http://domain:8080/rest/api/2/project/{project key}/versions</a><br />
<br />
<b>Search Jira Issues</b><br />
<a href="http://domain:8080/rest/api/2/search/?jql={0}&maxResults={2}&fields={1}">http://domain:8080/rest/api/2/search/?jql={0}&maxResults={2}&fields={1}</a><br />
<br />
<b>Sprint Details</b><br />
<a href="http://domain:8080/rest/agile/1.0/sprint/%7Bsprint%20id%7D">http://domain:8080/rest/agile/1.0/sprint/{sprint id}</a><br />
<br />
<b>Project Version By Id</b><br />
<a href="http://domain:8080/rest/api/2/version/%7Bproject%20version%20id%7D">http://domain:8080/rest/api/2/version/{project version id}</a><br />
<br />
<b>Version Report Chart</b><br />
<a href="http://domain:8080/rest/greenhopper/1.0/rapid/charts/versionreport?rapidViewId={0}&versionId={1}">http://domain:8080/rest/greenhopper/1.0/rapid/charts/versionreport?rapidViewId={0}&versionId={1}</a><br />
<br />
<b>Health Gadget for Sprint</b><br />
<a href="http://domain:8080/rest/greenhopper/1.0/gadgets/sprints/version?rapidViewId=179&sprintId=645">http://domain:8080/rest/greenhopper/1.0/gadgets/sprints/health?rapidViewId={0}&sprintId={1}</a><br />
<div>
<br />
<b>Version Progress Chart:</b><br />
<a href="http://domain:8080/rest/greenhopper/1.0/rapid/charts/versionprogresschart?rapidViewId=179&versionId=14105">http://domain:8080/rest/greenhopper/1.0/rapid/charts/versionprogresschart?rapidViewId=179&versionId=14105</a><br />
<br /></div>
<b>Links</b><br />
<ul>
<li><a href="https://docs.atlassian.com/jira-software/REST/cloud/">JIRA REST API</a></li>
</ul>
Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com2tag:blogger.com,1999:blog-3384101258168125324.post-55999805796313924622016-06-28T03:34:00.000-07:002016-06-29T02:43:28.552-07:00.NET Memory Leak Checklist<br />
<b>CheckList:</b><br />
<br />
<ul>
<li>Check application logs</li>
<li>Check IIS logs</li>
<li>Check event viewer</li>
<li>Check Windows Error Logs</li>
<li>Check Windows Resource Monitoring window</li>
<li>Check Crash Dumps; if not configured set it up.</li>
</ul>
<br />
<b>How to Create a Memory Dump:</b><br />
<a href="https://support.symantec.com/en_US/article.howto31321.html">https://support.symantec.com/en_US/article.howto31321.html</a><br />
<br />
<a href="https://blogs.msdn.microsoft.com/chaun/2013/11/12/steps-to-catch-a-simple-crash-dump-of-a-crashing-process/">https://blogs.msdn.microsoft.com/chaun/2013/11/12/steps-to-catch-a-simple-crash-dump-of-a-crashing-process/</a><br />
<div>
<br /></div>
You can then use it for further analysis via DebugDiag or Visual Studio.<br />
<br />
<div style="text-align: center;">
<b><span style="font-size: large;">Tools</span></b></div>
<b><br /></b> <b>ProcDump Tool</b><br />
<ul>
<li>Download: <a href="https://technet.microsoft.com/en-us/sysinternals/dd996900.aspx">https://technet.microsoft.com/en-us/sysinternals/dd996900.aspx</a></li>
<li>How to use ProcDump: <a href="https://blogs.msdn.microsoft.com/debugger/2009/12/30/what-is-a-dump-and-how-do-i-create-one/">https://blogs.msdn.microsoft.com/debugger/2009/12/30/what-is-a-dump-and-how-do-i-create-one/</a></li>
</ul>
<div>
<br /></div>
<b>DebugDiag Tool</b><br />
<div>
<br /></div>
<div>
<ul>
<li>Download: <a href="https://www.microsoft.com/en-us/download/details.aspx?id=49924">https://www.microsoft.com/en-us/download/details.aspx?id=49924</a></li>
<li>How to use DebugDiag: <a href="http://www.techrepublic.com/blog/software-engineer/track-down-iis-application-issues-with-microsoft-debugdiag/">http://www.techrepublic.com/blog/software-engineer/track-down-iis-application-issues-with-microsoft-debugdiag/</a></li>
<li>https://blogs.msdn.microsoft.com/chaun/2013/11/12/steps-to-catch-a-simple-crash-dump-of-a-crashing-process/</li>
</ul>
<b>ANTS Memory Profiler</b></div>
<div>
<a href="http://www.red-gate.com/products/dotnet-development/ants-memory-profiler/">http://www.red-gate.com/products/dotnet-development/ants-memory-profiler/</a><br />
<ul>
</ul>
<div>
<br /></div>
</div>
<div>
<b>WER/Registry</b><br />
<b><br /></b> <a href="https://msdn.microsoft.com/en-us/library/bb513638(VS.85).aspx">https://msdn.microsoft.com/en-us/library/bb513638(VS.85).aspx</a><br />
<b><br /></b></div>
<div>
<pre class="text" style="background-attachment: initial !important; background-clip: initial !important; background-image: initial !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-radius: 0px !important; border: none !important; box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px !important; clear: none !important; color: #110000; font-size: 12px !important; line-height: 16px !important; outline: 0px; overflow: visible !important; padding: 0px 4px !important; vertical-align: baseline; width: auto !important;">Add LocalDumps</pre>
<pre class="text" style="background-attachment: initial !important; background-clip: initial !important; background-image: initial !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-radius: 0px !important; border: none !important; box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px !important; clear: none !important; color: #110000; font-size: 12px !important; line-height: 16px !important; outline: 0px; overflow: visible !important; padding: 0px 4px !important; vertical-align: baseline; width: auto !important;"></pre>
<pre class="text" style="background-attachment: initial !important; background-clip: initial !important; background-image: initial !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-radius: 0px !important; border: none !important; box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px !important; clear: none !important; color: #110000; font-size: 12px !important; line-height: 16px !important; outline: 0px; overflow: visible !important; padding: 0px 4px !important; vertical-align: baseline; width: auto !important;">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps</pre>
<pre class="text" style="background-attachment: initial !important; background-clip: initial !important; background-image: initial !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-radius: 0px !important; border: none !important; box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px !important; clear: none !important; color: #110000; font-size: 12px !important; line-height: 16px !important; outline: 0px; overflow: visible !important; padding: 0px 4px !important; vertical-align: baseline; width: auto !important;"></pre>
<pre class="text" style="background-attachment: initial !important; background-clip: initial !important; background-image: initial !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-radius: 0px !important; border: none !important; box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px !important; clear: none !important; color: #110000; font-size: 12px !important; line-height: 16px !important; outline: 0px; overflow: visible !important; padding: 0px 4px !important; vertical-align: baseline; width: auto !important;"></pre>
<pre class="text" style="background-attachment: initial !important; background-clip: initial !important; background-image: initial !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-radius: 0px !important; border: none !important; box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px !important; clear: none !important; color: #110000; font-size: 12px !important; line-height: 16px !important; outline: 0px; overflow: visible !important; padding: 0px 4px !important; vertical-align: baseline; width: auto !important;">Will be captured to:</pre>
<pre class="text" style="background-attachment: initial !important; background-clip: initial !important; background-image: initial !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-radius: 0px !important; border: none !important; box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px !important; clear: none !important; color: #110000; font-size: 12px !important; line-height: 16px !important; outline: 0px; overflow: visible !important; padding: 0px 4px !important; vertical-align: baseline; width: auto !important;"></pre>
<pre class="text" style="background-attachment: initial !important; background-clip: initial !important; background-image: initial !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-radius: 0px !important; border: none !important; box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px !important; clear: none !important; color: #110000; font-size: 12px !important; line-height: 16px !important; outline: 0px; overflow: visible !important; padding: 0px 4px !important; vertical-align: baseline; width: auto !important;"><span style="background-color: white; color: black; font-family: "arial" , sans-serif; font-size: 14px; line-height: 21px; white-space: normal;">%LOCALAPPDATA%\CrashDumps</span></pre>
</div>
Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-60298365592467698882016-06-22T09:24:00.002-07:002016-06-22T09:24:54.748-07:00Google Maps Geolocation<pre class="brush: csharp"> <script src="https://maps.googleapis.com/maps/api/js?key=yourkey"></script>
<script>
$(function () {
google.maps.event.addDomListener(window, 'load', initMap);
});
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
center: { lat: -34.397, lng: 150.644 },
zoom: 12
});
var infoWindow = new google.maps.InfoWindow({ map: map });
// Try HTML5 geolocation.
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function (position) {
var pos = {
lat: position.coords.latitude,
lng: position.coords.longitude
};
$('#hidLocationLat').val(pos.lat);
$('#hidLocationLng').val(pos.lng);
infoWindow.setPosition(pos);
infoWindow.setContent('Location found.');
map.setCenter(pos);
// get address details
var geocoder = new google.maps.Geocoder();
geocoder.geocode({ 'location': pos }, function (results, status) {
if (status === google.maps.GeocoderStatus.OK) {
$('#hidLocationAddress').val(results[0].formatted_address);
}
});
}, function () {
handleLocationError(true, infoWindow, map.getCenter());
});
} else {
// Browser doesn't support Geolocation
handleLocationError(false, infoWindow, map.getCenter());
}
}
function handleLocationError(browserHasGeolocation, infoWindow, pos) {
infoWindow.setPosition(pos);
infoWindow.setContent(browserHasGeolocation ?
'Error: The Geolocation service failed.' :
'Error: Your browser doesn\'t support geolocation.');
}
</script>
</pre>
Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-36465930234803510282016-06-10T08:00:00.001-07:002016-06-13T07:13:22.263-07:00Entity Framework Code FirstMigration: <a href="https://msdn.microsoft.com/en-gb/data/jj591621.aspx">https://msdn.microsoft.com/en-gb/data/jj591621.aspx</a><br />
<br />
<a href="https://msdn.microsoft.com/en-gb/data/jj554735.aspx">https://msdn.microsoft.com/en-gb/data/jj554735.aspx</a>Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-28456948547358972972016-05-31T08:22:00.001-07:002016-06-15T09:04:36.587-07:00Post FormData with Multiple Params<pre class="brush: csharp">
public class FormDataBuilder
{
private readonly List<FormDataParam> _params = new List<FormDataParam>();
private readonly string _boundary;
private const string BoundaryDashes = "--";
public FormDataBuilder(string boundary)
{
_boundary = boundary;
}
public string Build()
{
StringBuilder sb = new StringBuilder();
foreach (FormDataParam param in _params)
{
sb.AppendLine(BoundaryDashes + _boundary);
sb.AppendLine(param.ParamType == FormDataParamType.File
? string.Format("Content-Disposition: file; name=\"{0}\"; filename=\"{1}\"", param.Name, param.FileName)
: string.Format("Content-Disposition: form-data; name=\"{0}\"", param.Name));
sb.AppendLine("Content-Type: {0}".FormatWith(param.ContentType.Description()));
sb.AppendLine();
sb.AppendLine(param.Value);
}
sb.AppendLine(BoundaryDashes + _boundary + BoundaryDashes);
return sb.ToString();
}
public FormDataBuilder AddImage(string name, string value, string fileName)
{
return Add(FormDataParam.CreateImage(name, value, fileName));
}
public FormDataBuilder AddAudio(string name, string value, string fileName)
{
return Add(FormDataParam.CreateAudio(name, value, fileName));
}
public FormDataBuilder AddText(string name, string value)
{
return Add(FormDataParam.CreateField(name, value, ContentType.Text));
}
public FormDataBuilder AddJson(string name, string value)
{
return Add(FormDataParam.CreateField(name, value, ContentType.Json));
}
public FormDataBuilder Add(FormDataParam formDataParam)
{
_params.Add(formDataParam);
return this;
}
}
public enum FormDataParamType
{
Field,
File
}
public enum ContentType
{
[Description("text/plain")]
Text,
[Description("application/json")]
Json,
[Description("image/jpg")]
Image,
[Description("audio/wav")]
Audio
}
public class FormDataParam
{
public string Name;
public string FileName;
public string Value;
public FormDataParamType ParamType;
public ContentType ContentType;
public static FormDataParam CreateField(string name, string value, ContentType contentType)
{
return new FormDataParam()
{
Name = name,
Value = value,
ParamType = FormDataParamType.Field,
ContentType = contentType
};
}
public static FormDataParam CreateImage(string name, string value, string fileName)
{
return new FormDataParam()
{
Name = name,
Value = value,
ParamType = FormDataParamType.File,
FileName = fileName,
ContentType = ContentType.Image
};
}
public static FormDataParam CreateAudio(string name, string value, string fileName)
{
return new FormDataParam()
{
Name = name,
Value = value,
ParamType = FormDataParamType.File,
FileName = fileName,
ContentType = ContentType.Audio
};
}
}
</pre>
Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-5657904684501564432016-05-23T02:26:00.001-07:002016-05-23T02:26:15.037-07:00Most Useful JavaScript Libraries<b><a href="https://github.com/streamproc/MediaStreamRecorder">MediaStreamRecorder</a> on GitHub</b><br />
<br />
Cross browser audio/video/screen recording<br />
<br />
<b><a href="https://github.com/jhuckaby/webcamjs">WebCamJS</a> on GitHub</b><br />
HTML5 Webcam Image Capture Library<br />
<br />
<b><a href="https://jqueryui.com/">jQuery UI</a></b><br />
A set of controls, effects, widgets, and themes built on top of the jQuery JavaScript Library.<br />
<br />
<br />Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-66311485797599856372016-05-05T04:48:00.000-07:002016-07-14T07:24:08.083-07:00Smart Authentication<b><a href="https://www.jumio.com/netverify/">Jumio</a></b>:<br />
ID Scanning and Verification<br />
<br />
<b><a href="https://www.miteksystems.com/">Mitek</a>:</b><br />
ID Scanning and Verification<br />
http://finovate.com/videos/finovatespring-2016-mitek/<br />
<br />
<b><a href="http://www.ca.com/gb/lpg/imageware-systems-inc.aspx">ImageWare</a>:</b><br />
Identity management and biometric enrollment over the web and via mobile.<br />
<br />
<a href="http://www.inauth.com/">InAuth</a>:<br />
Find geolocation details based on your device details<br />
<br />
<br />
<br />
<br />
<br />Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-64068157159653846552016-04-29T08:34:00.000-07:002016-05-04T02:53:32.112-07:00Google Maps API & Geolocation<b>UK PostCodes:</b><br />
<a href="http://www.uk-postcodes.com/api">http://www.uk-postcodes.com/api</a><br />
PostCode Details: <a href="http://uk-postcodes.com/postcode/KT47QX.xml">http://uk-postcodes.com/postcode/KT47QX.xml</a><br />
<br />
<b>Reverse Geocoding</b><br />
<a href="https://google-developers.appspot.com/maps/documentation/javascript/examples/geocoding-reverse">Google Reverse Geocoding</a><br />
Find Latitude,Longitude pairs based on a postal address<br />
<br />
<b>Free Geolocation Finder:</b><br />
<a href="http://freegeoip.net/?q=62.232.92.61">http://freegeoip.net/?q=62.232.92.61</a><br />
<br />
<b>HTML5 Geolocation</b><br />
<a href="http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_geolocation">http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_geolocation</a><br />
<br />
<br />
<a href="http://www.ipinfodb.com/ip_location_api.php">IPInfoDB</a><br />
<a href="http://www.codeproject.com/Articles/185508/IP-Address-to-Geolocation">http://www.codeproject.com/Articles/185508/IP-Address-to-Geolocation</a><br />
<br />
<br />
<br />
<br />Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-70525301414144539742016-03-14T04:34:00.001-07:002016-03-17T10:18:10.107-07:00Add or Update Query String location.href = addOrUpdateQueryString(location.href, 'maxPageSize', '50');<br />
<br />
var addOrUpdateQueryString = function(url, name, value) {<br />
<br />
var splitted = url.split('?');<br />
var base = splitted[0];<br />
var pairsArray = [];<br />
var isNew = true;<br />
if (splitted.length > 1) {<br />
// it has query string<br />
var qPairsArray = splitted[1].split('&');<br />
for (var i = 0; i < qPairsArray.length; i++) {<br />
var pair = qPairsArray[i].split('=');<br />
var pairName = pair[0];<br />
var pairValue = pair[1];<br />
if (pairName == name) {<br />
pairValue = value;<br />
isNew = false;<br />
}<br />
pairsArray.push({ name: pairName, value: pairValue });<br />
}<br />
}<br />
<br />
if (isNew) {<br />
pairsArray.push({ name: name, value: value });<br />
}<br />
<br />
return buildUrl(base, pairsArray);<br />
}<br />
<br />
function buildUrl(base, pairsArray) {<br />
var newQ = '';<br />
pairsArray.forEach(function (obj) {<br />
var thisPair = obj.name + '=' + obj.value;<br />
newQ = newQ + (newQ == '' ? '' : '&') + thisPair;<br />
});<br />
<br />
return base + "?" + newQ;<br />
}<br />
<br />Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-31712023093152843922015-11-28T13:06:00.001-08:002016-03-01T05:47:49.575-08:00Configuring Windsor Castle with Web API and MVCAdd below to the Application_Start() in Global.asax.cs
<br />
<pre class="brush: csharp">
WindsorActivationConfig.Setup(GlobalConfiguration.Configuration);
</pre>
<pre class="brush: csharp">
public static class WindsorActivationConfig
{
public static void Setup(HttpConfiguration config)
{
IWindsorContainer container = new WindsorContainer();
container.Register(Classes.FromThisAssembly().BasedOn<ihttpcontroller>().LifestyleTransient());
config.Services.Replace(typeof(IHttpControllerActivator), new WindsorControllerActivator(container));
// register your components here now
}
}
</ihttpcontroller></pre>
<br />
<pre class="brush: csharp">
public class WindsorControllerActivator : IHttpControllerActivator
{
private readonly IWindsorContainer _container;
public WindsorControllerActivator(IWindsorContainer container)
{
this._container = container;
}
public IHttpController Create(HttpRequestMessage request,
HttpControllerDescriptor controllerDescriptor,
Type controllerType)
{
var controller = (IHttpController) this._container.Resolve(controllerType);
request.RegisterForDispose(new Release(() => this._container.Release(controller)));
return controller;
}
private class Release : IDisposable
{
private readonly Action _release;
public Release(Action release)
{
this._release = release;
}
public void Dispose()
{
this._release();
}
}
}
</pre>
<pre class="brush: csharp"></pre>
<pre class="brush: csharp">
public abstract class DependenciesInstallerBase
{
protected readonly WindsorContainer Container;
protected DependenciesInstallerBase(WindsorContainer container, bool enableArrayInjection = true)
{
Container = container;
if (enableArrayInjection)
{
// enables injection of interface arrays to a registered object
Container.Kernel.Resolver.AddSubResolver(new CollectionResolver(Container.Kernel));
}
}
protected void RegisterAllDefaultInterfacesWithinAssembly<t>()
{
// registers objects with their interfaces
// registers multiple objects for the same interface
Container.Register(Classes
.FromAssembly(typeof(T).Assembly)
.BasedOn<object>()
.WithService.AllInterfaces()
.LifestyleTransient());
}
}
</object></t></pre>
Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-8041495306653052192015-09-10T02:40:00.001-07:002015-10-09T05:48:10.645-07:00Windows Remote Management Service<div class="MsoNormal">
<span style="color: #1f497d;"><br /></span></div>
<div class="MsoNormal">
<span style="color: #1f497d;"><b>Check Remote Access</b></span></div>
<div class="MsoNormal">
<span style="color: #1f497d;">winrm get winrm/config -r:HOSTNAME<remoteserverhostname><o:p></o:p></remoteserverhostname></span><br />
<span style="color: #1f497d;"><br /></span>
<span style="color: #1f497d;"><b>Set Trusted Hosts on a Remote Server</b></span><br />
<pre class="lang-bash prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;"><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;">winrm </span><span class="kwd" style="border: 0px; color: darkblue; margin: 0px; padding: 0px;">set</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;"> winrm</span><span class="pun" style="border: 0px; color: black; margin: 0px; padding: 0px;">/</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;">config</span><span class="pun" style="border: 0px; color: black; margin: 0px; padding: 0px;">/</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;">client </span><span class="str" style="border: 0px; color: maroon; margin: 0px; padding: 0px;">'@{TrustedHosts="machineA,machineB"}'</span></code></pre>
<span style="color: #1f497d;">This means that machineA and machineB are trusted to remove to the Remote Server.</span><br />
<span style="color: #1f497d;"><br /></span>
<span style="color: #1f497d;"><b>Create a Permanent Connection to a Remote Server</b></span><br />
<span style="color: #1f497d;">New-PSSession -ComputerName HOSTNAME</span><br />
<span style="color: #1f497d;"><br /></span>
<span style="color: #1f497d;"><b>Create a Permanent Connection to a Remote Server via a Port Number and a User Credential</b></span><br />
<span style="color: #1f497d;">New-PSSession -ComputerName HOSTNAME -port 81 -cred DOMAIN\USERNAME</span><br />
<span style="color: #1f497d;"><br /></span>
<span style="color: #1f497d;"><b>Open Port 81 on a Server</b></span><br />
<span style="color: #1f497d;">set-item wsman:\localhost\listener\listener*\port -value 81 -force</span><br />
<span style="color: #1f497d;"><br /></span>
<span style="color: #1f497d;"><b>See the Listener Details</b></span><br />
<span style="font-family: Segoe UI, Segoe UI Web, Segoe UI Symbol, Helvetica Neue, BBAlpha Sans, S60 Sans, Arial, sans-serif;"><span style="background-color: white; font-size: 15px; line-height: 20px;"><b>winrm enumerate winrm/config/listener</b></span></span><br />
<span style="font-family: Segoe UI, Segoe UI Web, Segoe UI Symbol, Helvetica Neue, BBAlpha Sans, S60 Sans, Arial, sans-serif;"><span style="background-color: white; font-size: 15px; line-height: 20px;"><b><br /></b></span></span>
<br />
<div class="MsoNormal">
<span style="color: #1f497d;"><b>Remove WRM Listener
Configurations<o:p></o:p></b></span></div>
<div class="MsoNormal">
<span style="color: #1f497d;">winrm invoke Restore
winrm/Config</span></div>
<div class="MsoNormal">
<span style="color: #1f497d;"><br /></span></div>
<div class="MsoNormal">
<span style="color: #1f497d;"><b>Enable PowerShell Remoting<o:p></o:p></b></span></div>
<div class="MsoNormal">
<span style="color: #1f497d;">Enable-PSRemoting</span></div>
<div class="MsoNormal">
<span style="color: #1f497d;"><br /></span></div>
<div class="MsoNormal">
<span style="color: #1f497d;"><b>Restart the Remote Manangement
service<o:p></o:p></b></span></div>
<div class="MsoNormal">
<span style="color: #1f497d;">net stop winrm</span></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<span style="color: #1f497d;">net start winrm<o:p></o:p></span><br />
<span style="color: #1f497d;"><br /></span>
<span style="color: #1f497d;"><b>Set Listener Port</b></span><br />
<span style="color: #1f497d;">winrm set winrm/config/Listener?Address=*+Transport=HTTP '@{Port="5985"}'</span></div>
</div>
Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-16188142008569798042015-04-15T00:20:00.001-07:002015-04-15T00:26:31.055-07:00Amazon DynamoDB NoSQL Database<br />
<ul>
<li><a href="http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html">Amazon DynamoDB Deverloper's Guide</a></li>
<li><a href="http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html">Amazon DynamoDB API's Guide</a></li>
<li><a href="http://aws.amazon.com/documentation/sdk-for-net/">Amazon SDK for .NET</a></li>
<li><a href="http://docs.aws.amazon.com/sdkfornet/latest/apidocs/Index.html">AWS SDK for .NET API Reference</a></li>
<li><a href="http://docs.aws.amazon.com/AWSSdkDocsNET/latest/DeveloperGuide/welcome.html">AWS SDK for .NET Developer Guide</a></li>
<li><a href="http://aws.amazon.com/sdk-for-net/">Download AWS SDK for .NET</a></li>
<li><a href="https://console.aws.amazon.com/console/home">AWS Console</a></li>
<li><a href="http://aws.amazon.com/dynamodb/pricing/">Pricing</a></li>
<li><br /></li>
</ul>
Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com6tag:blogger.com,1999:blog-3384101258168125324.post-20720583386463135602015-01-13T02:18:00.002-08:002015-01-13T06:00:45.492-08:00How to configure IP Address Restriction for your MVC/WebForms Application?<b>Step 1: Enable IP Security Feature in Windows</b><br />
<br />
<ul>
<li>Go to "Turn Windows Features on or off"</li>
<li>Find the IP Security checkbox under IIS/WorldWide Services/Security</li>
<li>Enable it</li>
</ul>
<div>
<b>Step 2: Unlock IP Security Feature in IIS</b></div>
<div>
<div>
<ul>
<li>Open IIS Manager</li>
<li>Click the Server name/Configuration Editor</li>
<li>Select IP Security section</li>
<li>Make sure it’s unlocked</li>
</ul>
<div>
<b>Step 3: Add the Restrictions to the Web.config</b></div>
</div>
</div>
<div>
<br /></div>
<div>
<div>
Add only the IP Addresses that must be allowed access to this:<br />
<br /></div>
<div>
“allowUnlisted” attribute means access to all IP Addresses must be denied apart from the ones listed below.<br />
<br />
“allowed” attribute must be set to true otherwise by default it’s false and just denies access to the IP Address.<br />
<br />
<a href="http://blogs.endjin.com/2014/09/restrict-access-to-azure-websites-by-whitelisting/">http://blogs.endjin.com/2014/09/restrict-access-to-azure-websites-by-whitelisting/</a></div>
</div>
<location path="Admin">
<system .webserver="">
<security>
<ipsecurity allowunlisted="false">
<add allowed="true" ipaddress="127.0.0.1">
</add></ipsecurity>
</security>
</system>
</location>
Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0tag:blogger.com,1999:blog-3384101258168125324.post-22602339378513701072014-11-26T03:52:00.001-08:002016-07-01T02:18:11.984-07:00Create Xml from Excel<pre class="brush: csharp"> private const string FileName = @"C:\myFile.xls";
private const string XmlFileName = @"c:\\myFile.xml";
private static void CreateXmlFile()
{
DataTable data = new ExcelReader().ReadFirstSheet(FileName);
var xdoc = new XDocument();
var root = new XElement("ReportEntitlementMappings");
foreach (DataRow row in data.Rows)
{
var mapping = new XElement("Mapping");
mapping.SetAttributeValue("From", row[0]);
mapping.SetAttributeValue("To", row[1]);
root.Add(mapping);
}
xdoc.Add(root);
xdoc.Save(XmlFileName);
}
public interface IExcelReader
{
DataTable ReadFirstSheet(string fileName);
DataTableCollection ReadAllSheets(string fileName);
}
public class ExcelReader : IExcelReader
{
const string ConnectionStringFormat = "Provider=Microsoft.Jet.OLEDB.4.0; data source={0}; Extended Properties=Excel 8.0;";
public DataTable ReadFirstSheet(string fileName)
{
return ReadAllSheets(fileName)[0];
}
public DataTableCollection ReadAllSheets(string fileName)
{
var adapter = new OleDbDataAdapter("SELECT * FROM [Mappings$]", ConnectionStringFormat.FormatWith(fileName));
var ds = new DataSet();
adapter.Fill(ds);
return ds.Tables;
}
}
</pre>
EPPLUS tool supports reading from Excel 2007 and 2010 files:
<a href="http://epplus.codeplex.com/">http://epplus.codeplex.com/</a>Pooya Khamooshihttp://www.blogger.com/profile/17307982895929166635noreply@blogger.com0