Raw Syntax

The stuff programs are made of

On API Security


I was asked recently about designing a secure API. There are 2 basic steps:

  1. Encrypt the connection (HTTPS)
  2. Encrypt the paylod (HMAC-SHA1 for example)

You could think up ways to go further but these are the basics that need to be covered.

K750: A Solid Wireless Keyboard


I don't normally talk about computer equipment here, but I recently purchased the K750 wireless keyboard by Logitech. It's amazing because it is solar powered and therefore requires no batteries. Their manual says it can remain powered for 3 months in total darkness. I believe they tested this in my office. Also of note, I bought the mac version of the keyboard. However, it also works with my PC, though I had to fool with their software a bit for the function keys to work.

The K750 is also a good deal cheaper than the official Apple wireless keyboard.

Previously I had an older version of the Razer Deathstalker. It was nice, but there were wires everywhere. The K750 is nice and clean, and I haven't noticed any perceptible input lag / delay.

How to Set Up Angular With Rails Part 2


originally posted on the Intridea blog here: http://www.intridea.com/blog/2014/10/14/how-to-set-up-angular-with-rails-part-2

In Part I of our Angular series, we illustrated the process for setting up an Angular app for Rails.

In Part 2 of this series, we'll be creating a basic HR app. This app will allow us to view employee information through an Angular app (edits and updates to be explained in Part 3 of this series). For more details, see code in Github link at the end of post.

How to Set Up Angular With Rails


originally posted on the Intridea blog here: http://www.intridea.com/blog/2014/9/25/how-to-set-up-angular-with-rails

To get started lets create a new rails app.

gem install rails -v 4.1
rails new angular_example

In this app, I chose not to use turbolinks. It's possible to use Angular with Rails and turbolinks, but the Angular app bootstrap process is more complex. I find that turbolinks and Angular serve the same purpose, which is to make the app respond faster. Adding turbolinks, in addition to Angular, adds a lot of complexity and not much benefit.