Compilers:
Tuesday 20 December 2016
Tuesday 11 October 2016
Angular 2
Proxy: https://jjasonclark.com/how-to-setup-node-behind-web-proxy
Disable SSL:
npm config set strict-ssl false
Disable SSL:
npm config set strict-ssl false
Set Registry
Proxy
npm config set proxy http://localhost:53128npm config set https-proxy http://localhost:53128npm config set registry http://registry.npmjs.org
Angular with TypeScript
https://angular.io/docs/ts/latest/quickstart.html
WebPack:
https://angular.io/docs/ts/latest/quickstart.html
WebPack:
- https://github.com/AngularClass/angular2-webpack-starter
- https://github.com/preboot/angular2-webpack
Angular 2
Proxy: https://jjasonclark.com/how-to-setup-node-behind-web-proxy
Disable SSL:
npm config set strict-ssl false
Disable SSL:
npm config set strict-ssl false
Set Registry
Proxy
npm config set proxy http://localhost:53128npm config set https-proxy http://localhost:53128npm config set registry http://registry.npmjs.org
Angular with TypeScript
https://angular.io/docs/ts/latest/quickstart.html
Getting Started with VS2015
https://angular.io/docs/ts/latest/cookbook/visual-studio-2015.html
MVC 5.0 with Angular 2.0
Plugins:
https://angular.io/docs/ts/latest/quickstart.html
Getting Started with VS2015
https://angular.io/docs/ts/latest/cookbook/visual-studio-2015.html
MVC 5.0 with Angular 2.0
Plugins:
Angular 2
Proxy: https://jjasonclark.com/how-to-setup-node-behind-web-proxy
Disable SSL:
npm config set strict-ssl false
Disable SSL:
npm config set strict-ssl false
Proxy
npm config set proxy http://localhost:53128npm config set https-proxy http://localhost:53128npm config set registry http://registry.npmjs.org
Sunday 21 August 2016
Custom Shadowbox Modal
The below code shows the Processing Image as a Modal.
You can close it by setting the processing property on the angular $scope.
You can close it by setting the processing property on the angular $scope.
.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; }
Tuesday 9 August 2016
SMS Gateway Providers
· TextLocal
o Commercial – PAYG (2.4p per text) or Monthly payments
· ClickATell
o Commercial (2.9p per message)
· Twilio:
o Commercial
· Email to SMS Gateway (doesn’t seem to be reliable):
Dynmark:
- http://www.dynmark.com/sms
- http://docs.dynmark.com/docs/qs-cs-send-sms-messages
- https://services.dynmark.com/WebServices/MessagingServicesWS.asmx
- 2.4p per message
· There seems to be a way also with pure .NET but need to look into it if it has any drawbacks: http://www.codeproject.com/Articles/19023/Sending-SMS-using-NET
Nexmo
Plivo
Thursday 7 July 2016
DateTime Extensions
public static class DateTimeExtensions { ////// Includes the from and to dates so from Monday to Tuesday it returns 2 /// 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; } } }
Friday 1 July 2016
JIRA API
Project:
http://domain:8080/rest/api/2/project/{project key}
Search Jira Issues
http://domain:8080/rest/api/2/search/?jql={0}&maxResults={2}&fields={1}
Sprint Details
http://domain:8080/rest/agile/1.0/sprint/{sprint id}
Project Version By Id
http://domain:8080/rest/api/2/version/{project version id}
Version Report Chart
http://domain:8080/rest/greenhopper/1.0/rapid/charts/versionreport?rapidViewId={0}&versionId={1}
Health Gadget for Sprint
http://domain:8080/rest/greenhopper/1.0/gadgets/sprints/health?rapidViewId={0}&sprintId={1}
Version Progress Chart:
http://domain:8080/rest/greenhopper/1.0/rapid/charts/versionprogresschart?rapidViewId=179&versionId=14105
Links
http://domain:8080/rest/api/2/project/{project key}
Project Versions:
http://domain:8080/rest/api/2/project/{project key}/versionsSearch Jira Issues
http://domain:8080/rest/api/2/search/?jql={0}&maxResults={2}&fields={1}
Sprint Details
http://domain:8080/rest/agile/1.0/sprint/{sprint id}
Project Version By Id
http://domain:8080/rest/api/2/version/{project version id}
Version Report Chart
http://domain:8080/rest/greenhopper/1.0/rapid/charts/versionreport?rapidViewId={0}&versionId={1}
Health Gadget for Sprint
http://domain:8080/rest/greenhopper/1.0/gadgets/sprints/health?rapidViewId={0}&sprintId={1}
Version Progress Chart:
http://domain:8080/rest/greenhopper/1.0/rapid/charts/versionprogresschart?rapidViewId=179&versionId=14105
Tuesday 28 June 2016
.NET Memory Leak Checklist
CheckList:
- Check application logs
- Check IIS logs
- Check event viewer
- Check Windows Error Logs
- Check Windows Resource Monitoring window
- Check Crash Dumps; if not configured set it up.
How to Create a Memory Dump:
https://support.symantec.com/en_US/article.howto31321.html
https://blogs.msdn.microsoft.com/chaun/2013/11/12/steps-to-catch-a-simple-crash-dump-of-a-crashing-process/
Tools
ProcDump Tool
- Download: https://technet.microsoft.com/en-us/sysinternals/dd996900.aspx
- How to use ProcDump: https://blogs.msdn.microsoft.com/debugger/2009/12/30/what-is-a-dump-and-how-do-i-create-one/
- Download: https://www.microsoft.com/en-us/download/details.aspx?id=49924
- How to use DebugDiag: http://www.techrepublic.com/blog/software-engineer/track-down-iis-application-issues-with-microsoft-debugdiag/
- https://blogs.msdn.microsoft.com/chaun/2013/11/12/steps-to-catch-a-simple-crash-dump-of-a-crashing-process/
Add LocalDumps
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps
Will be captured to:
%LOCALAPPDATA%\CrashDumps
Wednesday 22 June 2016
Friday 10 June 2016
Tuesday 31 May 2016
Post FormData with Multiple Params
public class FormDataBuilder { private readonly List_params = new List (); 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 }; } }
Monday 23 May 2016
Most Useful JavaScript Libraries
MediaStreamRecorder on GitHub
Cross browser audio/video/screen recording
WebCamJS on GitHub
HTML5 Webcam Image Capture Library
jQuery UI
A set of controls, effects, widgets, and themes built on top of the jQuery JavaScript Library.
Cross browser audio/video/screen recording
WebCamJS on GitHub
HTML5 Webcam Image Capture Library
jQuery UI
A set of controls, effects, widgets, and themes built on top of the jQuery JavaScript Library.
Thursday 5 May 2016
Smart Authentication
Friday 29 April 2016
Google Maps API & Geolocation
UK PostCodes:
http://www.uk-postcodes.com/api
PostCode Details: http://uk-postcodes.com/postcode/KT47QX.xml
Reverse Geocoding
Google Reverse Geocoding
Find Latitude,Longitude pairs based on a postal address
Free Geolocation Finder:
http://freegeoip.net/?q=62.232.92.61
HTML5 Geolocation
http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_geolocation
IPInfoDB
http://www.codeproject.com/Articles/185508/IP-Address-to-Geolocation
http://www.uk-postcodes.com/api
PostCode Details: http://uk-postcodes.com/postcode/KT47QX.xml
Reverse Geocoding
Google Reverse Geocoding
Find Latitude,Longitude pairs based on a postal address
Free Geolocation Finder:
http://freegeoip.net/?q=62.232.92.61
HTML5 Geolocation
http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_geolocation
IPInfoDB
http://www.codeproject.com/Articles/185508/IP-Address-to-Geolocation
Monday 14 March 2016
Add or Update Query String
location.href = addOrUpdateQueryString(location.href, 'maxPageSize', '50');
var addOrUpdateQueryString = function(url, name, value) {
var splitted = url.split('?');
var base = splitted[0];
var pairsArray = [];
var isNew = true;
if (splitted.length > 1) {
// it has query string
var qPairsArray = splitted[1].split('&');
for (var i = 0; i < qPairsArray.length; i++) {
var pair = qPairsArray[i].split('=');
var pairName = pair[0];
var pairValue = pair[1];
if (pairName == name) {
pairValue = value;
isNew = false;
}
pairsArray.push({ name: pairName, value: pairValue });
}
}
if (isNew) {
pairsArray.push({ name: name, value: value });
}
return buildUrl(base, pairsArray);
}
function buildUrl(base, pairsArray) {
var newQ = '';
pairsArray.forEach(function (obj) {
var thisPair = obj.name + '=' + obj.value;
newQ = newQ + (newQ == '' ? '' : '&') + thisPair;
});
return base + "?" + newQ;
}
var addOrUpdateQueryString = function(url, name, value) {
var splitted = url.split('?');
var base = splitted[0];
var pairsArray = [];
var isNew = true;
if (splitted.length > 1) {
// it has query string
var qPairsArray = splitted[1].split('&');
for (var i = 0; i < qPairsArray.length; i++) {
var pair = qPairsArray[i].split('=');
var pairName = pair[0];
var pairValue = pair[1];
if (pairName == name) {
pairValue = value;
isNew = false;
}
pairsArray.push({ name: pairName, value: pairValue });
}
}
if (isNew) {
pairsArray.push({ name: name, value: value });
}
return buildUrl(base, pairsArray);
}
function buildUrl(base, pairsArray) {
var newQ = '';
pairsArray.forEach(function (obj) {
var thisPair = obj.name + '=' + obj.value;
newQ = newQ + (newQ == '' ? '' : '&') + thisPair;
});
return base + "?" + newQ;
}
Subscribe to:
Posts (Atom)