Setting up Cygwin, Linux Command Line, on a Windows Box

For all of you Linux (and Unix) users who are used to the Linux command line there is an application called Cygwin. Not only does it allow you to use the familiar command line commands but it also includes the ability to execute bash and csh shell scripts on a Windows machine.

When installing it, here are a few additional packages you’ll probably want to include:

vim, ncurses, tcsh

Simply type them into the search field and then check off → Continue reading “Setting up Cygwin, Linux Command Line, on a Windows Box”

Applying Order to JSON Data When Rendering to a Page

It is very convenient to pass JSON data from client to server and between different server-side components. However, JSON data is an inherently unordered data structure and in many cases a developer will want to render a list of items in some specified order.

One way that I found to do so is to append an integer to the keys in your data when generating the JSON data. For example, you might be iterating through a database result set and → Continue reading “Applying Order to JSON Data When Rendering to a Page”

Opening a New Window From a Web Page with Javascript that is SEO Friendly

The days of <a href=”#” target=”_blank”></a> are long gone. The way to open a new window with a link is to do it using the javascript window.open() method via an onclick callback.

However, you still want to make your pages SEO friendly, so you don’t want to go about generating links with href=”#”. The way to do it is as follows:

Javascript:

<script>

function openNewWindow(url) {

   window.open(url);

}

</script>

HTML:

<a href=”someURL.html” onclick=”openNewWindow(‘someUrl.html’);return false;”>Link</a>

When implementing links this way, → Continue reading “Opening a New Window From a Web Page with Javascript that is SEO Friendly”