Programming

EmberJs and ASP.NET Web API and JSON Serialization

I just switched from Angular to Ember for a new project and really enjoying it.  Per the requirements, I need to use ASP.NET WEB API which is actually pretty impressive.  I instantly ran into a problem though.  Ember expects its json results to be wrapped i.e. Ember expects:

But the API returns

After(…)

Integrate Stripe with your Kinvey Application

Kinvey is my new favorite platform as a service (PAAS) because I can do my entire app as an angularjs app with no backend, deploy it to heroku and have it communicate with Kinvey using ajax.  It’s beautiful. Here is how to process credit card payments in Kinvey using stripe – it took me a(…)

Error Logging With Angular and log4javascript

Angular is an awesome framework and plays very well with other libraries and is easy to integrate.  Angular come with a built-in log service which you can simply access by injecting $log; but I like the log4javascript library… You can easily overwrite the default $log service by defining it in your app as such:

Basically(…)

Powershell Script to Alias a Command with Parameters

Powershell Set-Alias doesn’t pass arguments to the alias and I want an easy way to launch my editor, so I can easily say: “e file.txt” Here is my script that launches WebStorm and pass along the parameters (note the special treatment of the “.”

Now I can just type “ws .” and open webstorm(…)

Useful bash history tricks

This is a reminder to my future self (source https://coderwall.com/p/oqtj8w) Create ~/.inputrc and fill it with this:

This allows you to search through your history using the up and down arrows … i.e. type “cd /” and press the up arrow and you’ll search through everything in your history that starts with “cd /”.  (…)