Showing all posts tagged: 'JavaScript'

A 21-post collection

SignalR cross domain with CORS

I've recently had to create a demo for a SignalR project I'm working on. SignalR is awesome when it comes to enabling real-time communications for your application. The amazing thing about SignalR, apart from how easy it is to use, is that it works across many different application types and platforms. You can use it on website, desktop apps and even mobile apps (both native and Xamarin). If you want to know more, have a look at the official website However, as with everything else, sometimes things don't work as you would expect them. SignalR is incredibly easy to setup …[read more]

Create Electron applications with Visual Studio Code

Visual Studio Code (VSCode) is by far my favourite editor. I've got nothing against Sublime or Atom, but the first one is not free and the second one tends to get a bit slow. I use all 3, in case you think of accusing me of favouritism, but my Go-To editor is VSCode. One of its biggest strengths is obviously the debugging experience. This week I decided to start rewriting my password application (PasswordDefence) with Electron. This will mean that once finalized, I will have a mobile and desktop presence and it also gives me a good opportunity to play …[read more]

Setting up a Gulp task with Visual Studio Code

As a web developer, certain tools have become indispensable. I can't even imagine having to do any front-end work without npm, Grunt or Gulp. In fact, these tools are so great that the upcoming release of ASP.NET has thrown away proprietory package and task managers in favour of the widely adopted and established tools used by the community. And these tools are now first class citizens both in Visual Studio and Visual Studio Code. Classic .NET developers and avid Visual Studio users will have a lot of catching up to do. But we are here to help! Today, I …[read more]

Add "copy-to-clipboard" functionality to your website

I'm currently working on releasing a nice front-end to is an OSS tool that allows users to check their passwords' strength. You can also generate strong passwords using the same tool. If you're ever stuck for a password, head over to the site and give it a go! There's also a funky API and free OSS library release as NuGet package so you don't have to re-invent the wheel. With the shameless plug out of the way, I'll get to the chase. How do you add a copy-to-clipboard feature to your site? Some popular sites …[read more]

Logging with AngularJs - extending the built-in logger

AngularJs has an impressive and robust logging mechanism through the $logService and $log injection. However, Angular logs everything to the console, which is neither a robust or scalable solution. Sometimes, you need to be able to intercept the exceptions and do something extra. This could be as simple as adding extra information or sending all logs to the server/database. Below I've included two different ways that you can achieve that. Option 1 The first one is pretty simple and allows you to hook into the $exceptionHandler and pass a logger in the form of an AngularJs factory. The factory …[read more]