Browsing articles from "January, 2014"
Jan
22

The Node Sessions: The Best of OSCON 2011; O’Reilly Media

By Rob Warner  //  Development, Software  //  No Comments

Various Node.js gurus explain and explore the power of this server-side framework in this collection of videos. Two years later, the videos age pretty well, considering they cover Node.js 0.4.x and 0.5.x, and today’s current version is 0.10.x. The speakers range from Node committers to heavy Node users, and you gain insight into not only how Node works but why it works that way. Some highlights:

  • Real Projects Built in Node and Developing Cloud9 in Cloud9 speak to the what works and what doesn’t in real-world use. Advice includes to use libraries like Puppet for configuration and Log Magic for logging. Cloud9 continues to grow and is an excellent way to get started with Node.
  • Using jQuery with node.js introduces jsdom and how you can use this powerful framework on the server side. It implements the DOM as if it were a browser so jQuery selectors et al work fine.
  • Running Node.js in Production and Node at Scale tells you how to make sure your Node app scales in real-world use. It covers how to choose meaningful benchmarks, how to structure your code, how to deploy, and how to keep your dependencies stable using package.json
  • Programming a Chat Server does some live coding to show what you can do with sockets.io and Node. You can see the result at https://github.com/guille/oscon-chat.
  • Why We Chose Node compares the dynamic nature of JavaScript with static languages like Java and C++, and explains the importance of being able to see exactly what’s going on when errors arise.
  • Network Programming with Node.js talks about the challenges of porting Node to Windows.

I wish the speakers had repeated the questions before answering them–you’re left guessing what question the answer matches. Talks mostly finished ahead of schedule, reflecting perhaps speakers new to speaking. The information is prime (albeit dated), though, and the whole offers a good introduction to the world of Node.js.

Find the videos here: http://shop.oreilly.com/product/0636920022183.do

Jan
10

How to Lock Up Linux Using Sublime Text 3

By Rob Warner  //  Development, Linux, Mac, Software  //  No Comments

Steps to Lock Up Linux Using Sublime Text 3:

  1. Log in to your Mac OS X machine.
  2. Install VirtualBox.
  3. Install a Linux virtual machine.
  4. Boot that Linux virtual machine.
  5. Install Sublime Text 3 on that Linux virtual machine.
  6. Launch Sublime Text 3 and open some files for editing.
  7. Hit Cmd+P to Goto Anything….

There you go. As we say in The Deep South, you’re locked up tighter’n a tick. You can click around, mash keys, yell, and curse, even for a long time, and you’re completely stuck.

Steps to Unlock Linux After Sublime Text 3 Has Locked It Up:

  1. Hit Cmd+P to uncheck the Machine > Pause (Host+P) menu item.
  2. Hit Ctrl+P to Goto Anything….

Don’t ask me how I know this; maybe I read it somewhere.

Jan
9

Installing ForgeRock OpenAM and Apache 2.4.6 on Ubuntu 13.10

By Rob Warner  //  Linux, Software  //  5 Comments

TL;DR

touch /etc/apache2/httpd.conf

Enter /etc/apache2 as your Apache Server Config Directory Path

copy the generated line from httpd.conf to apache2.conf

The Story

I’m no sysadmin, as will become clear rapidly in this post. I develop software, including Web software, so I have some knowledge of Apache and how to set it up and configure it, but for anything tough I scurry to real sysadmins.

I’m currently on a project at work to replace our Sun/Oracle OpenSSO installation with ForgeRock OpenAM, so I plopped a Linux VM on my MacBook Pro and worked my way through installing OpenAM using the ForgeRock’s Getting Started with OpenAM document, which is easy to follow and works well. When I got to the OpenAM Web Policy Agent installation, however, I stumbled. I ran the commands:

$ cd /path/to/web_agents/apache22_agent/bin
$ ./agentadmin --install

I was prompted for the Apache configuration directory:

Enter the Apache Server Config Directory Path [/opt/apache24/conf]:

I had installed Apache 2.4 through apt-get, so I knew /opt/apache24/conf wasn’t correct. I poked around a bit and found /etc/apache2, which looked like a configuration directory to me, so I entered that. I got this error message:

ERROR: Invalid Apache Server Config directory . Please try again.

After trying all kinds of directories that had “apache2” in the path (see? I told you I’m no sysadmin) and getting the same error each time, and after prying open the shell script and seeing that all work was being done in Java, so I’d need a decompiler to crack this open, I paused a moment to think: What would this script be looking for to validate that the directory I entered was indeed an Apache Server Config directory? I figured it was probably looking for httpd.conf, which is the configuration file I’m (slightly) familiar with and which didn’t exist anywhere on my system. So, I typed:

touch /etc/apache2/httpd.conf

I re-ran the OpenAM Web Policy Agent installation, and everything worked. The installation wrote this line to httpd.conf:

include /opt/web_agents/apache24_agent/Agent_001/config/dsame.conf

When I tested my newly-protected page, however, OpenAM did nothing to prevent access. After a bit of thought, I figured that httpd.conf was being ignored, so I copied that line into apache2.conf, and then OpenAM blocked the page appropriately. Success!

Hope this helps someone.

About

I'm Rob Warner, and I'm a software developer. I live in Jacksonville, Florida, and work for Availity, LLC. The postings on this site are my own and do not necessarily reflect the views of Availity.